Under a long-sought diplomatic deal between Washington and Riyadh, the United States on Saturday transferred nine Yemeni men to Saudi Arabia from the U.S. military prison at Guantanamo Bay in Cuba, including an inmate who had been on a hunger strike since 2007, U.S. officials said.

The transfer, which took place just days before President Barack Obama's visit to Saudi Arabia for a summit of Persian Gulf Arab allies, marks the latest step in his final push to close the controversial detention center at the U.S. naval base before he leaves office next January.

The Saudis agreed, after lengthy negotiations that at one point involved Obama and Saudi King Salman bin Abdul-Aziz al-Saud, to take the nine Yemenis for resettlement and put them through a government-run rehabilitation program that seeks to reintegrate militants into society, the officials said.