The court in the canal city of Port Said also handed down life sentences in absentia to two Israelis it found guilty of being the Egyptian's handlers, the official MENA news agency reported late Saturday.
The court found that Mohamed Ali Abdel Baki had passed on information damaging to national security about the movements of Egyptian and foreign warships, particularly Iranian ones.
Abdel Baki had also divulged detailed information to his handlers about Port Said and its management, the court heard.
Signup to our newsletter and follow us on Facebook and Twitter!
He had first made contact with the Israeli security services over the Internet in 2011 and met the two Israelis convicted of being his handlers at the embassy in Bangkok the following year.
Prosecutors charged that in addition to spying for Israel, Abdel Baki had also offered to provide similar information about naval movements and deployments to its regional foes Iran, Syria and Lebanese Shiite militant group Hezbollah.
In February 2011, two Iranian warships entered the Mediterranean through the Suez Canal for the first time since the Islamic revolution of 1979, prompting Israel to put its navy on high alert.
Iranian warships made a similar deployment through the canal in February 2012, sailing past the coast of Israel and making a port call in Latakia in allied Syria before returning to Iran.