Yet with Mrs. Clinton raising $21 million in March compared with Mr. Obama’s $42 million, her advisers said they realized they had tough challenges ahead. Chief among them, besides paying bills and financing new advertising, was persuading impatient Democratic superdelegates  party leaders and elected officials  to remain neutral in the contest and let the remaining primaries play out through early June.

The Pennsylvania Democrats who cast their ballots in Tuesday’s primary did so with the economy weighing heavily on their minds, according to surveys of voters leaving polling places. Those surveys showed that more than half the voters questioned believe that the worsening state of the American economy is the most important issue confronting the country, with about 90 percent saying the United States has already slipped into a recession.

Half of those polled also said that they were looking for a candidate who could bring about change, which has been the main theme of Mr. Obama’s campaign. Mr. Obama leads in delegates, but has consistently trailed Mrs. Clinton in polls taken in Pennsylvania, though the gap had been closing in recent days.

Image Senator Barack Obama greeting a voter in Pittsburgh on Tuesday. Credit... Ozier Muhammad/The New York Times

About one-quarter of those who participated in the exit polling, conducted by Edison/Mitofsky for five television networks and The Associated Press, endorsed the idea that experience, which Mrs. Clinton has emphasized in her campaign, is the most important quality to be sought in a candidate. For the polling, the margin of sampling error in the sample of 40 precincts across the state was plus or minus four percentage points.

Both candidates performed strongly among the same constituencies that have supported them in other primary states.

Mr. Obama was backed overwhelmingly by black voters and also scored well among voters younger than 45 and college graduates, the results show. Geographically, he performed strongest in Philadelphia and its suburbs, which has the largest concentration of population in Pennsylvania, with Mrs. Clinton winning the majority of the vote in the rest of the state.