gitmo protest
Activists of Amnesty International stage a protest in Berlin's Potsdamer Platz against U.S. military prison at Guantanamo Bay during U.S. President Barack Obama's visit to Berlin, June 19, 2013. Reuters/Christian Ruettger

A bill that would restrict U.S. President Barack Obama’s ability to transfer terror suspects out of the Guantanamo Bay prison facility passed a Senate panel on Friday. Obama has said he intends to veto the bill.

The Armed Services Committee voted 14-12 for the bill, sponsored by Senator Kelly Ayotte of New Hampshire and backed by Senate John McCain of Arizona, The Associated Press reported.

Obama said in 2008 that he would close the federal prison, but his efforts have been repeatedly blocked by Congress over the last six years.

"Our position is that the continued operation of Guantanamo Bay weakens our national security and must be closed," Obama's spokesperson Eric Schultz told reporters aboard Air Force One, according to AP. "We believe this bill puts more constraints on a process that should be actually working faster. And so we oppose this legislation and the president would veto it."

The legislation would suspend the transfer of high and medium risk detainees from the prison to the United States or elsewhere during the president’s final two years in office. It also overrides existing laws that allow low risk prisoners to be transferred to third countries.

It would reinstate a ban on transferring prisoners to Yemen. Many of the remaining prisoners belong to Yemen, which has recently fallen into political turmoil as its government collapsed. The U.S., Britain and France evacuated their Yemeni embassies last week.

In addition, the proposed law would require that an unclassified report on the activities of the suspects be furnished by the administration.

Senator Ayotte welcomed the decision. "When the administration transfers a Guantanamo detainee, especially those formerly assessed as a high- or medium-risk for re-engagement 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 re-engaging in terrorism," he told AP.