Obama and McCain were the last survivors of the longest and most expensive campaign presidential campaign ever waged, with $1.5 billion raised by candidates through the middle of October, according to the Federal Election Commission.
Obama built an organization that has changed the face of electoral politics. Reversing a promise, he rejected public campaign financing and raised $639. million, nearly half in contributions of $200 or less, from 3.2 million donors. That meant that roughly one in 20 people who voted for Obama had given to his campaign.
Embracing new technologies, the Obama campaign built an unprecedented database of volunteers, connected through the Internet and spurred to action through e-mail and social networks.
In Maryland, clusters of Obama volunteers gathered every weekend at meeting points and headed to Virginia and Pennsylvania, competitive states where their enthusiasm could have more impact.
The excitement for his campaign, particularly among African-Americans, led to long lines at polling places in Maryland and other states with large minority populations.
At Woodmoor Elementary School in Woodlawn, voters brought collapsible chairs, snacks and even a battery-operated TV in a line that snaked out to the school's driveway and around the building.
"I came to make history and vote for Obama," said Misty Janey, 35, a registered Democrat who works as a cocktail waitress at the new Hilton in downtown Baltimore. "Make history and change history."
Her 4-year-old niece, Amya Watson, chimed in, "This is history. Obama, I love you."
Pushing the button for Obama "felt wonderful," Janey said. "I wanted to cry."
Janey's sister-in-law, Marquita Watson, 25, a massage therapist who is five months pregnant, brought her daughter because "I want her to be a part of history."
As Obama reached for states that had voted Republican in the past, he looked to make good on a promise to reach across party lines to bridge divides, one of the themes of his 2004 speech at the Democratic National Convention, which thrust him to national prominence.
The campaign was feeling "positive," Obama senior adviser David Axelrod said on CNN, "about breaking up this red state-blue state paradigm. I think we could possibly do that tonight."
Axelrod and other top advisers ran a largely mistake-free campaign, demonstrating exemplary organizing skills in Iowa and other caucus states as they pulled ahead of their main primary rival, Sen. Hillary Clinton, as the primaries dragged on.
Obama suffered setbacks, overcoming negative publicity over incendiary remarks of his pastor, the Rev. Jeremiah A. Wright Jr. To rebut charges that he belonged to a church that was out of the mainstream, Obama delivered a definitive speech on race relations that changed the tenor of the discussion.
He called Pennsylvania voters suffering from the economic downturn "bitter," and a sidebar comment to a worker in Ohio who came to be known as Joe the Plumber was pounced on by McCain as evidence that Obama possessed socialist inclinations because he wanted to "spread the wealth."
But Obama was never gravely hurt by his few missteps, his standing improving through his performance in debates and his selection of Delaware Sen. Joe Biden, a Washington veteran, as his running mate.
"The way he handled the economic pressures, what he said, and the calm way he reacted and the leadership that he exerted, I think really turned a lot of voters around," Gov. Ed Rendell of Pennsylvania, a former Clinton supporter, said Tuesday night.
Cardin, the Maryland Democrat, predicted that Obama would pass initiatives on housing, energy independence and some health care ideas in his first 100 days, the traditional period when a new president gets the most done, but that some of his biggest ideas "will have to be tempered" by budget realities.
Baltimore Sun reporters Jennifer McMenamin and Gadi Dechter contributed to this article.