elderly person SpainMaximino San Miguel, 102, holds a picture of himself when he was young as he poses for a portrait in a park near his home in Leon, northern Spain, on September 3, 2016. San Miguel discovered his passion for amateur dramatics at the age of 80 and has participated in many local productions.Andrea Comas/Reuters

Spain is on track to have the world’s longest life expectancy by 2040 with a lifespan of 85.8 years, surpassing Japan.  

A report from the Institute for Health Metrics and Evaluation, which formed in 2007 with funding from the Bill and Melinda Gates Foundation, found that Japan will fall to second place with a life expectancy of 85.7 years. Although the report does not provide reasoning for each country’s ranking, the institute analyzed 250 different causes of death to reach conclusions.

Researchers took into account high blood pressure, tobacco usage, unsafe water and sanitation, air pollution, child malnutrition, and many other factors. 

Read more: Spain will have the world’s longest life expectancy in the next 20 years — and the US will fall behind China in the rankings

Spain is one of only four countries set to exceed an 85-year life expectancy by 2040. The country spends about 10% of its GDP on healthcare, according to the online expat guide Expatica. Spain also ranks very highly in global lists of healthcare systems. In the World Economic Forum’s 2018 Global Competitiveness Report, for example, Spain tied for the healthiest country in the world.

Here are some of the reasons why people in Spain live so long.