The Senate, in a little-noticed but positive move, voted last Tuesday to give President Obama new leeway to move toward closing the prison in Guantánamo Bay, Cuba.

In recent months, Mr. Obama has renewed his promise to shut the facility, appointing envoys to find places for prisoners who have already been approved for transfer to other countries and those who may be approved later.

An amendment to the military authorization bill offered by Kelly Ayotte, a New Hampshire Republican, would have extended the transfer restrictions that required the defense secretary to go through a cumbersome process to proceed with transfers to foreign countries, barred transfers to Yemen and extended the ban on transfers to the United States. Her measure got just 43 votes.

There are now 164 prisoners at Guantánamo, including 84 who, in 2010, were cleared for transfer to their home country or another willing country. Defense Secretary Chuck Hagel has put the cost of operating the prison at about $454 million a year or $2.7 million per detainee. More fundamentally, Guantánamo has stained America’s commitment to human rights and continues to serve as a potent recruiting tool for America’s enemies.