US elections: Barack Obama wins Democratic nomination for president

Barack Obama has made history by beating Hillary Clinton for the Democratic nomination and becoming the first African-American with a viable chance of winning the White House.

Obama's victory effectively brought to an end Clinton's bid to become the first US female president.

It also confirms Obama's reputation as a political giant-slayer, who after less than four years in the US Senate brought down the couple credited with creating the Democrats' most powerful political machine.

Obama will now face the Republican John McCain for the prize of the presidency in the November 4 general election.

After a 54-contest, five-month-long fight, Obama started the day 45 delegates short of the 2,118 he needed to cross the finishing line. A steady shift of support towards Obama throughout the day turned into a flood. Among those announcing their endorsements was the former president Jimmy Carter. A number of Clinton supporters also defected to Obama.

He was four short as polls closed in the South Dakota and Montana primaries, the last two contests. But South Dakota pushed him over the line in terms of delegates - even though he lost the state to Clinton.

To deafening applause, he told a 20,000-strong victory rally in St Paul, Minnesota: "Tonight, we mark the end of one historic journey with the beginning of another - a journey that will bring a new and better day to America. Because of you, tonight, I can stand before you and say that I will be the Democratic nominee for president of the United States.

He was generous towards Clinton. "Our party and our country are better off because of her, and I am a better candidate for having had the honour to compete with Hillary Rodham Clinton," he said.

The crowd was responsive to the conciliatory message, loudly cheering Clinton three or four times.

Clinton, surrounded by Bill and daughter Chelsea, at a party in New York for campaign workers from round the country, also held out the prospect of reconciliation: "It has been an honour to contest these primaries with him, just as it is an honor to call him my friend."

Although several Obama supporters in St Paul said they expected Clinton to behave graciously, she refused to concede or suspend her campaign.

Instead, Clinton said she wanted time to reflect before making her next move. "In the coming days, I'll be consulting with supporters and party leaders to determine how to move forward with the best interests of our party and our country guiding my way," she said.

In a sign of hard bargaining with Obama's team over the next few days, she said she had won the votes of 18m Americans and she wanted their views respected.

One concession she may be seeking is a joint ticket with Obama, with her as vice-presidential candidate, a position she may feel entitled to after securing so many votes.

Holed up at her home in Chappaqua, New York, during the day, she and Bill Clinton discussed options over the phone with a host of aides and supporters. One of four members of Congress who spoke to her urging her to press for the vice-president slot reported her saying: "I am open to it."

She also will negotiate about the transfer of her staff to Obama's campaign team, about help with her campaign debts, the possibility of jobs in his administration if he wins the presidency and incorporation of some of her policy positions, particularly on healthcare.

She finished the primary season strongly, winning the South Dakota primary, the one blot on Obama's night. It had been a state he had been predicted to win. With 100% of the votes counted in South Dakota, she had 54,179 (55%) to his 43,726 (45%).

Obama won Montana. With only 99% of the vote counted, he had 101,811 (57%) and she took 74,550 (41%).

One reason why South Dakota voted differently from its neighbour is that voting in Montana was open to all, and independents, who tend to swing behind Obama, turned out in force for him. But South Dakota was restricted to party members, among whom Clinton has tended to do better.

Obama's main strategist, David Axelrod, said that losing South Dakota had not taken the shine off the night. "Not at all. We won 34, 35 contests. There is no shame in splitting the night with a very strong candidate," he said.

He also made it clear the general election is on - no matter what Clinton says or does. "One campaign ends today and another begins. We are very excited for that."

McCain, in a speech in Louisiana, formally declared the general election to be underway: "Tonight, we can say with confidence the primary season is over, and the general election campaign has begun." He described Obama as a formidable opponent and offered extravagant praise for Clinton - a sign that he would fight Obama hard for the support of women voters.

McCain added that voters would face a clear choice next November.

Obama deliberately chose St Paul to launch his general election campaign because of the symbolism of the location: it will be the same site at which the Republican convention will formally nominate McCain in September.

In St Paul, people began lining up as early as 10am outside the arena where Obama was to hold his late-night rally. They came with folding chairs, blankets and spread out on the pavement playing card games.

Several said they were compelled by the sense of history about the occasion. "To have an African American running for president and to be there for the nomination, it is a historic thing," said Laurie Zahn, a teacher who was at the rally with her 21-year-old daughter.

Some had originally counted themselves Clinton supporters. Ruth O'Neill was a reluctant convert, a former Clinton supporter who was persuaded to switch sides by her 16-year-old son. "This is the first time I would put on an Obama shirt," she said. "But my son was right: he kept saying if she had this much trouble running her campaign how could she run the country."

A few passersby cheered as they passed the long line. One man started shouting out Obama's trademark chant from across the road: "Fired up, ready to go."