Despite the fact that Istanbul was expected to be eliminated in the first round, it was Madrid that surprisingly lost out on a final spot. Both cities were level on points after the first ballot, meaning another vote was required. Of the 94 members of the IOC who voted second time around, 49 voted for Istanbul, with Madrid losing out on the chance to host the Games for the third successive time. Tokyo went on to beat the Turkish capital in the final, meaning the Japanese city will host the 2020 Olympics.
Madrid's first attempt was in 1965. The then mayor, Carlos Arias Navarro, bid to host the Games in 1972, only to lose out to Munich. On that occasion, the other competing venues at the Rome voting ceremony were Detroit (USA) and Montreal (Canada), along with the German city.
Almost 40 years on, Madrid Council decided to bid for the 2012 Games. This time round the Spanish capital was up against Istanbul, Havana (Cuba), Leipzig (Germany), London (UK), Moscow (Russia), New York (USA), Paris (France) and Rio de Janeiro (Brazil).
After a close vote, in which Moscow and New York were both eliminated in the first round, Madrid was knocked out in the third round, losing out by just two votes. The final vote saw London awarded the Olympics and Paralympics for 2012.
Madrid did not give up and decided to bid for the 2016 Games and made it through the first round with Chicago, Tokyo and Rio de Janeiro. Madrid deservedly got to the final, only to be defeated by Rio de Janeiro which had 46 votes, compared to Madrid's 29 and Tokyo's 20.