BONN, Nov. 17— Shortly after Saddam Hussein’s army marched into Kuwait in August 1990, a German Foreign Ministry official provided Baghdad with piles of secrets, including Western assessments of Iraq’s missile strength.

The German official, who also gave Iraq critical insights into the increasing deployment of United States forces, was eventually arrested and convicted of espionage, according to confidential documents from his trial.

The documents suggest that President Hussein had far greater knowledge in 1990 of American and allied thinking than was publicly assumed at the time. And the information provided by the German spy may have helped Iraq protect from allied attack some of the missiles it used to attack Israel in 1991, the court documents say.

The spy, Jurgen Mohamed Gietler, 42, is said to have given an Iraqi intelligence officer in Bonn details of a confidential message from President George Bush to Chancellor Helmut Kohl that set out United States military deployments in the Persian Gulf region.

He also handed over a German intelligence report setting out what the West knew about the location of Iraqi Scud-B missile sites, according to the court documents.

In other words, President Hussein had time to relocate missile launchers — or replace them with decoys — long before the beginning of allied air raids against Iraq in January 1991.

“The subsequent course of the war — the targeting of heavily populated residential areas of Israel by Iraqi rockets — shows the great significance of this report for Iraq and for the coalition against it,“ the documents say.

The court documents, still classified in Germany, set out the formal judgment and sentencing of Mr. Gietler by a court in Dusseldorf, which imposed a five-year jail term in May 1991 after a brief trial that was largely held in secret.

Mr. Gietler has been free since 1994, working as a businessman in Africa, the newsmagazine Der Spiegel reported in this week’s issue.

Bonn has a reputation as a place easily penetrated by hostile intelligence agencies. But even by those standards, Mr. Gietler’s dealings with an Iraqi military intelligence officer seem to have been made easy by extraordinarily lax security arrangements at the Foreign Ministry, where he worked in the registry where documents are stored.

When he was arrested on Aug. 28, 1990, almost four weeks after the invasion of Kuwait, he was walking out of the Foreign Ministry carrying a plastic bag containing 51 documents, 46 of them dealing with the gulf crisis, the court documents said.

Der Spiegel said he had first gained access to the ministry’s Middle East registry, where classified documents were stored, while on temporary duty. He had a copy of the key to the registry made during his lunch break at a kiosk in the Bonn railway station. He was unchallenged when he removed many documents in a briefcase, including secret French satellite photographs showing Israeli missile deployments.

Mr. Gietler was also said in the court documents to have given Iraq information about the activities of German private companies involved in Iraq’s arms programs. The information may have enabled Iraq to tip off some of the companies so they could avoid detection by German investigators.

It is not clear when the German authorities informed American officials that crucial parts of the military planning for the gulf war had been compromised.

But in the judgment of the court, Mr. Gietler’s activities enabled Iraq’s army to disguise some missile batteries so that it was able to fire missiles at Israel from sites that the United States and its allies believed they had destroyed.

One document handed over by Mr. Gietler was a message on Aug. 7, 1990, from President Bush detailing exactly which Navy, Air Force and Army units were being sent to the gulf. Mr. Bush requested that his message be kept secret, “to protect the security of American soldiers,“ according to the court judgment.

Der Spiegel said Mr. Gietler had been arrested as a result of a routine German wiretap at the Iraqi Embassy here in June 1990. German agents then tailed an Iraqi officer — identified as Brig. Gen. Osmat Judi Mohammed, Iraq’s military attache in Germany — to a clandestine meeting with Mr. Gietler in June 1990.

The German agents held off arresting Mr. Gietler, because they suspected that a third figure might be involved in the espionage operation. That enabled Mr. Gietler to provide Iraq with classified material for weeks after the invasion of Kuwait.