With their vote Wednesday to effectively halt President Obama's effort to shutter the Guantanamo Bay prison for terror suspects, U.S. House members of both parties no doubt took a stand that they regard as necessary to safeguard the nation. It's likely, though, that it could have the opposite impact.

There's certainly no doubt that the decision to retain Guantanamo comes with a steep price in the continued erosion of American prestige. As long as U.S. policy is for the open-ended detention of terror suspects who have little prospect of their day in court, the nation fails to live up to its core democratic values.

That's why the president's stated resolve to try as many suspects in the federal courts as possible is the right way to handle those Guantanamo detainees who cannot be released. Convicted terrorists would serve time in a special U.S.-based prison, so that Guantanamo could be closed.

Now, though, the Cuba prison serves as a recruitment tool for al-Qaeda and other terror groups. It may even be minting terrorists, since a new report finds that more than 25 percent of the nearly 600 detainees who have been released have taken up arms or are working against U.S. antiterrorism efforts.

House approval of a spending bill that bars any funds for a replacement prison or the transfer of prisoners from the Cuba facility handcuffs the president on a matter of national security. How that makes Americans safer is anybody's guess.