Sen. John McCain blasted the recent Supreme Court ruling that detainees at Guantanamo Bay may not be held indefinitely without court review.
The Arizona senator and presumptive Republican presidential nominee called it "one of the worst decisions in the history of this country."
By contrast, likely Democratic nominee Sen. Barack Obama praised the Guantanamo decision as "an important step toward re-establishing our credibility as a nation committed to the rule of law."
The winner of the McCain-Obama showdown in November may have the task of replacing two or three of the five justices who rendered that decision.
Justices John Paul Stevens, 88, and Ruth Bader Ginsburg, 75, are considered likely to retire from the court within the next four years. Justice David Souter, 68, is reported to be eager to return to his New Hampshire home.
The Guantanamo case, which illustrates the presidential candidates' different philosophies on national security and terrorism, is just one of the issues swirling around campaign discussions about the direction of the Supreme Court. Other differences include questions of corporate conduct and the emotionally charged right to abortion as defined by the 1973 case Roe v. Wade.
Sen. Jon Kyl, R-Ariz., a McCain ally, said Obama's own statements demonstrate he would nominate justices who would slant court decisions away from the rule of law.
"His test is someone with empathy for poor people and minorities," Kyl said. "That is not the test for a Supreme Court justice.
"John McCain has said he wants a judge who will judge and not make law, like (John) Roberts and (Samuel) Alito," Kyl said. "Nothing else should matter except, under the law, who's entitled to win."
In an appearance last month on CNN, Obama said he favors "a judge who's sympathetic enough to those who are on the outside, those who are vulnerable, those who are powerless."
The Illinois senator qualified the comment with the observation that such sympathy is important only in the small percentage of cases "where the law isn't clear, and the judge then has to bring in his or her own perspectives, his ethics, his or her moral bearings."
Sen. Patrick Leahy, D-Vt., an Obama supporter, said Alito and Chief Justice Roberts, both appointed by President Bush, have steered the court in a direction that demonstrates Obama's point.
Leahy cited a 2007 case in which the court threw out a lower court award of $3.5 million to an Alabama woman who invoked the Civil Rights Act of 1964 to claim she had suffered years of pay discrimination at Goodyear Tire and Rubber Co.
Voting with the 5-4 majority, Alito said the case was easily decided on the statute "as written." He was joined by Justices Antonin Scalia, Clarence Thomas, Anthony Kennedy and Roberts.
In a dissent, Ginsburg, wrote, "In our view, the court does not comprehend, or is indifferent to, the insidious way in which women can be victims of pay discrimination."
Leahy said that if McCain is elected, he would appoint justices like Scalia, a Reagan appointee, and Thomas, who was appointed by President George H.W. Bush.
"Scalia and Thomas are predictable," Leahy said. "Senator Obama wants even-handedness."