WASHINGTON — Hillary Clinton won a hard-fought Pennsylvania primary Tuesday, beating rival Barack Obama in a scrappy victory that she hopes will keep her underdog campaign alive to fight another day.
The New York senator was carried to victory by whites, women, the working class and the elderly — the third time she's been rescued from the brink of political death after must-win victories in New Hampshire in January and Ohio in March.
With 82 percent of the precincts reporting, Clinton led by a margin of 55 percent to 45 percent. The television networks and the Associated Press declared her the winner based on exit polls and early return trends.
"Some counted me out and said to drop out," Clinton told cheering supporters in Philadelphia Tuesday evening. "But the American people don't quit. And they deserve a president who doesn't quit, either.
"You listened and today you chose. ... Because of you, the tide is turning."
Noting that Obama outspent her 3-1 in the state, Clinton made a direct appeal for contributions to shore up her cash-starved campaign.
"We can only keep winning if we can keep competing against an opponent who outspends us," she said.
Clinton was desperate for a win, especially a big win, to jumpstart her campaign heading into the final stretch of primaries. She's looking for a series of victories to convince pivotal superdelegates that she's the strongest Democrat and that Obama is a flawed candidate who can't win big states against the Republicans this fall because he couldn't beat her in them in the spring.
"I think maybe the question ought to be: Why can't he close the deal? With his extraordinary financial advantage, why can't he win a state like this one, if that's the way it turns out?" Clinton said earlier Tuesday.
Obama turned his attention quickly to the next round of votes, flying Tuesday evening to Evansville, Ind., site of the next primary showdown in two weeks.
"There were a lot of folks who didn't think we could make this a race when it started," he said of the campaign in Pennsylvania. "They thought we were going to be blown out. But we worked hard, and we traveled across the state to big cities and small towns, to factories and VFW halls. And now, six weeks later, we closed the gap."
He brushed aside as trivial much of the recent campaign, which seemed to have stalled his gains in Pennsylvania.
"It's easy to get caught up in the distractions and the silliness and the tit-for-tat that consumes our politics, the bickering that none of us are entirely immune to, and that trivializes the profound issues — two wars, an economy in recession, a planet in peril," he said.
"But that kind of politics is not why we are here tonight. It's not why I'm here and it's not why you're here."
Earlier in the day, he'd insisted that he remained on his way to winning the nomination even with a loss in Pennsylvania.
"We're coming to the end of this process, and if you look, we've won twice as many states. We've won the popular vote by a fairly substantial margin. We've got a very big lead in pledged delegates, and we've competed in every state, win or lose."
Exit polls showed that Clinton won among whites, women, those with incomes below $50,000 and no college education, those older than 65, Roman Catholics and Jews, and gun owners.
Among whites 60 and older — a solid third of the vote — she won by nearly 2-1.
More than one in 10 white voters said the race of the candidate was important to their decision, and they went for Clinton by a 3-1 margin.
Obama won among African-Americans, men, those under the age of 44 and those with incomes above $200,000.
He won Philadelphia and its suburbs; she won everywhere else.
Turnout was heavy in a state seeing its first contested Democratic primary since 1976.
One out of 10 voters said they'd changed their party registrations so they could vote in the primary, according to exit polls. They broke for Obama by a margin of nearly 2-1.
Yet late-deciding voters — including those who'd long been registered Democrats — broke heavily for Clinton.
One possible explanation was the flood of controversial news about Obama in recent weeks, as well as his defensive performance in a debate last week.
Another possible ingredient in the mix was mischief: Popular conservative talk show host Rush Limbaugh for weeks urged his loyal listeners to register as Democrats to vote for Clinton and prolong an increasingly harsh battle that might benefit the Republicans.
The Pennsylvania vote could well do that, even if it remains a daunting challenge for Clinton to win the nomination.
With 158 delegates at stake — likely to be divided almost evenly — Clinton could gain only incrementally on Obama, who entered the day leading by 1,648 to 1,509, a margin of 139.
An early count by the Associated Press had her winning 38 delegates to Obama's 34, a net gain of 4. The rest hadn't yet been allocated.
Clinton also looked to gain on Obama in the popular vote.
But it was her last chance to score a big gain on Obama, who led in the nationwide vote count by as much as 800,000. After Tuesday, there are only seven states — and Puerto Rico — left to vote, none of them as big.
The final votes are May 6 in Indiana and North Carolina, followed by West Virginia, Kentucky, Oregon, Montana, Puerto Rico and South Dakota.
(Margaret Talev contributed from Evansville, Ind.)