The cities with the worst quality of life in the world tend to have the toxic mix of political stability, crime, as well as low standards of living.

Every year, Mercer, one of the world's largest HR consultancy firms, releases its Quality of Living Index, which looks at the cities that provide the best quality of life.

Business Insider has already looked at the 27 cities with the best quality of life and also the 17 European cities that are deemed the most unsafe.

Now we take a look at what cities are ranked as providing the worst quality of life.

The ranking is one of the most comprehensive of its kind and is carried out annually to help multinational companies and other employers compensate employees fairly when placing them on international assignments, according to Mercer.

Looking at 450 cities across the world, Mercer takes into account the following metrics to judge which cities made the list for the best quality of life — which therefore shows what it feels are the best and worst:

Political and social environment (political stability, crime, law enforcement)

Economic environment (currency-exchange regulations, banking services)

Socio-cultural environment (media availability and censorship, limitations on personal freedom)

Medical and health considerations (medical supplies and services, infectious diseases, sewage, waste disposal, air pollution)

Schools and education (standards and availability of international schools)

Public services and transportation (electricity, water, public transportation, traffic congestion)

Recreation (restaurants, theatres, cinemas, sports and leisure)

Consumer goods (availability of food/daily consumption items, cars)

Housing (rental housing, household appliances, furniture, maintenance services)

Natural environment (climate, record of natural disasters)

Mercer made a list of 230 countries, and Business Insider took a look at the bottom 27 in the world:

27. Lome, Togo — The city is the largest in Togo and holds high unemployment rates. Its infrastructure is also deteriorating and the African nation faces problems with living conditions and rubbish collection.

26. Tashkent, Uzbekistan — The capital in the central Asia country has become a hotbed for terrorism over the last year. In 2015, the US embassy in Tashkent was attacked for the first time in 11 years and the government is trying to counteract growth in Islamic extremism.

25. Abidjan, Cote D'Ivoire — It's the economic capital of the Ivory Coast but the British embassy has issued warnings against anyone travelling there unless essential. It said "violent crime can occur at any time" and that the city, and the country, has a "high threat of terrorism."

24. Addis Ababa, Ethiopia — The capital city is going through a building boom but many of its citizens are suffering from extreme poverty. On top of that, social friction between the government and its citizens is high, especially after protests over building plans killed students and farmers.

23. Ashgabat, Turkmenistan — The city is largely controlled by the government, mainly through a large percentage of employment coming from state-owned enterprises. Unfortunately, the city suffers from chronic water shortages due to state mismanagement, which is crippling for citizens where temperatures soared as high as 47.2 degrees Celsius (116.96 F) in 2015.

22. Harare, Zimbabwe — The capital, as well as the rest of the country, suffers from an oppressive government led by Robert Mugabe. The city is also poverty stricken and millions of citizens are starving due to 75% of maize crops failing, prompting Mugabe to appeal for £1.2 billion ($1.6 billion) to help pay for grain and other food.

21. Bishkek, Kyrgyzstan — Poverty is high in the economic centre of the country. Meanwhile, the government is battling continual attacks from members of Islamic State — also known as ISIS and Daesh.

20. Lagos, Nigeria — The country's largest city battles environmental threats, such as riptides, annually. Citizens are also under continual threats to their personal safety, including the kidnapping of students and murder.

19 (joint). Abuja, Nigeria — The city, like Lagos, suffers from high crime rates from inter-communal violence. The British Foreign Office tells travellers: "You could get kidnapped or find yourself caught up in a terrorist or other violent incident."

19 (joint). Dushanbe, Tajikistan — Poverty and energy shortages are a huge issue for the city and country as a whole. The World Bank also warns that doing business there is difficult due to the inadequate infrastructure.

17. Dhaka, Bangladesh — Dhaka is one of the world's most populated cities and its garment exports bolsters its economy. But working conditions and human rights, as well as local poverty for a bulk of its citizens, are criticised and under scrutiny by world governments and charities.

16. Ouagadougou, Burkina Faso — The city is under continual threat of terrorist attacks and earlier this year, an Al-Qaeda bombing on a popular hotel killed 29 people.

15. Tripoli, Libya — The city was carved up by two rival warlords last year and even the main airport was destroyed in the summer of 2015 and all the main embassies have been closed down. Migrants and refugees are also flooding into the country due to its proximity with Europe.

14. Niamey, Niger — Protests, governmental corruption, and local poverty place this city onto the list.

13. Antananarivo, Madagascar — The city, and the rest of the country, depends on agriculture for its economic growth. However political instability hinders any chance of continuous development.

12. Bamako, Mali — The city was rocked by terrorist attacks last year when Islamist militants took 170 hostages and killed 20 of them in a mass shooting at the Radisson Blu hotel.

11. Nouakchott, Mauritania — The city was originally a small village of little importance until 1958 until growing rapidly into one of the biggest cities in the Sahara. However, overcrowding, droughts, and poverty have helped fill the city with slums.

10. Conakry, Guinea Republic — The port city is riddled with personal safety issues. Violent crime, protests, and strikes wreak havoc in Conakry.

9. Kinshasa, Democratic Republic of the Congo — Ethnic nationalist conflict is rife in the city and NGOs have tried to step in to provide aid and food relief to the city and the rest of the country.

8. Brazzaville, Congo — Government corruption has triggered huge protests in the city which led to a number of people being killed by the police.

7. Damascus, Syria — Mercer says the city has "witnessed continual violence and terrorist attacks that weigh upon the daily life of locals and expatriates."

6. N'Djamena, Chad — The city in one of the world's poorest countries has suffered at the hands of militant Islamist group Boko Haram. The group carries out frequent suicide bombings in the city.

5. Khartoum, Sudan — It's the second largest city in Sudan and is a key recruiting ground for ISIS.

4. Port Au Prince, Haiti — The city is rife with violent crime and is dangerous for travellers. Rapes and robberies are common and there is a worrying growth in vigilante violence.

3. Sana'a, Yemen — The largest city in Yemen has been devastated by airstrikes from Saudi Arabia as the country has become a battleground in the proxy war between Iran and Saudi Arabia.

2. Bangui, Central African Republic — The capital city is incredibly poor and many citizens rely on aid for survival. On top of that, violent sectarian clashes erupt regularly in the area.

1. Baghdad, Iraq — The capital city has suffered severe infrastructural damage from several wars and continual on the ground violence. It continues to face threats from ISIS.

Read more: