Madrid's bid to host the 2020 Olympics is over after they polled the least votes in the first round of voting at the International Olympic Committee's meeting in Buenos Aires.
Madrid was bidding to be the second Spanish city to host the Olympics, following Barcelona in 1992.
They were unsuccessful in a bid for the 1972 Olympics, finished third in the race to stage the 2012 Games and second behind Rio at the 2016 host city election four years ago.
The electorate for the first round of voting was just 95 of the IOC's 103-strong membership.
Five members - Ugur Erdener of Turkey, José Perurena, Marisol Casado and Juan Antonio Samaranch Jnr. of Spain, and Tsunekazu Takeda of Japan - come from countries which had a bidding city.
And General Mounir Sabet from Egypt and Finland's Saku Koivu - are not present in the Argentinean capital, while IOC president Jacques Rogge does not vote.
Incredibly, Madrid polled exactly the same number of votes as rivals Istanbul but after a secondary vote, with those who voted for Tokyo allowed to recast their ballots, the Turkish city progressed to final round.
Istanbul or Tokyo - who polled the most votes in the first round - will now follow Rio de Janeiro as the host city of the 32nd Olympiad.
Which city will host the Games is scheduled be announced at a televised ceremony commencing 9pm UK time.
It is the fifth time the Turkish capital had applied to host the event - having previously lost out in 2000, 2004, 2008, and 2012.
Tokyo staged the Olympics in 1964 while Japan were also hosts of the 1998 Winter Olympics in Nagano. Toyko is bidding for the fourth time having been unsuccessful in their candidature for the 1960 and 2016 Games.
© Sportsbeat 2013