They lined up hundreds strong to touch the dirt. Some fell to their knees, clutching the gritty stuff as though it were a long-lost child. Others lifted it to their lips to savor a taste of the home they left behind decades ago.

Ilan Grapel, a citizen of Israel and the United States who was arrested in Egypt and accused of spying for Israel, was handed over to Israeli authorities Thursday as part of a prisoner swap, Egyptian officials and state-run media said.