Israel swapped 25 jailed Egyptians — some convicted of smuggling — for Ilan Grapel, 27, who was detained in Egypt in June on accusations he was out to recruit agents and monitor events in the revolt that toppled Hosni Mubarak, an ally of Israel and the United States.

Israel denied the charges.

Many of the freed Egyptians knelt to pray before boarding a coach to cross into their homeland, a Reuters report from the Taba border crossing said.

"Raise up your heads, you are Egyptian," cried relatives waving the country's red, white and black flag as the coach 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."

Rabia Suleiman, who was serving a four-year jail term on drugs charges, was asked by the same station what he would do on his return: "I'll come here and find any job, and I won't go back."

The United States, which provides the army that now runs Egypt with billions of dollars in military aid, had called for Grapel's release. Analysts said the exchange provided a cover for Egypt to resolve the diplomatic headache.

"I consider it a cover for returning this spy with pressure from the United States," Egyptian analyst Hassan Nafaa said. "The release of those 25 represents a cover that has no meaning in fact. It does not harm Israel and it does not significantly benefit Egyptians," he added. Many of those detained by Israel were convicted of smuggling offenses.

The US-brokered exchange deal was reached shortly after a more high-profile, Egyptian-brokered swap between Israel and Hamas that freed captive Israeli soldier Gilad Shalit in exchange for more than 1,000 Palestinian prisoners.