Osaka is the third most liveable city in the world after Vienna and Melbourne, according to a recent global survey by the research unit of British magazine The Economist.

The Kansai metropolis boosted its ranking from last year, when it didn’t make the top 10. The report attributed its rise to improvements in “quality and availability of public transportation, as well as a consistent decline in crime rates.”

Calgary, Alberta, came fourth, followed by Sydney and Vancouver, British Columbia. Tokyo was joint seventh with Toronto, while Copenhagen and Adelaide, Australia, ranked ninth and 10th respectively.

The annual Global Liveability Index produced by the Economist Intelligence Unit ranked 140 global cities based on safety, health care, educational resources, infrastructure and the environment.

Vienna overtook Melbourne by a small margin, knocking the Australian city out of the highest ranking after seven years in the top spot.

The two metropolises have been neck and neck in the annual survey. This year, a downgraded threat of militant attacks in western Europe as well as the city’s low crime rate helped nudge Vienna into first place.

Vienna regularly tops a larger ranking of cities by quality of life compiled by consulting firm Mercer. It is the first time it has topped the EIU survey, which began in its current form in 2004.

At the other end of the table Damascus retained last place, followed by the Bangladeshi capital of Dhaka, and Lagos. The survey does not include several of the world’s most dangerous capitals, such as Baghdad and Kabul.

“While in the past couple of years cities in Europe were affected by the spreading perceived threat of terrorism in the region, which caused heightened security measures, the past year has seen a return to normalcy,” the EIU said in a statement about the report published on Tuesday.

“A long-running contender to the title, Vienna has succeeded in displacing Melbourne from the top spot due to increases in the Austrian capital’s stability category ratings,” it said, referring to one of the index’s five headline components.

Vienna and Melbourne scored maximum points in the health care, education and infrastructure categories. But while Melbourne extended its lead in the culture and environment component, that was outweighed by Vienna’s improved stability ranking.