For nearly ten years now, Guantanamo Bay’s military prison has been an international symbol of United States lawlessness and a recruiting boon for al-Qaeda. If Congress gets its way the facility will stay that way for the indefinite future. Both houses of Congress have now approved versions of the National Defense Authorization Act (NDAA), a bill that would require the use of military detention and military courts for suspected terrorists and make it virtually impossible to close Guantanamo.

There are many reasons to object to the bill’s detention provisions. They will foreseeably mandate arbitrary detention, and needlessly subject persons to military trials of doubtful legality that selectively impose second-class justice on foreign nationals. But even if you put all such human rights concerns aside, the provisions will be disastrous for national security. This is why the bill has already generated public opposition from FBI Director Robert Mueller, Secretary of Defense Leon Panetta, CIA Director David Petraeus, Director of National Intelligence James Clapper, White House Advisor for Counterterrorism John Brennan, and DOJ National Security Division head Lisa Monaco. And yet it is likely to become law—it is now in a “conference committee” to work out differences between the Senate and House versions—unless President Obama carries out his threat to veto it.

Why is Congress so intent on this law? Everyone who has had to represent the United States to the outside world has acknowledged that Guantanamo—and the military detention system operated there—are a disaster for our foreign policy and national security. That’s why President Bush, Colin Powell, Condoleezza Rice, Robert Gates, and John McCain all recognized that the United States would be better off with the prison closed. As former Navy General Counsel Alberto Mora told the Senate Armed Services Committee in 2008, “there are serving US flag-rank officers who maintain that the first and second identifiable causes of US combat deaths in Iraq—as judged by their effectiveness in recruiting insurgent fighters into combat—are respectively the symbols of Abu Ghraib and Guantanamo.” President Obama himself—who came to office with a pledge to close the prison within one year—has said that “the existence of Guantanamo likely created more terrorists around the world than it ever detained.”

But a majority of lawmakers—including members of both parties—have placed “not in my backyard” politics above the judgements of national security officials. They are unwilling to contemplate the prospect of moving a single Guantanamo prisoner to the United States, or to risk any chance of recidivism from those who might be released elsewhere. And they also seem to think they are better situated than the executive branch to decide how terrorist suspects should be detained and tried.

In previous years, without Congressional intrusion, the military was able to reduce the prison population at Guantanamo from a high of 775 in the early 2000s to less than 200 in 2010. President Bush himself released over 500 detainees, at a time when Congress wisely left such decisions to the Commander-in-Chief. But since then, legislative restrictions on transfer decisions have blocked the release of any of the remaining 171 prisoners, despite the fact that 89 of them—more than half—have been officially cleared by a joint review team comprised of the military, the CIA, the FBI, and the NSC.

Extending these restrictions, the House version of the new NDAA bars the transfer or release of any Guantanamo detainees into the United States, while both the Senate and House bills effectively bar their transfer to a foreign country—where more than 600 detainees have already been sent. A transfer to a foreign nation would be authorized only if the Secretary of Defense is able to certify that the recipient nation can ensure “that the individual cannot engage … in any terrorist activity,” and agrees in advance to share full information with the United States regarding the individual and his associates. The apparent rationale is to prevent former inmates from engaging in terrorism against the US. But Defense Department General Counsel Jeb Johnson has said it is nearly impossible to provide such assurances. And the transfer provisions apply even to detainees who have been conclusively determined to pose no threat.

These arbitrary restrictions will prove staggeringly costly. The McClatchy News Service has estimated that it costs approximately $800,000 a year to house an inmate at Guantanamo. That means we are now paying more than $70 million a year just to house the 89 detainees whom the executive has determined no longer need to be held at all. The new legislation would effectively make this state of affairs permanent, forcing the government to spend more money to make the country less safe.

The bill would also require the use of military detention rather than civilian arrest for terrorist suspects thought to be associated with al-Qaeda or the Taliban, thereby gravely interfering with the president’s discretion to arrest and prosecute terrorists in the civilian criminal justice system. A provision in the Senate version of the bill requires military custody for noncitizens alleged to be part of al-Qaeda, the Taliban, or “associated forces” who have participated in an attack or planned attack against the United States barring a specific waiver from the Secretary of Defense, Secretary of State, and Director of National Intelligence. The House bill imposes similar limits, banning federal court trials for any foreign national accused of terrorism who could in theory be tried in a military commission.

Military detention and trial are already options for such individuals under current law, so these provisions would in no way expand the tools available to protect us. To the contrary, they would limit the president’s options by requiring military detention and trials even where better results could be obtained using criminal prosecution in ordinary courts. The Bush and Obama administrations have prosecuted well over one hundred people for terrorist crimes in US criminal courts, many of them associated with al-Qaeda, and have in many cases obtained valuable information from the defendants. The NDAA bill would block such arrests and prosecutions, even in the United States, unless the FBI could get the Defense Secretary, Secretary of State, and Director of National Intelligence together to agree that a waiver should be granted. Moreover, such restrictions on civilian criminal trials are likely to lead many of our allies to refuse to extradite suspects to the United States for trial.

In short, Congress’s bill is a disaster on pure security grounds—even without regard to human rights concerns. It would render the United States less able to respond to the threats we face, and force us to spend money continuing to imprison persons who have been found to pose no threat. Under current law, the executive branch has multiple options for responding to Al Qaeda suspects. It can try them in civilian courts, and has done so successfully on many occasions. It can try them before military commissions, a largely untested procedure that thus far has provided nothing but headaches for the administration and propaganda victories for the enemy. And it can hold them in military detention, and release them when it determines that their detention is no longer necessary. But if Congress has its way, the administration will have fewer options, not more, and will be less equipped to keep us safe. Unless the conferees remove these restrictions, President Obama has no choice but to carry out his veto threat. Our national security requires no less.