(TEL AVIV) -- An Israeli-American law student from New York City was released into Israeli custody Thursday afternoon, four months after he was arrested in Egypt and accused of being an Israeli spy. Israel vehemently denied the espionage charges but freed 25 Egyptians from Israeli prisons to secure 27-year-old Ilan Grapel's release.
The exchange comes just a week after Egypt brokered a landmark deal between Israel and the Palestinian militant group Hamas to trade more than one thousand Palestinian prisoners for Sgt. Gilad Shalit, an Israeli soldier held in the Gaza Strip for more than five years.
Egyptian authorities handed Grapel over to his mother and Israeli envoys to take him back to Israel by private jet. Meanwhile, the 25 Egyptians -- including three minors -- were transferred to the Taba border crossing in southern Israel to cross back into Egypt.
Grapel is originally from Queens, New York and studies law at Emory University in Atlanta. He was in Cairo on vacation and to volunteer for a refugee agency when he was arrested on June 12. He was accused of spying for Mossad -- Israel's intelligence agency -- and charged with espionage. Egypt later lowered the charge to incitement. Israel and Grapel's family repeatedly denied the charges.
"From the beginning, I was assured by the highest levels in Israel that in no way did Ilan have anything to do with espionage, the Mossad or any other type of spy agency," Congressman Gary Ackerman, a Queens Democrat told the New York Post.
Grapel, who is Jewish, joined the Israeli army as a paratrooper and was wounded while fighting in the 2006 war with Lebanon. Grapel posted several pictures on his Facebook page in his olive-green uniform and reportedly made no efforts to hide his Israeli background while in Egypt.
The United States played a key role in getting Grapel released. During a visit to Cairo in early October, Defense Secretary Leon Panetta urged Egypt's interim military leadership to free Grapel. The efforts were sped up as Egypt prepared to mediate last week's prisoner swap between Hamas and Israel. On Tuesday, Israeli Prime Minister Benjamin Netanyahu thanked the U.S. for its assistance.
The Palestinian Ma'an news agency reported that the U.S. sweetened the exchange by pledging a sale of F-16 fighter jets to Egypt.
Analysts point to the Egyptian prisoners being released as evidence that Egypt doesn't genuinely believe that Grapel was spying. All the Egyptians were serving time for criminal acts, not terror-related offenses against Israel. They were mostly smugglers who crossed into Israel illegally, traded weapons and other contraband. Four had already completed their sentences, including the three minors.
The exchange comes at a time of strained relations between the two countries, which signed a peace agreement in 1979. Despite the treaty, Israel is deeply unpopular in Egypt, tension recently highlighted when an Egyptian mob attacked the Israeli embassy in Cairo and forced almost of its diplomatic staff to evacuate to Israel.
Copyright 2011 ABC News Radio