Tokyo celebrated on Sunday after winning the right to host the Olympic Games for the second time, overcoming fears about radiation from the stricken Fukushima nuclear plant to land the 2020 edition of the world's biggest sporting event.
Members of the International Olympic Committee (IOC) meeting in Buenos Aires chose the Japanese capital, which previously hosted the Games in 1964, over Istanbul, after Madrid was dramatically eliminated following a first-round tie with the Turkish city.
Thousands of Japanese who gathered in Tokyo in the early hours of Sunday erupted in joy, making V for victory signs and shouting "banzai!" (hurrah!) and "Tokyo!" as the result was beamed live from the Argentine capital nearly a dozen time zones away.
At the Tokyo Chamber of Commerce and Industry, crowds shouted "arigato" (thank you) in unison, several television hosts and their guests were lost for words and in tears, while at the Komazawa Olympic Park -- venue of several sports at the 1964 Games -- golden tinsel rained down in celebration.
"I have been waiting a long time for this feeling," bid chief Tsunekazu Takeda said in Buenos Aires. "The members of the IOC have seen that Tokyo is a safe pair of hands."
Tokyo city governor Naoki Inose added that the Olympics would help Japan recover from the devastating 2011 earthquake and tsunami that claimed more than 18,000 lives and vowed no let up to create what he said would be "the best Games ever".
Japan's Prime Minister Shinzo Abe had earlier flown to South America from the G20 summit in St Petersburg, Russia, to reassure nervous members about the safety of the nuclear plant some 220 kilometres (140 miles) from Tokyo amid fears about the leaking of contaminated water.
He told delegates that the situation was "under control", adding: "It has never done or will do any damage to Tokyo."
Concerns over Fukushima -- seriously damaged by the quake and giant waves two-and-a-half years ago -- had dogged the bid in the final days despite Tokyo's branding as a safe and sound city, but Abe successfully allayed IOC members' fears.
The final result was 60 votes for Tokyo against 36 for Istanbul.
Japanese networks broadcast the voting in special programmes screened through the early hours, while newspapers issued commemorative editions with jubilant banner headlines that were delivered free on the streets.
"We have now been given a dream, a hope, and a future," Abe told Japanese television.
"Japan has had 15 years of economic stagnation... and we've lost confidence in ourselves. But I hope this will be a chance for us to regain our confidence," he said in another live broadcast.
The vote for Tokyo -- which came third in the race for the 2016 Games won by Rio de Janeiro -- means it will be the fourth time Japan plays host to the Olympics, having also organised winter Games in Nagano (1998) and Sapporo (1972).
Asia will see successive Olympics as the South Korean resort of Pyeongchang is hosting the 2018 winter edition.
Madrid had looked to be the city with the momentum coming into the final week after an outstanding presentation to IOC members in Lausanne in July, and were hoping they could go on to win.
But doubts about Spain's recession-hit economy persisted to the end, and Prime Minister Mariano Rajoy's pledges that financing would not pose problems failed to convince.
News that Madrid had been eliminated was greeted with shock by crowds who had prepared for a victory party, and tennis superstar Rafael Nadal who had been a tireless campaigner said in New York that it had not been treated fairly.
Istanbul had been hoping Turkey would become the first predominantly Muslim country to host the quadrennial sporting extravaganza.
But despite a passionate and dynamic campaign trading on bridging two continents and two cultures as well as an evocative "wake up in Asia compete in Europe" slogan, their bid was hampered in June.
Several IOC members were unimpressed by the heavy-handed way that the Ankara government handled anti-government protests, and there was nervousness over the fallout from the bloody civil war in neighbouring Syria.
Prime Minister Abe cited in his presentation his experience meeting one of the children on a trip to visit survivors of the earthquake and tsunami, and said sport had a key role in society to aid recovery.
"I met with one boy in the affected area, he was holding a cherished football, given to him by a footballer from overseas who had visited the area," the premier said.
"That ball was not just a football to him, it represented his hope for the future.
"Today under the blue sky of Fukushima there are young boys playing football and looking into the future and not the past."