JERUSALEM, Israel - Libyan authorities released Rafael (Rafram) Hadad after months of backdoor diplomacy.
Local police arrested Hadad, 34, in March after he arrived in Libya to photograph former Jewish properties on behalf of the Jews of Libya Foundation.
Police turned him over to Intelligence officials, who accused him of spying.
Hadad, who holds Israeli and Tunisian passports, managed to phone family members in Tunisia.
His relatives contacted Israel's Foreign Ministry, which began clandestine negotiations to secure his release.
Initially, ministry officials sought help from the U.S., France and Italy.
Among other diplomatic efforts, Prime Minister Benjamin Netanyahu asked his Italian counterpart, Silvio Berlusconi, to intercede on Hadad's behalf.
A little over two months ago, Foreign Minister Avigdor Lieberman contacted his friend, Martin Schlaff, an Austrian businessman who is friendly with Saif al-Islam Gadhafi, son of Libyan President Moammar Ghadafi.
Initially, Libya demanded that one of its cargo ships be permitted to deliver humanitarian aid directly to the Gaza Strip. Israel refused and the Libyans agreed to unload the cargo at the Egyptian port of el-Arish.
In the end, Israel agreed to allow Libya to construct 20 prefab housing units in Gaza in exchange for Hadad's release.
Lieberman arrived in Vienna on Sunday where he met with Hadad, who flew there earlier following his release. The two are scheduled to fly home to Israel on Monday afternoon.