Barack Obama’s efforts to fulfil his promise of closing the Guantánamo Bay detention centre before he leaves office were dealt a significant blow on Tuesday as the Senate passed legislation preventing the administration from relocating prisoners to the United States.



The National Defense Authorization Act (NDAA), which has the primary purpose of setting the US Defense Department budget, passed the Senate by an overwhelming majority of 91-3 in a faster-than-usual passage through Congress, designed in part to frustrate White House plans to announce a new Guantánamo closure strategy.



An earlier version of the NDAA was vetoed by the White House due to a separate row over budgeting, but this second attempt, which was passed by the House of Representatives last week, contains language blocking the transfer of prisoners to mainland US facilities.



The legislation now goes to the White House for the president’s signature, but will not be vetoed this time around due to the political necessity of funding the Defense Department – leaving the administration with much less room for manoeuvre as it seeks a solution to the long-running Guantánamo problem.



Obama has been in a standoff with Congress over what to do with remaining prisoners at the US base in Cuba almost ever since he assumed office. But he is preparing to unveil a new strategy in the next few days.



White House officials have told the Guardian that a rump of 50-60 of the remaining 112 detainees who are judged too dangerous to be let loose but impossible to try in civilian courts because evidence against them was gathered through intelligence or on the battlefield in Afghanistan should be moved to US facilities.



If Obama is not able to persuade Congress to accept such a plan, he could have attempted to force it through by using his executive authority – but this is now hugely complicated, if not impossible, after the passage of the NDAA.



Newly elected Republican House speaker Paul Ryan made clear Obama would not be able to resort to executive action to bypass Congress. “He can’t. He doesn’t have the authority to do it. It’s just that clear. We passed the bill in the House with 390 votes, well over enough to override a veto. The Senate today passed this bill with 91 votes, well over what is necessary to override a veto. And the language is very clear that it can’t transfer the prisoners.”

Congress had previously barred the Obama administration from transferring detainees to US soil, but the legal clause was contained in an earlier defense bill and would have ceased to have any force unless it was added to the new legislation. The drama of recent days lies in the way the Republican-controlled Congress reacted by rushing through the bill in response to persistent Washington chatter that a new Obama closure plan was set to be announced.

The Senate majority leader, Mitch McConnell, has also said he planned to include similar language in another “must-pass” piece of legislation on veterans’ benefits.



“Each of these bills contains a clear bipartisan prohibition on the president moving Guantánamo terrorists into the backyards of the American people,” said McConnell before the vote on Tuesday. “Both of these bills include restrictions on moving terrorists into our country.”



The White House quickly confirmed the president would have to sign the legislation but denied this meant that its upcoming plan for closing Guantánamo was, in the words of one reporter, “dead on arrival”.

“This doesn’t have any material impact on our ability to put together a thoughtful and considered plan,” spokesman Josh Earnest replied, pointing out that Congress had been “obstinate” on the issue for many years already.

“The inclusion of these provisions is an unfortunate perpetuation of [the] status quo,” he added, accusing Republicans of maintaining their opposition for “narrow and trivial political interests”.

The White House believes the continued presence of detainees in Cuba is a major public relations advantage for Islamic militants around the world, and argues its closure would help not hinder efforts to fight terrorism.

“We have long expressed our disappointment at the repeated efforts by Congress to impede the closure of the prison at Guantánamo Bay,” said Earnest. “The president believes that closing this prison is a national security priority.”

Nevertheless the timing of the vote, and its support by most Senate Democrats, is an embarrassing rebuke for Obama, who has also recently had to abandon his other key election pledge of withdrawing all US troops from Afghanistan.

“Our problem with closing this facility is with Democrats too,” acknowledged Earnest. “It’s up to Democrats who are blocking our efforts to explain how it is in the interests of our national security.”

Guantánamo: the five key Obama quotes

“Why don’t we close Guantánamo and restore the right of habeas corpus, because that’s how we lead – not with the might of our military, but the power of our ideals and the power of our values. It’s time to show the world we’re not a country that ships prisoners in the dead of night to be tortured in far-off countries. We’re not a country that runs prisons which locks people away without ever telling them why they’re there or what they’re charged with.” – Take Back America conference, 19 June 2007

“The detention facilities at Guantánamo for individuals covered by this order shall be closed as soon as practicable, and no later than one year from the date of this order.” – Executive order signed on third day in office, 22 January 2009



“Guantánamo is not necessary to keep America safe. It is expensive. It is inefficient. It hurts us in terms of our international standing. It lessens cooperation with our allies on counter-terrorism efforts. It is a recruitment tool for extremists. It needs to be closed. – White House press conference on 100th day of second term, 30 April 2013

“History will cast a harsh judgment on this aspect of our fight against terrorism, and those of us who fail to end it. Imagine a future – 10 years from now, or 20 years from now – when the United States of America is still holding people who have been charged with no crime on a piece of land that is not a part of our country … Is that who we are? Is that something that our founders foresaw? Is that the America we want to leave to our children? – ‘Future of fight against terrorism’ speech, 23 May 2013

“And with the Afghan war ending, this needs to be the year Congress lifts the remaining restrictions on detainee transfers and we close the prison at Guantánamo Bay – because we counter terrorism not just through intelligence and military action, but by remaining true to our constitutional ideals, and setting an example for the rest of the world.” – State of the union address, 28 January 2014