COPENHAGEN, Denmark - The 2016 Games are going to Rio de Janeiro. Finally, South America gets an Olympics.

In a vote of high drama, the bustling Brazilian carnival city of beaches, mountains and samba beat surprise finalist Madrid, which got a big helping hand from a very influential friend.

Chicago was knocked out in the first round, despite in-person lobbying by President Barack Obama -- one of the most shocking defeats ever handed down by the International Olympic Committee. Even Tokyo, which had trailed throughout the race, did better -- eliminated after Chicago in the second round.

Rio spoke to IOC members' consciences: the city argued that it was simply unfair that South America has never hosted the Games, while Europe, Asia and North America have done so repeatedly.

"It is a time to address this imbalance," Brazil's charismatic president, Luiz Inacio Lula da Silva, told the IOC's members before they delivered their verdict. "It is time to light the Olympic cauldron in a tropical country."

The final result was decisive: Rio beat Madrid by 66 votes to 32. Chicago got just 18 votes in the first round, with Tokyo squeezing into the second round with 22. Madrid was leading after the first round with 28 votes, while Rio had 26.

In the second round, Tokyo was eliminated with just 20 votes. Madrid got 29, qualifying it for the final round face-off with Rio, which by then already had a strong lead, with 46 votes.

Silva, a bearded former union leader, disappeared into a huge group hug with the joyous Rio team after IOC president Jacques Rogge announced the city's name. Football great Pele had tears in his eyes. On Rio's Copacabana beach, where the city will hold beach volleyball in 2016, the crowd of nearly 50,000 people roared. The party there was expected to go on well into the night.

Brazil will now hold the world's two biggest sporting events in the space of just two years: in 2014, it will stage the World Cup.

"My first sense was this was another chance for the Olympics to have a positive impact on a society going through change," Canadian Olympic Committee CEO Chris Rudge said of Rio's win.

Rudge is familiar with the feeling of winning the right to host the Olympics having been involved with Canada's successful 2010 bid.

"It's an emotional moment," he said. "You're happy beyond belief when you win and all the energy is drained when you don't."

The slap to Chicago was such that some IOC members were left squirming. The city's plans for Olympic competition along its stunning Lake Michigan waterfront had long made it a front-runner and earned support from the highest possible level -- President Barack Obama himself. His wife, Michelle, flew in two days before the vote to butter up IOC members, an essential part of the selection process. And Obama himself flew in Friday morning.

IOC members had seemed wowed, posing for photos with Mrs. Obama and taking souvenir shots of the president with their mobile phones. But, in the vote, Chicago was shunned.

"Either it was tactical voting, or a lot of people decided not to vote for Chicago whatever happened," IOC member Gerhard Heiberg said. "Nobody knows, but everybody is in a state of shock. Nobody believes it. I'm very sorry about it."

Rio's bid, while high on romance, is not without risk. Because of Rio's high crime and murder rates, security will be a constant issue in 2016. Preparing Rio for the Olympics will cost billions of dollars -- money that critics said could have been better spent on tackling the city's social problems.

But the lure of that untapped frontier proved too strong for the IOC to turn down.

"We have sent out a message that we want to go global," Heiberg said.

Now, Africa and Antarctica are the only continents never to have been awarded an Olympics.

Madrid's surprising success in reaching the final round came after former IOC president Juan Antonio Samaranch made an unusual appeal for the Spanish capital, reminding the IOC's members as he asked for their vote that, at age 89, "I am very near the end of my time."

Samaranch ran the IOC for 21 years before Rogge took over in 2001.

Obama himself only spent a few hours in the Danish capital and left before the result was announced. Former IOC member Kai Holm said that the brevity of his appearance may have counted against Chicago.

The short stopover was "too business-like," Holm said. "It can be that some IOC members see it as a lack of respect."

Senior Australian IOC member Kevan Gosper surmised that Asian voters may have banded together for Tokyo in the first round, at Chicago's expense.

"I'm shocked," Gosper said. "The whole thing doesn't make sense other than there has been a stupid bloc vote."

He worried that the shock exit could do "untold damage" to the already testy relations between the IOC and the U.S. Olympic Committee. They had recent flare-ups over revenue sharing and a USOC TV network.

"To have the president of the United States and his wife personally appear, then this should happen in the first round is awful and totally undeserving," Gosper said.

Added Dennis Oswald, another member: "It was a defeat for the USOC, not for Chicago."

The biggest bloc of voters on the IOC -- 46 -- are Europeans. The IOC's last two experiences in the United States were bad: the 2002 Salt Lake City Winter Olympics were sullied by a bribery scandal and logistical problems and a bombing hit the 1996 Games in Atlanta.

Obama had held out the enticing prospect of a Chicago Games helping to reconnect the United States with the world after the presidency of George W. Bush. He told the IOC earlier Friday that the "full force of the White House" would be applied so "visitors from all around the world feel welcome and will come away with a sense of the incredible diversity of the American people."

Now, Chicago can only rue what might have been. And Obama's gamble of expending his own political capital on the bid ended in failure.

The last U.S. city to bid for the Summer Games, New York, did scarcely better. It was ousted in the second round in the 2005 vote that gave the 2012 Games to London.

Tokyo did better than many expected by reaching the second round. It had offered reassurances of financial security, with $4 billion already banked for the Games.

But the fact that the Olympics were held only last year in Asia, in Beijing, handicapped the Japanese capital's bid.

Its plans for a highly compact Games, sparing athletes tiring travel by holding all but one event within eight kilometres of the city centre, were technically appealing. But the bid failed to generate real enthusiasm, even in Japan. Tokyo had the lowest public backing in IOC polls.

Tokyo's final presentation Friday to the IOC, while smooth and heartfelt, lacked the buzz that the Obamas and Rio generated. Tokyo was simply overshadowed, failing to convince IOC members that it really wanted or needed the Games.