London is one of the worst cities in the world for quality of life, safety and personal happiness, according to a new survey of expatriates.

Networking service InterNations surveyed 14,000 people for its third annual InterNations Expat Insider 2016 survey — in what it claims is "one of the most extensive studies ever conducted to explore the general living situation of expatriates."

The results showed that expats were deeply unimpressed with Britain's capital and ranked it 27th out of 35 cities for best place to live. This is mainly because it scored poorly across nearly all main subindexes, where it came fifth.

Here is how it ranked across other categories:

Quality of life — 24th

Leisure options — 26th

Personal Happiness — 33rd

Travel & Transport — 18th

Health & Well-Being — 24th

Safety & Security — 24th

InterNations conducted the survey before Britain voted to leave the European Union on June 23 but it said:

"Even in pre-Brexit UK, expats in London rated the safety at a relatively low 24th position out of 35 cities. Among London-based expats, the ratings for personal safety are on par with the global average of 77% positive responses.

"At 65% peacefulness, on the other hand, is well below the global average of 75 percent. As the data was collected before the referendum in June, 80% of expats still rated the political stability of London positively, compared to a 61% global average.

"However, the impact that Brexit will have on expats’ perceptions of London and the UK in general is still unclear, especially since the High Court’s Article 50 ruling on 3 November, which may delay any political action even further. Nonetheless, it is unlikely to have a positive effect on expats living and working in London."

But there was one bright spot for London in the rankings, and which explains why so many expats look to live in London, despite rating the capital poorly for main reasons — jobs.

The InterNations survey shows that London comes in at 16th place for the Working Abroad Index.

It also scored highly in is the Job & Career subcategory of the index, coming in fifth place.

"Overall, job satisfaction is fairly good, at 69% just a bit higher than the global average of 64%. The results for career prospects are more impressive as 76% of respondents rate this factor positively, which is significantly above the worldwide average (55%)," said InterNations.

Read more: