Rio de Janeiro has won the battle to host the 2016 Olympics and take the games to South America for the first time after the shock elimination of Chicago in the first round of voting today.

There were celebrations on the streets of Rio this evening after the announcement by the IOC president, Jacques Rogge.

Before opening the envelope containing the name of the winning city, Rogge said: "All four projects are of the highest quality – thank you for your hard work, energy and commitment. But in every competition there can only be one winner."

Earlier the Brazilian president, Luiz Inácio Lula da Silva, made an impassioned appeal to delegates, saying Rio's bid represented the hopes of the whole of South America. "I honestly think it is Brazil's turn," he said. "It is South America's bid. This is a continent that has never held the games. It is time to address this imbalance. It is time to light the Olympic cauldron in a tropical country."

The city's bid chief said awarding the honour to Brazil was an opportunity to make Olympic history.

"When you push the button today, you have the chance to inspire a new continent, make Olympic history," said Carlos Nuzman, the Rio bid chief executive and IOC member. "Vote Rio and we offer a gateway to 180 million passionate young people in South America."

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

In the end Rio's excellent campaign masterminded by Mike Lee, the communications director for London's bid, proved enough.

In Chicago, thousands of people who had crowded into the city's Daley Plaza anticipating a celebration let out a collective gasp at the news of their bid's failure. Even those who were ultimately sceptical about the bid were shocked to learn the city did not even make the first cut.

"I've never really had a disappointment like this," said Ken Rudd, a 33-year-old salesman, as the dumbfounded crowd slowly filed out of the plaza. "This is one of the saddest things I've ever seen."

Chicago had been the bookies' favourites to succeed London, especially after Barack Obama flew to Copenhagen to address the IOC this morning. His home town's early exit was seen as a snub for Obama, the first serving US president to appear before the IOC. He told delegates he hoped that the games would show "America at its best is open to the world". Michelle Obama arrived two days earlier alongside other dignitaries including Lula and King Juan Carlos of Spain.

With the games going to South America for the first time, Africa is the only continent where none of its countries has been awarded an Olympics.