Conservative legal activists view the two men as remarkable successes in Bush's quest to move the court to the right, and that is part of the reason that, as the court begins its work anew today, public attention is focused less on the cases at hand than on the court's future.

"A President Obama or a President McCain will likely be handed an opportunity to affect the makeup of the Supreme Court that is unprecedented in our history," said Wendy Long, chief counsel for the Judicial Confirmation Network, which was active in generating public support for the confirmations of Roberts and Alito.

Obama, supported by a strongly Democratic Senate, could be presented with three openings during his first term, said Walter Dellinger, a prolific Supreme Court practitioner who was acting solicitor general in the Clinton administration.

"President Obama is going to be able, I think, to name whoever he wishes to the court and have that person confirmed," Dellinger said last week during a discussion at the Institute of Bill of Rights Law at William and Mary Law School.

But whether that would alter the court's basic dynamic is hardly clear.

The court is roughly balanced on important constitutional issues, with four consistent conservatives, four liberals and, in the middle, Justice Anthony M. Kennedy, who leans right on many issues but often joins liberals on some of the court's most controversial decisions.

Replacing liberals Stevens, Ginsburg and Souter with similar-minded justices would infuse the left wing of the court with younger leadership but leave the basic balance intact.

"What you really want to do in reshaping the court is change the median justice," said John McGinnis, a constitutional law expert and professor at Northwestern University. "That changes a lot more votes in the long run than just exchanging one liberal for another or one conservative for another."

To that end, advantage McCain.

The ages of the justices -- Souter is the youngest on the left, and Antonin Scalia is the oldest on the right at 72 -- favor the likelihood that the first opening would come from the liberal side. Stevens, although robust and in good health, is the second-oldest justice in the court's history. The fourth liberal is Justice Stephen G. Breyer.

Replacing one of the liberal justices with a consistent conservative such as Roberts and Alito -- the two McCain has said would serve as models for his picks -- could have far-reaching consequences on issues such as abortion, church-state separation, racial preferences and executive privilege.

But, as other presidents have found, justices take seriously their lifetime appointments and their legacies.

"We know from history that people generally do not leave the court when they're going to be replaced by someone they don't think is very much like them ideologically," McGinnis said.

Even if McCain has the chance to replace one of the liberals, he would face a formidable obstacle if Democrats control more than 55 seats in the Senate.

"It would be impossible for him to get somebody who's extremely conservative confirmed in . . . a Democratic Senate," said lawyer Miguel Estrada, whose nomination to a federal appellate court was blocked by Democrats.

McCain's best bet to appoint someone close to his "ideological ideal point," McGinnis said, would be to nominate a woman or a minority, who might be more difficult for Democrats to oppose. The last three appointments to the court have been white men, and there has never been a Hispanic justice.

Although there is no doubt the candidates would appoint very different people to the high court and lower federal judgeships, they also present a striking contrast in how they might approach the job.

"He knows these issues," Sunstein said. "I'd be very surprised if he wasn't extremely involved" in choosing nominees," Sunstein said, though he added that he has not had conversations with Obama about the qualities the Democrat would seek in a nominee.

Obama opposed Roberts and Alito and has mentioned Ginsburg, Souter and Breyer as models, although it was unclear whether he was looking only at the current court, rather than past justices, for examples.

Obama said in a speech this year that the court is in agreement much of the time. But on the important constitutional issues that divide the justices, "adherence to precedent and rules of construction will only get you through 25 miles of the marathon," Obama said.

"That last mile can only be determined on the basis of one's deepest values, one's core concerns, one's broader perspectives on how the world works and the depth and breadth of one's empathy."

McCain mocked such standards in a speech in May on the role of the judiciary, calling them "vague words" that "attempt to justify judicial activism."

McCain said he would appoint judges "who have a proven record of strict interpretation of the Constitution of the United States."

The Judicial Confirmation Network's Long said McCain's speech offered more details than "any presidential candidate in history" about the qualities he would look for in judges. But the judiciary has not been one of McCain's areas of specialty during his long tenure in the Senate, and others describe his interest as more of an outreach to conservatives, who consider the issue very important and have had a sometimes rocky relationship with him.

When the court narrowly decided that detainees held in the military prison at Guantanamo Bay, Cuba, have the right to access federal courts, McCain called it one of the "worst decisions in history." Asked two months later what prompted such a strong denunciation, he said: "Sometimes I'm given to a little hyperbole."

Both men have ready evidence that even justices they hold up as examples do not always decide issues the way they would like. Roberts and Alito are deeply suspicious of McCain's landmark legislative accomplishment, the McCain-Feingold campaign finance reform bill, and have voted to strike parts of it as unconstitutional.

Likewise, Ginsburg and Breyer were in the majority of a case that Obama said was wrongly decided, when they struck down the death penalty for the rape of a child.

Even the charge of "judicial activism" -- which is sometimes measured by a court's readiness to overrule legislation approved by a democratic body -- is becoming harder to define. Liberals, along with Kennedy, rejected Congress's mandate on the legal options for terrorism detainees. Conservatives, along with Kennedy, set aside the District of Columbia's gun-control law.

"The parties often argue about which is the party of judicial activism and which is the party of judicial restraint," Dellinger said. "I think it's pretty much a scoreless tie."