President Vladimir Putin played the star role as the Black Sea resort of Sochi won the battle for the 2014 Winter Olympics, bringing the event to Russia for the first time.
Sochi, where the Russian president has an official residence, beat the South Korean resort of Pyeongchang by four votes in a ballot Wednesday, bringing new agony to the Asian contender which was also second in the race for the 2010 Games.
Putin spoke in English for what is believed to be the first time in public to state Sochi's case to the International Olympic Committee's executive board.
Pumped up by eight hours of music and pyrotechnics, a crowd of 10,000 on a central square in Sochi erupted when a screen showed IOC president Jacques Rogge announcing their victory.
In Pyeongchang, many shed tears as South Korea's leading alpine resort lost its second bid to host the Winter Olympics. Parents consoled weeping children who were watching a giant screen set up in the town centre.
Sochi won by 51 votes to 47 - with one abstention - in the deciding round. Pyeongchang had led after the first round with 36 votes to Sochi's 34 and 25 for the Austrian city of Salzburg, which was eliminated.
Putin, President Roh Moo-Hyun of South Korea and Austrian Chancellor Alfred Gusenbauer had all travelled to Guatemala City to make presentations to the IOC meeting.
IOC President Jacques Rogge paid tribute to the candidates. "I would like to congratulate three excellent bids. I had predicted a close call," he said. "Sochi won deservedly."
But some saw the result as a blow for Rogge, who sources have told AFP, had lobbied within the IOC executive to favour Pyeongchang.
Putin had been named 'captain of the team' by the Russian delegation and he also spoke French during his presentation. Putin press officer Dmitri Peskov said that the president, who was already returning to Moscow, was "very happy" with the result.
"He knows there's a lot of work to do.
"The role of the president in our victory should not be underestimated.
"He did everything and more to make it happen."
Residents of Sochi were ecstatic.
"I've forgotten what it's like to be this happy," said Zagir Sadigov as he watched the vote on the giant screen in the resort.The decision was followed by a chant of "Russia, Russia" and a burst of fireworks over the square's enormous Stalin-era theatre.
Many observers said Putin played a decisive role in the Sochi bid as Britain's then prime minister Tony Blair did when London beat Paris to the 2012 Olympics.
"This is a great day for Russia and we are really happy," said Russian Deputy Prime Minister Alexander Zhukov, a driving force behind the bid.
Sochi had battled hard to overcome the impression of being a virtual reality bid with no venues, but the final ace was the arrival of Putin.
For the Koreans this was a desperate blow as they had topped the seemingly vital IOC Evaluation Commission published just a month before the decision.
Their reaction was one of disbelief and tears were shed.
"I don't know what happened," said a red-eyed Kim Jin-sun, governor of Gangwon province where Pyeongchang lies.
"I am so sorry, so sorry and I don't really want to say anything."
Another member of the delegation, who asked not to be named, estimated that the South Korean resort had spent about 55 million dollars (40 million euros) on the bid, though Sochi are believed to have spent 80 million dollars (60 million euros).
Pyeongchang bid chairman Han Seung-Soo pushed away Lord Sebastian Coe, mastermind of the London bid, as the athletics legend approached him to console him.
Salzburg were also left tearful as they exited in the first round, having finished third for the second successive time.
Austrian Chancellor Alfred Gusenbauer made a barbed comment about the amounts of money spent by the other two candidates, whereas Salzburg spent just 13 million dollars.
"If it's about power politics and finance then Salzburg doesn't stand a chance," said the Austrian leader. "I am sure the concept we presented was the best.
"It was a strategic decision. It was an economic and political powerplay. The IOC has made a clear choice.
"This is a decision which indicates the way they want to go from now on and this is wrong for the sport and for the IOC and Olympic Movement."