People living in Spain are projected to have the longest life expectancy by 2040, according to a new study that also predicts a significant increase in premature deaths from non-communicable diseases and injuries.

Spanish people, who in 2016 were ranked fourth in terms of life expectancy with 82.9 years, are projected to have an average lifespan of 85.8 years in 2040 — the longest in the world. They will relegate Japan — whose average lifespan of 82.9 years ranked them first in 2016 — to second place with 85.7 years.

That's according to a study by the University of Washington's Institute for Health Metrics and Evaluation published in The Lancet on Tuesday.

Two other countries are projected to have an average lifespan exceeding 85 years for both sexes: Singapore (85.4 years vs 83.3 years in 2016) and Switzerland (85.2 years compared with 83.3 years in 2016).

At the other end of the spectrum, four countries in sub-Saharan Africa are estimated to have life expectancies of less than 65 years, with the lowest average lifespan projected to be in land-locked Lesotho, in southern Africa, with 57.3 years.

China gains, US loses out

If recent health trends continue, China could see its average lifespan jump from 76.3 years in 2016 to 81.9 years in 2040, thus climbing 29 spots to rank 39th among 195 nations.

Other notable gains include Syria, which is expected to rise from 137th in 2016 to 80th in 2040 "due to conservative model for conflict"; Nigeria, expected to reach 74.8 years by 2040; and Indonesia, where the average lifespan should lengthen by about five years.

In contrast, in the United States life expectancy is forecast to increase only 1.1 years by 2040 to 79.8 years. Its rank will then fall from 43rd in 2016 to 64th in 2040.

Several other high-income nations are forecast to drop substantially in their rankings including Canada (from 17th to 27th), Norway (from 8th to 20th), Taiwan (from 35th to 42nd), Belgium (from 21st to 28th) and the Netherlands (from 15th to 21st).

'Significant increase' in preventable deaths

All countries should see a slight rise in life expectancy, although the study notes that the increase will be slower than in previous years.

Risks that generally improve alongside gains in development such as child malnutrition, household air pollution, unsafe water and sanitation are projected to continue to decrease. Behavioural risks, including drinking, smoking and diet, however, are expected to increase.

This helps explain why the study projects "a significant increase in deaths from non-communicable diseases", including diabetes, chronic kidney disease and lung cancer, as well as worsening health outcomes linked to obesity.

However, the study's authors say that there is "great potential to alter the downward trajectory of health" by addressing key risk factors, levels of education and per capita income.

"Inequalities will continue to be large," Christopher Murray, director of the Institute, said in a statement.

"But nations could make faster progress by helping people tackle the major risks, especially smoking and poor diet," he added.