Like sweet, sultry samba music, Rio hit all the right notes. Chicago had Barack Obama. Tokyo had $4 billion in the bank. Madrid had powerful friends. But none of that mattered. Rio de Janeiro had the enchanting story — of about 400 million sports-mad people on a giant untapped and vibrant continent yearning, hoping, that the Olympics finally might come to them. And the International Olympic Committee was hooked.

Olympians, we’ll see you on Copacabana beach in 2016. Let Carnival begin.

On a chilly Danish evening of high drama, the IOC on Friday sent the games of the 31st Olympiad to Brazil’s bustling, fun-loving but crime-ridden city of beaches and mountains, romance and slums.

The IOC closed its eyes to the risks — the huge projected costs of the Rio Games, the concerns about how athletes will get around and where people will sleep — to focus on the reward of lighting the Olympic cauldron in one of the last corners of the globe yet to be bathed by its light.

“It is Brazil’s time,” said the country’s charismatic President, Luiz Inacio Lula da Silva.

Chicago was knocked out in the first round — in one of the most shocking defeats ever handed down by the committee of former Olympians, sports administrators, royals and other VIPs.

IOC members said the slap to Chicago was more directed at the U.S. Olympic Committee than to the Windy City itself.

The win 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.

The indignity suffered by Chicago — long considered a front-runner — was such that some IOC members squirmed. Mr. Obama flew overnight from Washington to sell his adoptive hometown and its plans for Olympic competition on Lake Michigan’s windy shores to the IOC. First lady Michelle Obama, with talk show host Oprah Winfrey and sports stars in tow, jetted in first and spent two days buttering up IOC members, an essential part of the secretive and unpredictable selection process.

IOC members seemed wowed, posing for photos with her and taking souvenir shots of the President with their cell phones. But, in the vote, Chicago was shunned.

Mr. Obama called Mr. Silva to congratulate him, but the nature of the loss still rang as a stinging anti-American rebuke. Close to half of the IOC’s 106 members are Europeans.

“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,” senior Australian IOC member Kevan Gosper said.

French IOC member Guy Drut said “an excess of security” for the Obamas unsettled some of his colleagues. He complained that he’d been barred from crossing the lobby of his hotel for security reasons, and he grumbled that “nothing has been done” to resolve the financial disputes between the IOC and the USOC.

Of Mr. Obama’s performance, Mr. Drut said: “He didn’t do too much. Michelle Obama was exceptional.”

In Chicago, there was bewildered silence when IOC president Jacques Rogge announced: “The city of Chicago, having obtained the least number of votes, will not participate in the next round.”

On Rio’s Copacabana beach, where nearly 50,000 people roared when the winning city was announced, the party headed into the night.

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,” Mr. Silva told the IOC before it delivered its verdict. “It is time to light the Olympic cauldron in a tropical country.”

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

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

Beating three rich, more developed nations that had all previously held the games represented a giant, morale—boosting coup for Brazil. The emerging nation is bounding up the ranks of the world’s biggest economies but still has millions of people living in poverty.

Like a football team before a big final, Rio’s bid leaders and Mr. Silva held hands in silent prayer before walking out to deliver a flawless and impassioned presentation. A bid official said Mr. Silva’s last words of encouragement were “let’s stay calm, and stick with our plan.”

Silva delivered the knockout.

“Among the top 10 economies of the world, Brazil is the only country that has not hosted the Olympic and Paralympic Games,” he said. “For the Olympic movement, it will be an opportunity to feel the warmth of our people, the exuberance of our culture, the sun of our joy and it will also be a chance to send a powerful message to the whole world: The Olympic Games belong to all peoples, to all continents and to all humanity.”

Mr. Silva, a bearded former union leader, disappeared into a huge group hug with the joyous Rio team after Rogge announced that the city had won. Football great Pele had tears in his eyes. Brazil will now hold the world’s two biggest sporting events in the space of just two years: in 2014, it is hosting the World Cup.

“There was absolutely no flaw in the bid,” Mr. Rogge said.

Mr. Obama 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 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.”

But 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.

Former IOC member Kai Holm said the brevity of Obama’s appearance — he was in and out in five hours — may have hurt Chicago.

“Too businesslike,” Holm said. “It can be that some IOC members see it as a lack of respect.”

RELATED NEWS

Chicago, Tokyo lose out in 2016 Olympic bidOctober 2, 2009

More In: Sport | Other Sports