A groan went out from Istanbul's historic Sultanahmet Square after hundreds of hopeful Turks heard the announcement on Saturday that Tokyo had been chosen to host the 2020 Olympics.
Hundreds looked stunned after having waited hours for the decision to be announced live from Buenos Aires in Argentina.
Istanbul, a city of some 15 (m) million, was competing against Madrid and Tokyo to showcase the games.
This was Istanbul's fifth bid.
International Olympic Committee members chose Tokyo through a secret ballot vote after having watched the three final presentations.
The crowd was ecstatic when just over an hour before the final announcement they watched the IOC declare that Istanbul had beaten out Madrid to reach a final round of voting against Tokyo.
But when the final announcement was made after 11 p.m. In Istanbul (2000 GMT), a brief sound of disappointment gave way to silence and the crowd quickly dissipated.
Tokyo had defeated Istanbul 60-36 in the final round of secret voting.
Turkey, an early favourite, seemed to falter in June when the government clashed violently with protesters.
Istanbul's bid may also have been hurt by a string of doping scandals among Turkish athletes and the uncertainty of neighbouring Syria's civil war.
One Istanbul resident said the repeated rejection for Istanbul in its fifth bid was difficult to take.
"They just don't want to give it to us," Rafet Pacali said. "Next time hopefully, if it's meant to be."
Another resident was still happy that the bid itself put Istanbul in the spotlight.
"In a way I'm kind of happy because the whole world was watching us. It was down to Tokyo and Istanbul. All eyes were on us, so in a way it was still advertising us," said Gul Uygur.
A Japanese student had mixed feelings about the announcement.
"I want Istanbul win. But I'm Japanese, so, you know. Yes, I'm happy," said Suguru Akayike, a Japanese exchange student who has been living in Istanbul for five months.
Istanbul's bid was hit hard by the anti-government protests in June and a slew of doping scandals among Turkish athletes. The proximity to the conflict in Syria was also cause for concern.
Istanbul's failed bid was a blow to Turkish Prime Minister Recep Tayyip Erdogan, who had flown to Buenos Aires to make the case straight from the Group of 20 summit in St. Petersburg, Russia.
Erdogan had argued that a successful Olympic bid for Istanbul would make it a first for a predominantly Muslim country in a city linking the continents of Europe and Asia.