Ben Zygier, the suspected Israeli-Australian Mossad spy who allegedly committed suicide at a high-security prison in Tel Aviv, was jailed for leaking secrets to Hezbollah in Lebanon, according to a report on a German newspaper.

Zygier revealed classified information to an Eastern European man he was trying to recruit in a bid to save his job after he was fired from the Mossad, according to Der Spiegel.

He started working for Israel's spy agency in 2003 but was sacked because his bosses were unhappy with his work.

The contacts with the man, a Hezbollah operative, were part of a rogue operation to get back into the Mossad's good books.

The sensitive information included the names of two Lebanese nationals working for the Mossad as agents in Hezbollah, Siad al-Homsi and Mustafa Ali Awadeh. The men were subsequently arrested in May 2009 on charges of spying for Israel and jailed.

"He tried to prove himself [with] a rogue operation," Ronen Bergman, intelligence correspondent for Israel's daily newspaper Yedioth Ahronoth, said. "Unauthorised and without the knowledge of his superiors, trying to prove that he is a wonderful agent, that he is a Mossad heroic figure. He tried to recruit a Hezbollah operative or Hezbollah in the Balkans, in Europe."

But the Hezbollah contact "got the better of Zygier" and the recruitment effort failed. Zygier was called back to Israel for questioning and revealed the whole affair.

In February, ABC reported that Zygier was "Prisoner X", the hitherto anonymous inmate who was believed to have hanged himself in Ayalon prison in 2010.