Countries were also scored on the share of migrants in their population and the amount of money earned, as well as a UN assessment of integration measures provided for immigrants, such as language training and transfers of job certifications.

Switzerland placed third, behind Sweden and Canada, partly due to its perception as having a stable economy and good integration measures, said US News & World Report in a press release.

The alpine country now has over two million immigrants – a quarter of its population – with many attracted by multinational companies promising high salaries and an excellent standard of living.

Relatively low unemployment, the strong Swiss franc and a need for highly qualified workers have all contributed to rising immigration.

However it’s not all rosy.

A backlash against immigrants led by Switzerland’s largest political party – the right-wing Swiss People’s Party (SVP) – resulted in a controversial anti-immigration vote in 2014 and two years of subsequent political wrangling over the rights of EU citizens in Switzerland.

And in a 2016 Expat Insider study 36 percent of immigrants in Switzerland said the Swiss attitude towards foreign residents was generally bad, compared to the global average of 17 percent.

Switzerland’s ranking in that study fell sharply to 31st, after being as high as fourth in previous years, with immigrants particularly criticizing their adopted country for the difficulty of settling in and making local friends.

The country was praised for its healthcare, safety, transport and job security but slammed for unfriendly attitudes, the difficulty of integrating into local culture and the high cost of childcare.

Another 2016 survey painted a similar picture, saying while most foreigners in Switzerland earned high salaries and felt confident about the country’s political and economic stability, they found it difficult to make friends and have a social life.