Elwan said the court convicted the trio after it evaluated the evidence and found that it was "clear enough to let the court have the degree of certainty to convict them".
The three men, who denied the charges, said they would appeal against the ruling.
"This is unfair ... You have sentenced me without any proof"
Bassam al-Haidari, the defendant
"This is unfair, you have sentenced me without any proof of these accusations," al-Haidari, the defendant, said.
The prosecution charged al-Haidari with corresponding with Olmert through emails, one of which purportedly said: "We are the Organisation of Islamic Jihad and you are Jews, but you are honest, and we are ready to do anything."
According to the charges, Olmert responded to al-Haidari welcoming his offer to collaborate.
"We are ready to support you to become an obstacle in the Middle East. We will support you as an agent," Olmert was quoted as writing.Charges 'far-fetched'
Mark Regev, Olmert's spokesman, said the charges were "completely far-fetched".
"We have no knowledge of any contact with this person," he said.
|Yemen is viewed in the West as a
"safe haven" for terrorists [EPA]
"Every day we receive numerous messages from the Arab and Muslim world and we hail those wanting dialogue with Israel."
The men were accused in January of claiming responsibilty for an attack on the US embassy that killed 16 people in September, and operating under a group calling itself Organisation of Islamic Jihad.
The twin suicide car bombings on the US embassy, later claimed by al-Qaeda in Yemen, were the biggest militant operation in the country since the attacks on the French tanker Limburg
in 2002 and the US warship USS Cole
The Yemeni government joined the US's "war on terror" following September 11, 2001, attacks.
Yemen has jailed scores of people in connection with bombings of Western targets and clashes with the authorities, but is still viewed in the West as a "safe haven" for terrorists.