WASHINGTON – The U.S. Supreme Court this morning found President Bush exceeded his powers by creating military tribunals for prisoners at the much-maligned Guantánamo Bay detention center, reining in a portion of the administration’s prosecution of the war on terrorism.

The 5-3 ruling, a setback for the administration’s aggressive anti-terrorism stance, was written by Justice John Paul Stevens, who said the proposed trials violate U.S. law and the Geneva Conventions, signed by the United States in the aftermath of World War II.

”Trial by military commission raises separation-of-powers concerns of the highest order,” Justice Anthony M. Kennedy wrote in a concurring opinion. The decision does not address whether the controversial camps should be closed, dealing only with whether the administration can pursue plans to try the detainees under the type of military trials not seen since World War II.

President Bush said he will work with Congress to find a way to try the detainees before military tribunals — and two leading Republicans suggested they’re ready to help.

”To the extent that there is latitude to work with the Congress to determine whether or not the military tribunals will be an avenue in which to give people their day in court, we will do so,” Bush said at a press availability with Japanese Prime Minister Junichiro Koizumi. “The American people need to know that the ruling, as I understand it, won’t cause killers to be put out on the street.”

Bush stopped short of saying the ruling would hasten efforts to close the prison — as many world leaders have encouraged him to do.

”We will seriously look at the findings, obviously,” Bush said, noting he’d only had a ”drive-by” briefing on the decision. “And one thing I’m not going to do, though, is, I’m not going to jeopardize the safety of the American people. People have got to understand that. I understand we’re in a war on terror; that these people were picked up off of a battlefield; and I will protect the people and, at the same time, conform with the findings of the Supreme Court.”

Republican Sens. Lindsey Graham of South Carolina and Jon Kyl of Arizona, who back Military Commissions, were quick to announce they’d help Bush with a legislative fix.

”We are disappointed with the Supreme Court’s decision. However, we believe the problems cited by the court can and should be fixed,” the two said in a joint statement.

Graham and Kyl said they found it ”inappropriate” to try terrorists in civilian courts, arguing it threatens national security and puts jurors in danger.

”In his opinion, Justice [Stephen] Breyer set forth the path to a solution of this problem,” the senators said, ‘He wrote, `Nothing prevents the president from returning to Congress to seek the authority he believes necessary.’ ”

The case was brought by Osama bin Laden’s one-time driver, Salim Hamdan, one of hundreds of men flown to the Guantánamo camps, which opened in early 2002 as a site for the United States to hold and interrogate al Qaeda and Taliban suspects flown in from Afghanistan.

The president created special Military Commissions to try 10 or more of some of the 450 captives being held there. But Hamdan challenged the legal proceedings, arguing that they violate international law and the U.S. Constitution.

Stevens agreed, writing that the commission ”lacks the power to proceed because its structure and procedures” violate both U.S. law and the Geneva Conventions.

But Justice Clarence Thomas, in a sharply worded dissent, disagreed, saying the decision “openly flouts our well-established duty to respect the executive’s judgment in matters of military operations and foreign affairs.”

The decision, Thomas noted, would ”sorely hamper the president’s ability to confront and defeat a new and deadly enemy” and he called his colleagues’ ”willingness to second-guess” the president “both unprecedented and dangerous.”

But lawyers for the detainees hailed the ruling as upholding the Geneva Conventions, which governs the treatment of prisoners of war.

”We’re looking at this with welcome hopefulness that the democratic institutions in this country are stepping forward to take their power back from a president [who] has tried to seize it for the last five years,” said Barbara Olshansky, an attorney with the Center for Constitutional Rights, which represents hundreds of detainees.

”The court has clearly stated that the president cannot invoke wartime powers to circumvent U.S. laws and international treaties that the United States has ratified,” said Amnesty International attorney Jumana Musa, who had been a Pentagon-approved observer at the commissions.

In arguments before the court in March, Neal Katyal, Hamdan’s attorney, said the Pentagon had concocted a conspiracy charge that isn’t a war crime, had ignored rights retained in the Geneva Conventions, such as prisoner-of-war status, and fell short of standards that Congress has set for how the United States conducts either military and civilian justice.

”This is a military commission that is literally unbounded by the laws, Constitution and treaties of the United States,” he told the court.

Critics have argued that the accused would be more fairly treated in the civilian courts or through a traditional military court martial.

But Solicitor General Paul Clement argued on behalf of the United States that Congress had given President Bush the power to craft the Military Commissions when it authorized the use of force after the Sept. 11, 2001, terrorist attacks. He called such commissions “part and parcel of the [presidential] war power for 200 years.”

The ruling is all but certain to increase international scrutiny and calls for the camps’ closure — pressure that has mounted following the suicides earlier this month of three captives.

Bush has acknowledged the camps hurt U.S. credibility abroad and has said he’d like to close the detention center — but warns it holds dangerous detainees who should be tried for their crimes. Others, he said, can be released, but the United States has had difficulty finding suitable countries to accept them.

The State Department has said U.S. diplomats are seeking agreements with dozens of countries to let some detainees return home, while seeking assurances from their native countries that the men won’t threaten U.S. soldiers, security or American targets.

But State Department officials said the task is complicated by a number of countries that deny the detainees are actually nationals of their countries.

And the U.S. has ruled out repatriation to some nations, including China, for fear that Muslim nationals now held at Guantánamo would be tortured if returned to the communist country.

One detainee has been returned to Iran, but the administration continues to detain two dozen Algerians, along with Iraqis, Libyans, Palestinians, Somalis, Sudanese, Syrians and Uzbeks — men from countries that are either too unstable or have human rights records that would suggest the U.S. is unable or unwilling to negotiate their return.

The Pentagon, however, announced last Saturday that it had sent 14 Saudi detainees home, the second major transfer in little more than a month.