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."
The abortion controversy marks another sharp divide between McCain and Obama. The two sides are divided by the Roe v. Wade ruling that the right to privacy established by the 14th Amendment to the U.S. Constitution is "broad enough to encompass a woman's decision whether or not to terminate her pregnancy."
The McCain campaign says on its website the Arizona senator "believes Roe v. Wade is a flawed decision that must be overturned." The Obama website says the Illinois senator "will make preserving women's rights under Roe v. Wade a priority as president."
Nancy Keenan, president of the National Abortion Rights Action League, said her organization would spread the word about McCain's position to independent and Republican women who favor abortion rights but might otherwise vote for McCain.
"I think we have a lot of work to do," Keenan said. "People think he's a moderate and a maverick, so they make the assumption that he's pro-choice."
A spokeswoman for the McCain campaign downplayed the importance of the abortion issue in the campaign.
"Women are not single-issue voters," said Crystal Benton. "When we're talking to women in polling and survey sessions, one of the things we're finding is that they are very concerned about the issues that most voters are concerned about, like the economy and national security and health care. John McCain is well positioned to fight on each of those issues."
Benton also noted that McCain voted for Justices Ginsburg and Stephen Breyer, both appointees of President Clinton. She contrasted those votes with Sen. Obama's votes against both Roberts and Alito.