A U.S. soldier walks next to the razor-wire-topped fence at the abandoned Camp X-Ray detention facility at Guantanamo Bay, Cuba. (Mladen Antonov/AFP/Getty Images)

The Senate voted Thursday to pass a $612 billion defense bill, setting lawmakers up for a showdown with the White House over measures that would bypass mandated spending cuts and threaten President Obama’s plan for closing the military prison at Guantanamo Bay, Cuba.

Senators passed the bill, which authorizes annual defense programs, in a 71-to-25 vote. Sen. John McCain (R-Ariz.), chairman of the Armed Services Committee, told reporters he hoped the bill would become law despite a White House veto threat.

The bill’s provisions on Guantanamo Bay are particularly sensitive for the White House as Obama approaches the end of his second term and officials race to make good on his 2009 promise to close the detention facility.

The legislation tightens restrictions on resettling detainees in other countries, a key aspect of Obama’s closure plan. Officials have sent more than a dozen prisoners to third countries since late last year in hopes that a smaller Guantanamo population would make it easier to shut the prison.

The bill would require the Pentagon to certify that countries welcoming Guantanamo detainees will ensure they “cannot engage or reengage in any terrorist activity,” and it would also ban sending any detainees home to Yemen. Yemenis make up the largest single group among the 51 prisoners cleared for transfer.

While the bill contains a provision that would allow the Obama administration to transfer prisoners to the United States for trial or detention, it would require congressional approval of a White House plan for doing so. Many lawmakers oppose releasing or moving any of the prison’s 116 inmates, most of whom have been locked up for over a decade without being charged.

“Not only would provisions of the bill extend existing restrictions, they would impose additional unwise and unnecessary ones that would further impede efforts to responsibly close the facility,” the White House wrote in an assessment of the bill early this month.

The Obama administration also denounced the bill’s use of a special war fund as a way to compensate for across-the-board spending cuts enacted in 2013. Sen. Jack Reed (R.I.), the Armed Services Committee’s senior Democrat, voted against the bill because of its reliance on an Overseas Contingency Operations (OCO) account, as the war fund is known.

Democrats have opposed Republican attempts to protect defense spending from budget “sequestration” levels by adding money to the OCO account.

Immediately after passing the bill, Senate Democrats voted to block consideration of a parallel defense appropriations bill, even as it gives Republicans an opening to attack them as unwilling to support the military at a time of increasing global threats.

“It is not a vote against the Department of Defense, it’s not really a vote against this bill itself,” said Minority Whip Richard J. Durbin (D-Ill.) on Tuesday. “It’s a vote against this appropriations process. We need to sit down and govern and do it in a bipartisan fashion.”

mike.debonis@washpost.com