Barack Obama was elected the 44th president of the United States

Tuesday night, crowning an improbable two-year climb that owes much of its success to his command of the internet as a fundraising and organizing tool.

Obama won 52 percent of the nation's popular vote, and had a 338-163 advantage in electoral votes Wednesday morning, thanks to victories in several swing and traditionally Republican states. The results are a stunning and hard-won victory for a candidate who began the race as a relative newcomer to the national political stage, and ended it as first African-American to win the White House.

"I was never the likeliest candidate for this office," Obama said in an acceptance speech in Chicago Tuesday night. "We didn't start with much money or many endorsements. Our campaign ... was built by working men and women who dug into what little savings they had to give five dollars and ten dollars and twenty dollars to this cause."

Both Obama and Republican rival John McCain relied on the net to bolster their campaigns. But Obama's online success dwarfed his opponent's, and proved key to his winning the presidency. Volunteers used Obama's website to organize a thousand phone-banking events in the last week of the race – and 150,000 other campaign-related events over the course of the campaign. Supporters created more than 35,000 groups clumped by affinities like geographical proximity and shared pop-cultural interests. By the end of the campaign, myBarackObama.com chalked up some 1.5 million accounts. And Obama raised a record-breaking $600 million in contributions from more than three million people, many of whom donated through the web.

"He's run a campaign where he's used very modern tools, spoke to a new coalition, talked about new issues, and along the way, he's reinvented the way campaigns are run," says Simon Rosenberg, president and founder of the nonprofit think-tank NDN, and a veteran of Bill Clinton's first presidential campaign. "Compared to our 1992 campaign, this is like a multi-national corporation versus a non-profit."

Ironically, it was McCain who first saw the internet's potential in a presidential race, running an experimental set of targeted banner ads during his doomed 1999 primary battle against George W. Bush. But eight years later, Obama finally teased out the net's full potential as an election tool.

The campaign's commitment to online organizing took shape during the primaries, when it hired online director Joe Rospars, a veteran of Howard Dean's web-heavy 2004 campaign, and lured Facebook co-founder Chris Hughes to build its own social networking site, myBarackObama.com. Hughes was intrigued by the challenge. "We were going to be taking on some of the biggest names in politics," Hughes recalled in an interview last week.

As the presidential race heated up, the internet grew from being the medium of a core group of political junkies to a gateway for millions of ordinary Americans to participate in the political process, donating odd amounts of their spare time to their candidate through online campaign tools. Obama's campaign carefully designed its web site to maximize group collaboration, while at the same time giving individual volunteers tasks they could follow on their own schedules.

The scale of Obama's campaign reached massive proportions. By Election Day, for example, it was asking its cadres of volunteers to make a million phone calls to get out the vote.

In addition to fostering grassroots supporters with its social networking tool, the Obama campaign contacted hard-to-reach young voters through text messages, collecting thousands of numbers at rallies and sending out texts at strategic moments to ask for volunteer help or remind recipients to vote.

The campaign also launched web pages and online action groups to fight the underground, e-mail whisper campaigns and robo-calls that surfaced in battleground states. In one effort, the campaign urged supporters to send out counterviral e-mails responding to false rumors about Obama's personal background and tax policies.

In fundraising, Obama followed in the footsteps of Howard Dean's 2004 bid by regularly soliciting small donations from a wide swath of voters, raising record amounts online by federal filing deadlines. He then used this money for more traditional campaigning — for example, flooding cable markets in strategic states with television advertising. Obama spent a record-shattering $293 million on TV ads between January 1, 2007, and October 29, 2008, according to TNS Media Intelligence. McCain spent $132 million during the same period.

In many ways, the story of Obama's campaign was the story of his supporters, whose creativity and enthusiasm manifested through multitudes of websites and YouTube videos online. It even resulted in volunteer contributions like the innovative Obama '08 iPhone and iTouch application that enabled owners to mobilize their friends and contacts in battleground states through the Apple devices.

The campaign was constantly adding new features even to the end, and many hope that Obama will bring this approach with him to the White House. Obama almost has no choice as he faces the task of rebuilding Washington's credibility with voters, says David Stephenson, a consultant who advises governments on transparency.

"I'm not sure that Obama is an XML jockey," says Stephenson. "But he does have people advising him that realize how important this is."

Either way, Obama's rise to the presidency will be studied for years to come as the textbook example of a new kind of electioneering driven by people and technology, says Ralph Benko, a principal of the political consulting firm Capital City Partners, in Washington, D.C.

"It was a peer-to-peer, bottom-up, open-source kind of ethos that infused this campaign," says Benko. "Clearly, there was a vision to this."

Photo: President-elect Barack Obama gives his acceptance speech at Grant Park in Chicago Tuesday night.* (AP /Morry Gash)*

(Story last updated 9:00 a.m. Eastern)