House Republicans retaliated by voting to forbid transferring any Guantánamo detainees anywhere, although that may not become law. Sharp tensions remain.

“I don’t see any support in the House for relaxing the current restrictions, or backing off our ban, in light of the president’s recent violation of the law,” said Representative Howard McKeon, the California Republican who is chairman of the House Armed Services Committee.

Still, Mr. Sloan argued that it is possible the politics could change if most of the low-level prisoners can be transferred. Relocating a population of less than 100 to a domestic prison would be a smaller problem, he said. And reducing the number of detainees would cause the expense of Guantánamo per detainee to soar further.

Taxpayers are spending about $443 million on the prison in 2014, including the cost of flying legal teams here for every commission hearing. Housing a federal inmate in a domestic maximum-security prison costs far less, $30,280 in 2013, according to the Bureau of Prisons, although that does not include court costs.

Legal Scrutiny

Meanwhile, the government is bracing for a wave of new habeas corpus lawsuits after combat operations in Afghanistan come to an end in December, raising the question of whether the legal basis for wartime detentions — the 2001 authorization to use military force against the perpetrators of the Sept. 11 attacks — has expired.

J. Alan Liotta, the top Pentagon detainee affairs official, said that he expects the detention authority to remain viable because most detainees are considered part of Al Qaeda or an associated force, rather than solely Taliban, and the broader armed conflict continues.