The Supreme Court's complicated holdings in three cases involving detainees from the battle against terrorism may not result in any prisoners going free -- the justices yesterday left that for lower courts or tribunals to decide.

But the opinions, concurrences and dissents were decisive on this: They represent a nearly unanimous repudiation of the Bush administration's sweeping claims to power over those captives.

Liberal or conservative mattered little in the ultimate outcome. The court roundly rejected the president's assertion that, in time of war, he can order the "potentially indefinite detention of individuals who claim to be wholly innocent of wrongdoing," to quote the court's opinion in the case of foreign prisoners held at the U.S. base in Guantanamo Bay, Cuba. In fact, the administration's claim to such power over U.S. citizens produced an opinion signed by perhaps the court's most conservative justice, Antonin Scalia, and possibly its most liberal, John Paul Stevens.

"The very core of liberty secured by our Anglo-Saxon system of separated powers has been freedom from indefinite imprisonment at the will of the Executive," Scalia wrote, with Stevens's support.

In this way, the court's rejection of the executive-power arguments in the cases might be seen as part of a reemergence of the other branches of government from the shadow of the Sept. 11, 2001, terrorist attacks. As the justices suggested several times in their opinions, emergency measures that might have been within the president's power in the days and weeks just after 9/11 now must be reconciled withAmerican norms of due process. In that sense, the cases struck a chord with congressional hearings into the rules for prisoner interrogations at U.S. prisons in Iraq and Afghanistan.

Given that the administration has said its war on terrorism might stretch over generations, Justice Sandra Day O'Connor wrote, the "indefinite detention" of a prisoner "could last for the rest of his life." And that, the court said, is too long to do without the basics of due process.

Only Justice Clarence Thomas embraced the administration's positions without reservation, referring in a dissenting opinion to "the breadth of the President's authority to detain enemy combatants, an authority that includes making virtually conclusive factual findings" that the Supreme Court is powerless to "second-guess."

Each case before the court presented slightly different facts -- there was a case asking whether foreign prisoners captured in the terrorism war had a right in U.S. courts to challenge their imprisonment, a case asking whether a U.S. citizen could be held as an "enemy combatant" without a hearing of some kind, and a case challenging the short-circuiting of a criminal case against accused terrorist Jose Padilla, a U.S. citizen, by placing him in military custody as an enemy combatant.

But the justices used the cases to wrestle with one of the core dilemmas of a free society: How can strength be balanced with liberty? Or, put another way, what are the limits on a leader's power in a crisis?

"The defining characteristic of American constitutional government is its constant tension between security and liberty," Justice David H. Souter wrote.

And so the opinions drew heavily on some of the oldest and weightiest precedents in the book. Starting with King John's promise in the Magna Carta, signed in 1215, that "no free man should be imprisoned . . . save by the judgment of his peers or by the law of the land," the justices traced the limits on executive power through English common law, on through the Federalist Papers and down a long a line of precedents forged in some of the darkest hours of the nation, including the Civil War and World War II.

"We have long since made clear that a state of war is not a blank check for the President when it comes to the rights of the Nation's citizens," O'Connor wrote in a painstakingly nuanced opinion ordering a hearing for U.S. citizen Yaser Esam Hamdi, who was taken captive in Afghanistan.

The justices left unresolved exactly how tightly they intend to try to rein in the president. All of them paid deference to the heavy responsibility of the commander in chief and his duty to keep the country secure. Even as they reaffirmed the bedrock principle of checks and balances, they left Bush and his successors substantial room to operate.

They admonished lower courts to tread carefully on national security matters. They resolved the Padilla case -- which could have been the most provocative -- on narrow jurisdictional grounds. And they stopped far short of ruling that citizens who are designated enemy combatants must be charged as criminals and given the full access to the courts that would entail.

This moderation ultimately left the court's liberal wing unsatisfied. Stevens, joined by Justices Souter, Ruth Bader Ginsburg and Stephen G. Breyer, argued passionately that the Padilla case should have been dealt with head on. "At stake in this case is nothing less than the essence of a free society. . . . Unconstrained Executive detention for the purpose of investigating and preventing subversive activity is the hallmark of the Star Chamber," he wrote.

Yet if, in the end, the justices could not agree on exactly how far the president can go, they were clear that he had already gone too far.