Updated

The Senate narrowly rejected legislation on Wednesday that would have given military detainees the right to protest their detention in federal court.

The 56-43 vote against the bill, by Sens. Patrick Leahy, D-Vt., and Arlen Specter, R-Pa., fell four votes shy of the 60 needed to cut off debate. It was a blow for human rights groups that say a current ban on habeas corpus petitions could lead to the indefinite detention of individuals wrongfully suspected of terrorism.

President Bush and conservative Republicans counter that the ban, enacted last year, was necessary to stem the tide of legal protests flooding civilian courts.

Leahy said he would try again to repeal it, although he was not sure when he would get another chance.

"The truth is that casting aside the time-honored protection of habeas corpus makes us more vulnerable as a nation because it leads us away from our core American values," Leahy said. "It calls into question our historic roll as a defender of human rights around the world."

In 2006, Congress passed and Bush signed into law the Military Commissions Act, which established a military-run tribunal system for prosecuting enemy combatants. The provision barring habeas corpus petitions means that only detainees selected for trial are able to confront charges against them, leaving most military detainees in custody without a chance to plead their case.

Sen. Lindsay Graham, R-S.C., one of the architects of the law, said the system includes checks and balances to determine whether a person is being held unlawfully. Granting a ban on habeas corpus petitions would allow terrorism suspects to go "judge shopping" around U.S. courts to find a sympathetic ear, he said.

Added Sen. Jon Kyl, R-Ariz.: "Never has such an unprecedented legal right been granted to a prisoner of war or detainee."

In June, the Supreme Court agreed to consider whether the ban on habeas corpus petitions is constitutional, although no argument date has been set.

Specter, the lone Republican to cosponsor the bill, has said he anticipates the court will rule the ban unconstitutional.

Habeas corpus "is a constitutional right that has existed since the Magna Carta in 1215," he said.