With a smile and words of thanks, Israeli-US citizen Ilan Grapel, 27, returned to Israel on Thursday night after spending four-and-a-half months in an Egyptian jail on espionage charges.Egypt released Grapel, who had been arrested in Cairo in June, and Israel freed 25 Egyptians in a prisoner swap that diplomats on both sides hope will ease strains between Cairo’s new rulers and the US and Israel.RELATED:Netanyahu meets Grapel: 'It's good that you're home' (video) Timeline: Five months on Egyptian detentionGrapel, a law student at Emory University in Atlanta, is expected to fly back to his family’s home in Queens, New York, on Friday.Standing with his mother, Irene, and US Rep. Gary Ackerman (D-New York) at the King David Hotel in Jerusalem just hours after his release, he spoke of his gratitude to the Israeli and American officials who had worked for his freedom.“I want to thank the Israeli people,” Grapel said.Making a reference to the biblical Exodus from Egypt to Israel, he said: “Once it would have taken 40 years to get out of the desert.” Grapel thanked Prime Minister Binyamin Netanyahu, US Secretary of State Hillary Clinton and other officials for enabling his release.“I appreciate all the help and all the attention and all the care,” he said. “With all the turmoil going on in Egypt, I have to thank the Egyptian authorities that treated me respectfully and according to the tenets of their religion.”Wearing a short-sleeved, blue button-down shirt, the tall young man joked a bit as he stood behind a podium talking with reporters.“It seems that just yesterday I was at this podium,” he said.He explained that he had in fact stood there five years ago when US President Barack Obama visited Israel as a senator and was interviewed by the press.A photograph of Grapel taken during that interview was brought up during his interrogation in Egypt, he said.Irene Grapel told reporters, “My heart was broken for fourand- half months” while her son was in jail. “There are not enough words in any language to say how thankful my husband and I are.” She, along with Ackerman, stood on the tarmac to greet Ilan when he landed at Ben-Gurion Airport. They both gave him a hug and US Ambassador Dan Shapiro shook his hand.Grapel was flown from Cairo in a small private plane, accompanied by the prime minister’s special envoy Yitzhak Molcho and MK Yisrael Hasson (Israel Beiteinu).Grapel was then driven in a van to Jerusalem where he met with Netanyahu and was fed a dinner of a hamburger and french fries.“It’s good that you’re home,” the prime minister said. “This was hanging on a thread, and I’m glad it worked out. I’m grateful to the governments of Egypt and the United States.”Grapel said he undergone “difficult times” in Egyptian prison, but had been treated well.Ackerman told reporters that Netanyahu’s efforts to release Grapel were “historic, heroic and halachic.”The congressman, who had pressed for Grapel’s release, traveled to Israel to accompany him back to the United States. In the summer of 2002, Grapel interned in Ackerman’s office in Queens.The Egyptians, he said, had acted better than expected in trying circumstances. They arrested someone who they thought was a spy, but was not a spy, said Ackerman.The son of an American mother and an Israeli father, Grapel served in the Paratroop Brigade and was wounded during the Second Lebanon War.He had gone to Egypt to work for a legal aid organization.The State Department issued a statement welcoming Grapel’s release.“We thank the governments of Egypt and Israel for their roles in reuniting him with his family,” it said. “The Egyptian-Israeli Peace Treaty is a vital element of regional peace and stability, and we strongly support both countries’ sustained commitment to its provisions.”Egypt arrested Grapel in June on suspicion that he was out to recruit agents and monitor events in the revolt that toppled president Hosni Mubarak.Israel denied that Grapel, who emigrated from New York in 2005, was a spy. His links to Israel were apparent on his Facebook page, which had photos of him in an IDF uniform.Grapel was working for Saint Andrew’s Refugee Services, a non-governmental organization, when he was detained, his family said.The United States, which provides the army that runs Egypt with billions of dollars in military aid, had called for Grapel’s release. He was freed three weeks after US Defense Secretary Leon Panetta visited Egypt.The US-brokered exchange deal was reached shortly after a more high-profile, Egyptianmediated swap between Israel and Gaza’s Hamas rulers to free captive soldier Gilad Schalit in exchange for 1,027 Palestinian prisoners.Eli Avidar, a former diplomat who headed Israel’s mission in Qatar, said securing the release of Egyptian prisoners could help Cairo’s new leaders domestically.“The Egyptian administration needs this for its prestige,” he said on Israel Television.In September, Israel flew its ambassador, Yitzhak Levanon, out of Egypt when the embassy was attacked by protesters angry at the killings of Egyptian border guards when IDF troops pursued terrorists who killed eight Israelis in August into Sinai. The gunmen infiltrated from the Gaza Strip via Sinai.Many of the prisoners on the release roster were jailed for drug trafficking, infiltration into Israel and gun-running, but not for espionage or attacks on Israelis, the Prisons Service said.The freed Egyptians crossed over land into the Sinai desert, some of them kneeling in a thanksgiving prayer.“I can’t describe my feelings today,” one of the released men, Fayez Abdel Hamid, told reporters.“Raise up your heads, you are Egyptian,” cried relatives waving the country’s red, white and black flag as the bus carrying the men crossed the border.“I’ve been in jail since 2005.Thank God. I feel reborn,” Mursi Barakat told Egyptian state television.“The treatment in jail was very tough and it was clear there was discrimination.”South Sinai Gov. Khaled Fouda told reporters after the handover, “This is the biggest prisoner swap deal since 1948...There will be more deals in the future.”Israel has also called for steps to help free another Israeli, Oudeh Suleiman Tarabin, jailed by Egypt.Maj.-Gen. (res.) Amos Gilad, director of the diplomatic-security bureau at the Defense Ministry, rejected arguments that Israel had capitulated to Egypt in the 25-1 exchange.“The bottom line is [that] you have to decide, will he [Grapel] stay there in prison, or not? If you ask me, he needed to be freed,” Gilad told Israel Radio.