In a race viewed as a test of the influence of Pennsylvania's political parties, Democratic- and Republican-backed judicial candidates yesterday beat back upstart opponents to win nomination for two seats on the state Supreme Court.

Seamus P. McCaffery, a state Superior Court judge and former Philadelphia cop better known for his time as "Eagles Court" judge, and state Superior Court Judge Debra A. Todd of Butler County were the top Democratic vote-getters. Both had been endorsed by the Democratic State Committee.

"I am just overwhelmed," said McCaffery, who said it was tough for a Philadelphian to mount a successful statewide campaign. "I have become electable despite having Philadelphia under my name."

In the GOP primary, Montgomery County lawyer Michael L. Krancer and state Superior Court Judge Maureen Lally-Green of Butler County won the nomination. Philadelphia Common Pleas Judge Paul P. Panepinto, who did not have the state GOP party backing, pledged to support Lally-Green and Krancer.

"I am very happy and very satisfied with this victory," said Krancer, former chief judge of the state Environmental Hearing Board and a great-nephew of the late publisher and philanthropist Walter H. Annenberg.

McCaffery and Todd edged out Philadelphia Common Pleas Court President Judge C. Darnell Jones II, who had the support of Gov. Rendell and had mounted a vigorous campaign.

Jones, who did not have the backing of the state party, said he was hurt by insufficient resources to do TV commercials in the expensive Philadelphia market, and low voter turnout in the city.

Philadelphia Common Pleas Court Judge Willis W. Berry Jr. - the only candidate rated "not recommended" by the Pennsylvania Bar Association - was fourth in the Democratic primary, despite capturing more than 58,000 Philadelphia votes.

While the candidates for the state's highest court topped the ballot yesterday, voters also had to pick and choose among a slew of judicial candidates for everything from Traffic Court to trial court to the state Superior Court.

In the race for four seats on the Philadelphia Court of Common Pleas, the top vote-getters were Linda Carpenter, who has been a lawyer at two Center City firms and specializes in appellate law; Alice Beck Dubow, formerly a lawyer with the City Solicitor's Office and deputy general counsel at Drexel University; Michael Erdos, a former city prosecutor; and Ellen Green-Ceisler, a former city prosecutor who served as the Police Department's oversight officer.

An exhausted Green-Ceisler, who campaigned to the minute the polls closed, said she could hardly believe she had won. "I've never won anything," she said.

But it was the race for Supreme Court that attracted the most statewide attention. The candidates raised more than $1.8 million - and the campaigning is expected to break records in the fall.

This year's race will have a big impact on the state's highest court, with voters in November selecting two new members from the four nominated yesterday and deciding whether to retain Justice Thomas G. Saylor for another 10-year term.

McCaffery, who had major support of unions, mounted an advertising blitz in the final days of the campaign - with TV ads, billboards and radio commercials. It was hard not to at least know his name.

In Northeast Philadelphia yesterday afternoon, the 62d Ward Democratic sample ballot being handed out just outside the polls touted McCaffery and Berry for the state high court.

Outside the polling place at Casa Brazil restaurant on Bustleton Avenue, Joe Tralies, 68, was enthusiastic about McCaffery.

"You've got to vote for Seamus," said Tralies, who said he followed the sample ballot of mayoral candidate Bob Brady, whose ballot was backing McCaffery and Jones.