Israel and Egypt reached a prisoner exchange deal that would secure the release of suspected Israeli spy Ilan Grapel, the Prime Minister's Office said on Monday. The cabinet is set to meet on Tuesday to give the deal a final seal of approval.

Ilan Grapel, who holds both Israeli and American citizenships, has been held in Egypt since June 12.

Open gallery view Ilan Grapel in Tahrir Square in a picture taken from his Facebook account.

Grapel was first charged with espionage, but the charges were later changed to incitement, insurrection, and damaging a public building during the uprising that took place in Egypt earlier this year.

The U.S. has been especially active in trying to secure Grapel's release during the last two months. Although U.S. officials had exerted heavy pressure on Egypt, they were unable to secure his release.

In a statement published by Prime Minister Benjamin Netanyahu's office, Israel and Egypt reached a deal to release the suspected spy, saying that Grapel is to be released in exchange for 25 Egyptian prisoners, including three minors.

The PM's office added that the deal was reached as a result of U.S. mediation, and that none of the prisoners to be released were linked to attacks on Israeli citizens.

However, according to a report in the website of Egyptian newspaper al-Masry al-Youm, the Grapel deal will include two security offenders, charged with planning to target sites within Israel in cooperation with Palestinian militants.

According to the report, the deal represents the largest prisoner exchange agreement between Israel and Egypt, with Egyptian officials estimating that the swap would take place by this Thursday.

Israel's representatives to the prisoner swap talks with Egypt were Netanyahu's personal emissary Yitzhal Molcho and Kadima MK Israel Hasson, who has been actively engaged in the case for the last four months.

Hasson, the former deputy Shin Bet chief, maintains close ties with the heads of Egyptian intelligence, as well as the chief of the country's ruling military council, Gen. Mohamed Hussein Tantawi.

Netanyahu aides have also indicated that U.S. officials continuously aided talks geared at Grapel's release. At first, Egypt demanded the release of all 81 Egyptian prisoners held in Israel, but eventually agreed to settle for only 25.

In addition, Egypt will issue an official statement declaring that Grapel was not an Israeli spy.

The proposed deal comes after Egypt brokered an agreement between Israel and the Palestinian Hamas movement to swap Israeli soldier Gilad Shalit for 1,027 Palestinian prisoners.

The Grapel prisoner swap deal marks the end of a drawn out attempt to mend Israel-Egypt ties following an August border incident which resulted in the death of 5 Egyptian policemen.

On August 18, eight Israelis were killed on a desert border road by gunmen who Israel has said infiltrated from the Gaza Strip via Egypt's neighboring Sinai desert.

Seven of the attackers were killed by Israeli forces and Egypt said five of its men died in the crossfire. The incident triggered the most serious diplomatic row with Egypt since a popular revolt overthrew former president Hosni Mubarak in February.

However, a sign that tensions between Cairo and Jerusalem were beginning to ease was the Shalit prisoner swap deal between Israel Hamas, which was brokered by Egyptian officials.

As soon as news of the newly signed deal got out, Israel also issued an official apology over the death of the Egyptian policemen in August, thus accepting the results of a joint probe set up by the two countries to investigate the incident.