Israel has released 25 Egyptian prisoners in an exchange deal for a US-Israeli man accused of spying by Egypt and held in custody there since June.
The 25 prisoners, who had all been convicted of smuggling drugs or weapons or infiltrating Israel illegally, were greeted by crowds as they crossed into Egypt at the Taba border crossing after being transported there from prison in southern Israel earlier in the day.
TV footage showed some of the Egyptian men kneeling to kiss the asphalt after crossing through a blue metal gate at the border crossing.
Grapel, 27, was flown from Cairo to Ben Gurion airport in Israel accompanied by envoys for Binyamin Netanyahu, the Israeli prime minister.
Israel Hasson, an Israeli politician who travelled with Grapel on the flight, said before leaving Cairo that he looked fine and was smiling.
Al Jazeera's Sherine Tadros, reporting from Taba, said the heads of various clans had checked lists to see if the names of those freed matched their faces.
Among those released were teenagers that had been held for years, she said.
Egypt scores points
The exchange, reportedly mediated by the US, came after a successful Egyptian-negotiated swap between Israel and the Palestinian group Hamas that freed Gilad Shalit, a captive Israeli soldier in return for more than 1,000 Palestinian prisoners of whom about 400 have so far been released.
Our correspondent said there were also domestic reasons for the deal, adding that Egypt was "trying to score some points" by securing the release of the prisoners from Israeli custody.
Grapel was volunteering at a legal aid group in Cairo when he was arrested and accused of spying for Israel during the uprising that toppled Hosni Mubarak in February. Israel denied the espionage allegations, as did Grapel's family and friends.
Grapel's arrest led to fears in Israel that relations with Egypt, the first Arab country to sign a peace deal with Israel in 1979, would sour after the fall of Mubarak.
Hasson, the Israeli legislator, said the Netanyahu government agreed to free prisoners to ease recent tensions.
"This event could have developed into a crisis and we don't think either country needs that," he told Israel Radio. "This was not a prisoner exchange. This was crisis prevention between Israel, the US and Egypt."
Background no secret
Grapel had not concealed his Israeli background and entered Egypt under his real name.
He said late on Thursday in Jerusalem that Egyptian authorities "made sure that I was fed well [and] respected me".
Grapel's sister, Michal, told Israel's Army Radio that their mother, who lives in Queens, New York City, had flown to the region to meet her son after he arrived in Israel.
She would fly back with him to the US where he is studying law, at an unspecified date, the sister said.
Grapel moved to Israel, where his grandparents live, as a young man. He did his compulsory military service in Israel during its 2006 war in Lebanon and was wounded in the fighting. He later returned to the US to study.
At the time of his arrest Grapel was doing a legal internship with a local nonprofit organisation in Cairo and planned afterwards to return to the US for his final year of law school.
Source: Al Jazeera and agencies