In the hours before the vote, both Democrats made final pleas to supporters to get out to the polls on Tuesday.
Senator Hillary Clinton spoke about the Iraq war and the domestic economy at a campaign rally in Scranton, Pennsylvania.
"We have got to bring our troops home and take care of our veterans," she said. "We have got to get out economy turned around and make it start producing good jobs for hard working people, like people right here."
Senator Barack Obama also campaigned around the state and told Pittsburgh radio station KDKA that he expects a close race on Tuesday.
"We have run a tough race here in Pennsylvania,Senator Clinton obviously was heavily favored. She was up by 20 points and we have just been trying to chip away and had a great time campaigning. I am not predicting a win. I am predicting it is going to be close and that we are going to do a lot better than people expect."
The latest polls give Clinton a lead of between five and 10 percentage points in Pennsylvania. Clinton at one time led by 20 points.
But Obama has been on the defensive in recent weeks over ties with his controversial former pastor and his recent comment that small-town voters in Pennsylvania are bitter and cling to guns and religion.
Political experts say Clinton has more at stake in Tuesday's primary.Analyst Stuart Rothenberg says Clinton is looking for a substantial victory over Obama that will convince influential Democrats that she should remain in the race through the end of the caucus and primary season in early June.
"The reality is that she trails in delegates, and there are fewer and fewer delegates available now," he said. "Superdelegates are declaring, and we are toward the end of the primary season, so she needs to change the psychology of the Democratic race, change the dynamic and start to raise questions about Senator Obama's electability down the road."
Obama leads in committed delegates, popular vote won and in the number of state contests won so far. But Clinton has won all of the larger states except Obama's home state of Illinois.
Neither candidate appears capable of winning enough delegates outright to claim the nomination" class="hjdict" word="nomination" target=_blank>nomination without the help of the so-called superdelegates, uncommitted party activists and officeholders who vote at the national nominating convention in Denver in late August.With most of the election focus on the Democratic race, the presumed Republican nominee, Senator John McCain, is trying to broaden his appeal as he looks ahead to the general election campaign.
McCain began a week-long tour of poor communities around the country that generally get little attention from presidential candidates.McCain promised to be a candidate of change in Selma, Alabama.
"It is time for change, the right kind of change, change that trusts in the strength of free people and free markets," he said. "Change that does not return to policies that empower" class="hjdict" word="empower" target=_blank>empower government to make our choices for us, but that works to ensure that we have choices to make for ourselves."
McCain spoke near a bridge that was the scene of a famous civil rights march in 1965 when police attacked demonstrators with clubs and tear gas.Later in the week, McCain will visit economically depressed areas in Ohio and Kentucky.