A guard walks through a cellblock inside Camp V at Guantanamo Bay on March 5, 2013. (BOB STRONG/REUTERS)

by Missy Ryan

and Julie Tate

The Senate on Thursday took a step toward approving a measure that, if passed into law, could derail President Obama’s plan for shutting the military prison at Guantanamo Bay before he leaves office.

In a 14 to 12 vote, the Senate Armed Services Committee approved a bill, sponsored by Kelly Ayotte (R-N.H.), John McCain (R-Ariz.), Lindsey O. Graham (R-S.C.) and Richard Burr (R-N.C), that would reinstate more restrictive standards for sending detainees at the facility at Guantanamo Bay, Cuba, to third countries.

It would also extend rules barring the movement of prisoners to the mainland United States for two years, until after Obama steps down in early 2017, and would impose a two-year suspension on the transfer of any detainees ever categorized by the United States as posing a high or medium risk to the United States or its allies.

While the Pentagon no longer uses such designations, all remaining detainees at Guantanamo were at one time categorized as either “high risk” or “medium risk,” according to military dossiers made public by WikiLeaks.

The measures would effectively sink the administration’s redoubled effort to make good on one of Obama’s earliest national security promises, which has remained out of reach because of congressional opposition to freeing detainees or bringing them to the United States for trial.

Eric Schultz, the principal deputy press secretary at the White House, said Obama would veto the legislation. Since taking office, Obama has vetoed only two bills.

“When the administration transfers a Guantanamo detainee, especially those formerly assessed as a high or medium risk for reengagement in terrorism, the onus is on the administration to explain openly to the American people what has changed — particularly when nearly 30 percent of former Guantanamo detainees are suspected or confirmed of reengaging in terrorism,” Ayotte said in a statement. “It is a simple matter of transparency and honesty with the American people.”

The bill also would compel the administration to provide the public more information about remaining detainees.

Secrecy continues to shroud the prison at Guantanamo Bay, which houses 122 detainees, roughly half the number held there when Obama took office in 2009. Most have never been charged with a crime.

The transfer of detainees to third countries is particularly problematic for lawmakers who fear former prisoners will resume the fight once they are set free.

Just this week, the Pentagon said that a drone strike in Afghanistan killed a former Guantanamo prisoner who was believed to have been recruiting militants for the Islamic State.

But officials have accelerated steps in recent months to send detainees to allied nations. Since the beginning of 2014, 33 detainees have been transferred to third countries. More than 50 others are cleared for transfer.

The flurry of transfers ended a virtual halt to such activity in 2011 and 2013, and resulted from lawmakers’ decision to relax rules that required the secretary of defense to provide strong assurances about the security risks posed by the detainees. Those rules would be tightened anew in the new legislation.

The prohibition against bringing prisoners to the United States would pose a particular problem for the Obama administration, which is hoping that prisoners who are deemed to be too dangerous to release and cannot be tried would eventually be moved to detention facilities in the United States.

The bill is not expected to go to an immediate vote in the full Senate.