Hillary Clinton did what Democratic presidential nominees had done for years to win Pennsylvania on Election Day: She blew away her Republican rival in Philadelphia and its suburbs.
But it was not enough in a race against Donald Trump.
This time, counties far from the much-ballyhooed Philadelphia region delivered Trump enough votes to outgun Clinton's commanding support in the southeast, and lift him to a stunning victory.
Intense passions for him and antipathy toward her prevailed in Pennsylvania's rural and rust belt communities, observers and analysts said. Together, those sentiments fueled the 73,224-voter edge Trump used early Wednesday to capture a state that effectively sealed his Electoral College victory.
In longtime Democratic cities such as Wilkes-Barre and Scranton, and once solidly blue Westmoreland County, his numbers came in far higher than many Democrats had imagined.
"People did not expect this shift to be as great," said Scranton native and longtime Democratic strategist Charlie Lyons. "I think it had a lot to do with people who came out specifically for Trump - and it may also reflect a lack of enthusiasm for Hillary."
In Lackawanna, Luzerne, and Westmoreland Counties, Clinton drew roughly 50,000 fewer votes than Barack Obama did against Republican John McCain in 2008, according to unofficial returns Wednesday.
Clinton carried only one region statewide - the southeast.
Trump carried all the rest.
"We knew we had to get a huge number of votes around the state," said Rob Gleason, chairman of the state's Republican Party. "We had a great ground game. We didn't get much credit for it. But it was better than Hillary Clinton's."
In Philadelphia and its suburbs - Bucks, Chester, Delaware, and Montgomery Counties - Clinton fared about as well as or better than Obama did against Republican Mitt Romney in 2012. She won by a 634,588-vote margin in the region.
Philadelphia alone was a success story. With more than 99 percent of the vote counted in the city, Clinton had 562,717 votes Wednesday. That gave her a margin of 456,933 over Trump - a level experts had believed would carry her to statewide victory.
"The good news was she came out of Philadelphia much better than I ever hoped," said former Mayor and Gov. Ed Rendell.
And in the only southeastern county where Republicans still hold a registration edge, Clinton managed a whopping 24,606-vote win in affluent Chester County. Obama lost there in 2012 by several hundred votes.
But even with those successes, there was weakness across the state that cracked Clinton's fire wall - and with it expectations that she would win Pennsylvania and the presidency.
In battleground Bucks County, where Democrats have a slight registration edge and Trump was popular with working-class white men, Clinton underperformed: She won the county by only half of the margin Obama claimed in 2012.
"Bucks was a disaster," said J.J. Balaban, a Democratic media strategist who worked on the successful campaign of Pennsylvania's Democratic treasurer-elect Joe Torsella. He said Clinton needed a much stronger victory there but "she wasn't close."
U.S. Rep. Robert Brady, also the longtime chief of Philadelphia's Democratic Party, said the city "did its part" by delivering all those votes for Clinton. "The rest of the state just didn't come through," he said.
Expanding what had already been a clear political divide in Pennsylvania, Trump defeated Clinton in 56 of the state's 67 counties. (In 2008, McCain managed to win only 49.)
The GOP nominee dominated in places like south-central Pennsylvania, where he won by 294,793 votes and captured 14 counties near Lancaster and York. His only loss in that region was in Dauphin County, home to Harrisburg, the state's capital and one of its small cities.
In the aftermath, some blame may fall back on state Democrats.
Gov. Wolf, a York native and businessman who won as an establishment outsider two years ago, helped raise money and appeared at Clinton rallies. But he did not engage in the kind of intense campaigning that came more naturally to Rendell, a huge Clinton backer.
Some Democrats privately grumbled that Wolf was largely invisible in the campaign's final stretch. A spokesman said the governor was "unavailable" Wednesday to discuss Trump's win.
Voter-registration data had hinted of a GOP surge in the counties that would prove critical for Trump. An early September analysis by the Inquirer found Republicans had registered more new voters than Democrats in 52 of the state's most rural, and white, counties.
This week, the latest voter data showed significantly higher numbers of registered Republicans in Pittsburgh and its surrounding counties than there had been in 2008. Over the same period, the number of registered Democrats had plummeted.
One of those counties that punched hardest for Trump on Election Day was Westmoreland.
Lorraine Petrosky, who chairs its Democratic committee, said GOP enthusiasm was high for Trump in the conservative-leaning county near Pittsburgh. Though Democrats hold a small registration edge, they are more staunchly conservative on fiscal and social issues than in other parts of the state.
"All we heard was 'lying Hillary,' " Petrosky said.
Romney won Westmoreland by 40,000 votes last election; Trump improved on that considerably, slapping Clinton with a 57,000-vote defeat there.
Rendell, who won statewide elections in 2002 and 2006, noted that Westmoreland was among the counties in Pennsylvania that have been trending away from the Democratic Party for years.
"That county has changed over," he said. "They are blue-collar, working-class Democrats who have abandoned the party, if not by registration, then by voting."
But even northeastern Pennsylvania's Lackawanna County, where the Democratic Party of U.S. Sen. Bob Casey remains formidable and Clinton has family roots, Trump all but closed the voting gap between the two parties, losing to Clinton by only 3 percent.
Romney lost there to Obama by 27 percent four years ago.
Trump chose Scranton for rallies this summer and on the eve of the election. He prevailed with a message that reflected a deep unease in Scranton about the nation's economy, observers said.
"Trump almost had a Democratic message - he wanted to put people back to work, he wanted to create good-paying jobs," said Chris Patrick, chairman of the county Democratic Party. "I think people up here, they've had it. They're tired, they're beat up, and they're broke all the time. And Donald Trump's message . . . it created a minirevolution."
In neighboring Luzerne, a once reliably Democratic county, Trump did even better. He won Luzerne by about 26,000 votes.
His contention that government agreements on trade deals with other countries had caused much of the economic despair in regions like theirs was an overstatement - but a campaign tactic that seemed to win over voters, election veterans said.
"They're looking for easy answers," Rendell said. "Donald Trump gave them easy answers."