Mr. Obama was using his fund-raising advantage to pay for a multimillion-dollar campaign that included sophisticated demographic targeting to find supporters in smaller cities across the state, particularly ones with pockets of black voters.

Image Senator Bob Casey, right, a native of Scranton, Pa., campaigned there Sunday with Senator Barack Obama. Sitting next to Mr. Casey, out of view, was Caroline Kennedy. Credit... Ozier Muhammad/The New York Times

Yet his team was also relying on old-fashioned tools, including sending supporters door-to-door, renting sound trucks to drive through urban neighborhoods and having volunteers serve as “town criers” to pass out literature on city buses.

In their final drives, both candidates barnstormed Pennsylvania with their eye on two different maps: one for the popular vote, the other for delegates. Mrs. Clinton desperately needs to win both to narrow the Obama campaign’s edge on both fronts.

Mr. Obama is also focused on winning delegates to maintain his lead, but he also wants to show he can draw support among the white, working-class voters who have gravitated to Mrs. Clinton.

In an atmosphere where both sides are hedging their expectations, Clinton aides have refused to say what margin of the popular vote she needs to win to stay in the race. The contest for delegates, who are awarded proportionally based on how well the candidates perform in each Congressional district, is likely to be close, but the pressure is on Mrs. Clinton to get at least 50 percent of the delegates.

“The fact that Hillary is crisscrossing a lot of Congressional districts, and Bill is, too, is proof that while everyone is focused on the vote percentages statewide, there is a war for delegates,” said Tony Podesta, who has run several statewide races in Pennsylvania and supports Mrs. Clinton, referring to former President Bill Clinton. “She needs to find ways of closing the delegate gap; she can’t go through all these contests and split the delegates 50-50.”

The intensity of Mr. Obama’s campaign and his willingness to air negative attacks in recent days suggest he harbored hope of ending the Clinton campaign here or avoiding a major loss that would keep the race alive.