ABC and NBC have called Pennsylvania for Barack Obama.
It was the only state won by Democrat John Kerry in 2004 that John McCain seriously contested in the final weeks of the campaign. And Republican strategists said they could see little possibility that McCain could win the White House without the Keystone State.
Obama lost the Pennsylvania Democratic primary to Hillary Clinton, and he had a long way to go in persuading rural and white working-class voters that he understood their problems and would fight for them. He made important gains by campaigning hard in the state, by promising middle-class tax cuts, and naming a vice presidential running mate, Delaware Sen. Joe Biden, who had grown up in Scranton.
On the other hand, McCain's choice of Alaska Gov. Sarah Palin as his running mate turned many suburban voters against him because they didn't think Palin was qualified, according to opinion polls.
Just as important, Obama managed to turn out a huge majority of African-Americans and other core Democratic voters in Philadelphia.
Click here for the latest election results.