Buoyed by a tide of hometown popularity, former Philadelphia Mayor Ed Rendell captured the Democratic nomination for governor over Auditor General Bob Casey Jr. after the most expensive primary campaign in Pennsylvania history.

With 99 percent of the state's vote counted, Rendell was headed to a landslide win, 56 percent to Casey's 44 percent.

After receiving a ritual call of concession from Casey, Rendell entered a Center City ballroom crammed with cheering suporters. The strains of the Democratic anthem, "Happy Days Are Here Again," competed with shouts of "Eddie, Eddie," as he worked his way to the stage.

"Change must come to Pennsylvania," Rendell declared as he launched into a capsule version of his standard stump speech.

"We are going to change the way we do business in Harrisburg."

He renewed his call for a special session of the Legislature to reform school funding, reform, he said, that would result in a property tax cut for all Pennsylvanians.

In November, Rendell will face Attorney General Mike Fisher, of Upper St. Clair, who was unopposed for the Republican nomination.

In a statement issued shortly after the polls closed, Fisher loosed the first salvo of their general election contest.

"My commitment is not only to spend less but to spend smarter," Fisher said. "My opponent has offered plan after plan that spends more money without any realistic solutions to pay for this spending. The only way for him to pay for all his proposals is to raise taxes."

Rendell's victory told a Philadelphia story. The campaign managed to shift the center of gravity in Democratic politics to the east, reversing a recent pattern in which Western Pennsylvania Democrats voted in higher numbers than their counterparts in the Philadelphia region.

Casey led in all but 10 of the state's 67 counties, but those combined margins weren't enough to close the huge gap Rendell built among the voters who knew him best. It was a defeat not just for Casey but for the state Democratic organization that endorsed him and labor unions who backed Casey early and poured millions into his campaign.

Rendell was able to capitalize on a relatively heavy turnout in the Delaware Valley -- 35 to 40 percent in Philadelphia itself, according to preliminary estimates -- while Democrats elsewhere in the state were more inclined to stay home.

Mark Wolosik, who heads Allegheny County's elections division, estimated the Democratic turnout would be approximately 28 percent. In the Democratic primary for governor four years ago, by contrast, Allegheny County's turnout percentage was double Philadelphia's.

Rendell amassed a 150,000-vote margin in his hometown -- a margin roughly equal to his overall edge over Casey. Casey led in 57 of the state's 67 counties, but not by enough to overcome Rendell's Delaware valley totals. The Philadelphian won the surrounding suburbs by one double-digit margin after another -- Montgomery by 42,000; Bucks by 34,000; Delaware by 32,000, and Chester by 17,000.

The victory came after a campaign as vitriolic as it was expensive. The Rendell campaign took to the airwaves early, touting its candidate's reputation as a mayor who had turned around a city on the precipice of bankruptcy. Casey, the second-term auditor general, responded with a relentless attack, trying to poke holes in Rendell's reputation as a civic manager and charging that he had mismanaged his city's schools. But the overarching theme of the Casey campaign was that Rendell was a shifty big-city politician who could not be trusted.

The Rendell rebuttal portrayed Casey as using negative tactics to obscure a modest public record. The result of the combined $30 million barrage was a seemingly endless round of charges and countercharges conveyed in thousands of individual commercials.

Because the two candidates focused their TV spending in less expensive markets, Philadelphians saw less of the acidic exchanges that filled the airwaves elsewhere. It is axiomatic among political strategists that negative campaigning tends to suppress turnout. For the last three months, the barrage of negative ads was heaviest in the areas where Casey needed the biggest turnout.

Rendell's platform concentrated on the economic development themes on which he built his reputation in Philadelphia. He also pledged to reform the state's school funding system to shift a greater share of costs from local school districts to the state. To pay for the plan, Rendell proposes to double the tax on cigarettes and legalize and tax slot machines at race tracks. Following Casey's lead, Rendell also proposes to find the money to shore up and expand the state's prescription program.

Casey had concentrated on traditional Democratic themes and issues, promising a dramatic expansion of prescription drug assistance for the elderly and a two-stage increase in the state's minimum wage.

Rendell now has the opportunity to be the first Philadelphian elected governor since World War I. But to do that he must beat Fisher.

Rendell's victory sets up a campaign of contrasts on social issues and geography. Fisher, the former Upper St. Clair state senator, is a staunch conservative. Both have stressed the importance of a business-friendly image for the state.

Fisher can count on the allegiance of conservatives and of opponents of gun control and abortion. He also starts with the advantage of a Republican election apparatus that has proved more effective than its Democratic counterpart throughout the last decade.

Rendell starts with the same strong foundation that he exploited in his victory over Casey, his popularity in the city of Philadelphia and its surrounding suburbs.

A key question about the fall campaign is which candidate will be able to do a better job of poaching support from the other party's political base.

Rendell will be trying mightily to lure the votes of socially liberal Republicans in the collar counties surrounding Philadelphia -- Bucks, Montgomery, Delaware and Chester. An estimated 16,000 Republicans shifted their registration to Democratic in those counties before the primary, presumably to make them eligible to vote for Rendell.

A big Philadelphia turnout and crossover support in those bedroom counties were instrumental in Al Gore's victory over President Bush in Pennsylvania two years ago.

By the same token, the Fisher campaign sees an opportunity to win support from socially conservative Democrats. Fisher also hopes for inroads in his home base in Allegheny County, where he has run strongly in each of his elections to the attorney general post.

Rendell has already shown himself to be a champion fund-raiser, whereas Fisher, with no primary opponent, has lagged far behind both Democrats in contributions throughout the spring. The GOP fund raising will shift gears now. Fisher has already benefited from one presidential visit. Given the importance of Pennsylvania in the 2004 presidential election, he can count on more assistance from administration figures in coming months.

Rendell, on the other hand, will have the challenge of going back to the donors who helped make this a record-smashing, $30 million primary campaign.

The Democrat also has the task of mending fences with Casey partisans, in particular the labor union leaders who were early backers of the auditor general. Given the alternative of Fisher, most of the state's union leadership can be expected to line up behind Rendell in the fall. The former mayor will still be a tough sell, however, to some of the municipal labor leaders who clashed with him during Philadelphia's budget crisis in the early 1990s.

"Anyone who thinks this race is over tonight is very much mistaken," he said. "Mike Fisher is a tough, well-rested candidate. He's going to be well-financed. It's going to be a gruesome battle. No one should underestimate Mike."

Yesterday's results gave Casey a bitter return on his multimillion-dollar investment. But by his family's standards, he might just have begun. His father, the late governor, fell short in races for governor three times before he was finally elected in 1986.

A foreshadowing of a bad night came as the Casey staff hunched around a bank of computers in the campaign headquarters. Early returns showed Casey trouncing Rendell in Lackawanna and Luzerne counties -- no surprise in Casey's home base.

But as numbers filtered in from the west, worries settled in, including a weaker than expected victory in Allegheny County.

A block away in the ballroom of the Radisson Lackawanna Station, a room prepared for a victory celebration was all but empty as a few partisans gathered around television stations that showed their candidate trailing.

Karen Walsh, Casey's press secretary, said she wasn't sure what to make of the numbers.

She said Casey had anticipated a Philadelphia turnout of roughly 30 percent. Reports of a 35 to 40 percent turnout confounded those hopes.

As Rendell's lead reached 90,000 votes, Tom Gilhooley, a Scranton city councilman, declared, "That's a wrap."