After six weeks of near-constant campaigning and increasingly nasty commercials, the voters of Pennsylvania today finally get to place their imprint on the race for the presidency.

In the Pennsylvania primary, Democrats will choose between Barack Obama, the leader nationally, and Hillary Rodham Clinton, who has been ahead in statewide polls from the beginning.

With Democratic registration at a record level of 4.2 million statewide, a heavy turnout is expected.

Polls open at 7 a.m. and close at 8 p.m.

Although John McCain has wrapped up the Republican presidential nomination, his name will be joined on the GOP ballot by Mike Huckabee and Ron Paul.

In addition, the primary in Philadelphia features a Democratic contest in the state Senate district long served by Democrat Vincent J. Fumo, who is facing fraud and obstruction-of-justice charges and has decided not to seek another term.

Other key races include a Democratic fight for the nomination to be state treasurer; a Republican battle in the suburban Senate district being vacated by Democrat Connie Williams; and two city charter-change questions.

The Clinton-Obama primary, which begins the final phase of the prolonged nomination fight, will be judged not just on the basis of who wins but also by how much. And that, in turn, could depend on what late-deciding voters end up doing.

Yesterday, the Clinton campaign launched one last commercial aimed at late deciders who, in other hotly contested states, have put a premium on her experience and have broken her way.

An Obama victory by any margin in Pennsylvania would be a devastating, perhaps fatal, blow to Clinton's prospects. Even now, many analysts say it is virtually impossible for her to take the lead in delegates or popular vote by the close of the primary season, June 3, regardless of what happens today.

And a narrow Obama loss would do little to change the overall dynamic of the race, although the Clinton camp would try to make as much of the result as possible.

On the other hand, a substantial Clinton victory would prolong the nomination process through the next set of primaries, in Indiana and North Carolina next up on May 6, and perhaps beyond.

It would bolster Clinton's case that voters harbor lingering doubts about Obama, that she has the better chance against McCain, and that the party's undeclared superdelegates should stay undeclared to see how the saga plays out.

The two campaigns were busily playing the expectations game yesterday.

"I'm not predicting a win," Obama said in a Pittsburgh radio interview. "I'm predicting it's going to be close and that we are going to do a lot better than people expect."

Meanwhile, Clinton's aides were saying they would be happy winning by one vote.

"If Sen. Obama can't win a big, swing state like Pennsylvania with his enormous spending advantage, just what will it take for him to win a big, swing state?" asked Howard Wolfson, Clinton's chief spokesman.

On television alone, Obama has outspent Clinton by roughly $11 million to $5 million, with both campaigns blanketing the airwaves in the final few days.

The Obama braintrust was counting on a huge turnout and a big margin of victory in Philadelphia - and on carrying the suburban counties with the help of newly registered Democrats.

Clinton's strategists were confident of winning just about everywhere else.

Both campaigns have huge get-out-the-vote efforts planned. Obama has 400 staging locations around the state and will have thousands of canvassers and people in phone banks "reaching out to voters who we think are with us and reminding them that it's election day," said campaign spokesman Sean Smith.

The most unusual touch will be criers boarding SEPTA buses and giving riders a brief pitch and some Obama literature.

Clinton will rely both on volunteers and help from several labor unions to get supporters to the polls. Her operation, too, will rely on phone banks and campaign workers going door to door.

Spokesman Mark Nevins said the campaign "has to work that much harder" because of Obama's advantage on television.

In all, 158 delegates are at stake in the primary; 55 will be allocated in proportion to the statewide vote, and the 103 others are to be chosen by congressional districts. The state also has 29 superdelegates, most supporting Clinton.

Voters also will be asked to participate in a separate election for the delegates themselves. That will not determine how many delegates each presidential candidate receives, only which individuals get to fill the slots won in each district by either Clinton or Obama.

In other races, Democrats throughout the state will select a candidate for treasurer from among Bucks County attorney John Cordisco, Rob McCord of Montgomery County, Dennis Morrison Wesley of Dauphin County, and State Rep. Jennifer L. Mann of Lehigh County.

In Philadelphia's Second Senatorial District, labor leader John J. Dougherty is looking to win the Democratic nomination to succeed Fumo.

Attorney Larry Farnese and community activist Anne Dicker are the other Democratic candidates. Jack Morley is unopposed for the Republican nomination, and Joseph Vignola, a former city councilman, is planning to run as an independent.

Voters throughout the city will say yes or no to two proposed changes to the city charter. One would separate the jobs of city representative and commerce director. The other would allow the mayor to appoint more management-level deputies, exempt from civil service.

In Williams' Senate district, which covers parts of Montgomery and Delaware Counties, attorney Lance Rogers and marketing consultant Lisa Paolino are vying for the Republican nomination. State Rep. Daylin Leach is unopposed on the Democratic side.