Dublin has been rated one of the worst cities in the world to emigrate to due to the lack of affordable housing and high cost of living.

The Irish capital has been ranked just 47th out of 51 cities in a newly-published global survey of almost 13,000 respondents.

The Expat City Ranking 2017 found that Dublin was the second worst major European city in terms of quality of life, with Paris further behind in 49th spot.

The sprawling Nigerian city of Lagos and the Saudi Arabian cities of Riyadh and Jeddah were the only other urban destinations that fared worse in the survey.

The Munich-based study by InterNations found Dublin particularly wanting in terms of accommodation, with housing opportunities rated the second-worst in the world, in 50th position, ahead only of pricey Stockholm.

Further analysis of the housing sub-section revealed that almost nine in ten expats in Dublin found local accommodation unaffordable — more than twice the global average. The other big gripe for foreigners who have moved to Dublin is their financial situation, with almost half complaining that they don’t make enough to make ends meet.

However, Dublin is ranked highly for career opportunities, coming in in 11th place, with 65 per cent of respondents rating this factor positively. Dublin also scored highly for local friendliness, with 84 per cent of expats giving the thumbs-up to the warmth of the people — compared to a global average of just 65 per cent.

Commenting on the Irish capital’s poor performance in the new survey, the company’s CEO Malte Zeeck said: “Apart from the bad climate, Dublin’s poor performance is mostly due to the perceived high local cost of living and the difficulty to find affordable housing. However, the friendly Irish people still charm the expats and help them feel at home.”

At the other end of the table, Manama, the capital of Bahrain, was rated the city with the best quality of life in the world. It was closely followed by Prague, Madrid, Kuala Lumpur and Amsterdam. London was rated 31st of the 51 urban destinations that were surveyed.

Best 5 cities (out of 51 surveyed):

1. Manama

2. Prague

3. Madrid

4. Kuala Lumpur

5. Amsterdam

Worst 5 cities:

47. Dublin

48. Riyadh

49. Paris

50. Jeddah