Moscow and St. Petersburg have ranked in the bottom 50 of the world’s most livable cities and have been named the two most dangerous cities in Europe, according to rankings from a global consulting firm.

Moscow placed 167th and St. Petersburg 174th out of 231 cities worldwide in Mercer’s 2019 Quality of Living Ranking published on Wednesday.

“Moscow (200) and St. Petersburg (197) were Europe’s least safe cities this year,” Mercer said in a regional breakdown. Luxembourg was named Europe’s safest city.

Mercer says it considers 39 factors in categories such as “political and social environment” and “recreation” when developing its list. This year’s index was based on data analyzed between September and November 2018.

Vienna has topped Mercer’s index of most livable cities for the 10th year in a row. Zurich came in second, while Auckland, Munich and Vancouver tied in third – leaving the 2019 top five unchanged from last year’s rankings.

The 10 cities at the bottom of the ranking were also unchanged from last year, with Baghdad ranked last, followed by Bangui in the Central African Republic and Yemen’s capital Sanaa.

Reuters contributed reporting to this article.