London was celebrating last night as its dream of hosting the 2012 Olympic Games became a reality after the city's "awesome" bid team pulled off a spectacular victory.
The capital beat favourites Paris in the closest of finishes, winning the fourth and final vote of International Olympic Committee delegates in Singapore by 54 votes to 50.
The result triggered scenes of jubilation in Trafalgar Square and east London, where people had gathered to follow events from the other side of the world on big screens.
Tony Blair, who arrived back from Singapore yesterday morning after spending three days backing the bid, praised the "just awesome" London team.
"This is a momentous day for London," he said.
The Queen, in a message to the bid chairman Lord Coe, said: "It's a really outstanding achievement to beat such a highly competitive field."
London beat Paris to the prize after months of determined campaigning which went right down to the wire.
Both capitals made it to the final round of voting after first Moscow, then New York and Madrid were eliminated in earlier rounds.
Rather than coming to victory from behind, London led in all but one round of the voting.
In the first round, London received 22 votes, Paris 21, Madrid 20, New York 19, and Moscow just 15.
The second round saw New York eliminated with 16 votes while Madrid got 32, London 27, and Paris 25 votes.
Madrid was knocked out in the third round after getting 31 votes compared with London's 39 and 33 for Paris.
The triumphant bid came after a slick and forceful final presentation yesterday in which Lord Coe promised a Games where " magic happens".
Commenting on the result, the London 2012 bid chairman and a double Olympic champion, said "the quality of the bid and vision of the bid and the fact that we've got London" helped clinch it. The victory means London will play host to the world's premier sporting event in seven years' time with a specially-built stadium and village rising from what is now an urban wasteland in the east of the city.
Mayor of London Ken Livingstone said: "This is one of the best days London has ever had - and it is one of the proudest days for Britain and for British sport."
Sports Minister Richard Caborn, who was in Singapore with the bid team, revealed how close the final vote was.
The result gave the bookies a battering and left them having to pay out around £1 million as patriotic punters backed London.
Ladbrokes spokesman Warren Lush said: "We've been torched by the huge patriotic gamble on London to win the Olympics, the money just kept coming.
"We hold our hands up and say we got it wrong, for the last two years we just couldn't see London overtaking Paris."
Culture Secretary Tessa Jowell, who was appointed Olympic Minister, said London had "come from nowhere".
Speaking from Singapore, she added: "I really want to say thank you. There have been thousands of people involved in this." Olympic gold medallist rower Sir Matthew Pinsent said he was still "floating" from the result.
He added: "I'm just shocked. "It has been such hard work and Seb (Coe) has put his life into it."
Details of London's final presentation were still being worked on just hours before it was delivered.
As the result was announced, Sir Matthew said was convinced London had lost.
He said: "For some reason I was thinking Paris had got it. All the world's press and cameras were pointed towards Paris.
"We wanted this for the country and for the city and for the next generation of young people. It is incredible to believe that it has actually happened."
Beckham, who spoke in Singapore yesterday of the prospect of the Games taking place on his east London "manor", compared the capital's victory to winning the European Cup.
The Princess Royal, a member of the IOC and the London bid team, said: "If you listen to what the senior athletes said it's worth bearing in mind they were all inspired very early by watching things like the Games - the potential is enormous."