WASHINGTON — The United States transferred five detainees from the military prison at Guantánamo Bay, Cuba, to Kazakhstan, the Defense Department announced late Tuesday. It was the last in a flurry of year-end moves as President Obama sought to fulfill his promise to close the American-run prison.

The five former detainees — three Yemenis and two Tunisians — are “free men” for all intents and purposes after the transfer, a senior official in the Obama administration said. Officials declined to disclose the security assurances reached between the United States and Kazakhstan or detail how the men would be prevented from returning to battlefields in Afghanistan or Pakistan.

With the move, 28 detainees have been transferred this year from Guantánamo to other countries, including Uruguay and Afghanistan, administration officials said.

It is the biggest number since 2009, when Mr. Obama assumed office and began trying to make good on his campaign promise to close the prison, which top administration officials have characterized as a blight on the country’s international standing. There are 127 prisoners at Guantánamo.