Egyptian prisoners being exchanged for an American-Israeli man held in Egypt on spying charges crossed the border on Thursday, some of them bowing down in prayer as they arrived on Egyptian soil, state television showed.

Israel agreed to swap 25 jailed Egyptians 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.

Several were interviewed by Egyptian television as they crossed. Thanks be to God, one of them told a television reporter on arrival.

(Reporting by Shaimaa Fayed in Cairo and Tamim Elyan in Taba; Writing by Edmund Blair)