When you're living in a city, green spaces can make a huge difference - not only to your mental health, but also your physical health. In fact, a new study suggests more access to nature could even prevent premature deaths.

In the US city of Philadelphia, new research has found planting more trees could actually save hundreds of lives each year, especially in poorer areas.

By ensuring a tree canopy of 30 percent in each neighbourhood, the authors of the study estimate 403 premature deaths could be avoided each year, and more than half of those lives would be saved in places with lower socioeconomic status.

Overall, that's roughly 3 percent of the city's annual mortality that could be avoided simply by making more room for nature. 

"While we have long suspected that trees helped us live longer healthier lives, we have not … until now invested in the science to quantify that," co-author Michelle Kondo, a social scientist at the United States Forest Service, told Inverse.

The study is based on a recent World Health Organisation meta analysis, involving over 8 million people, which found residential green spaces can protect against premature mortality of all causes - that benefit still exists even when you adjust for the health benefits of reduced air pollution associated with more green spaces.

To be precise, a four percent reduction in premature mortality was found for a certain amount of vegetation within 500 meters of a residence.

Taking this international data and applying it to a local scene for the first time, Kondo and her colleagues assessed what the mortality and economic impacts would be if Philadelphia succeeded in reaching its goal of 30 percent tree coverage.

At the time the study was done, the city was sitting around 20 percent tree coverage, and since then, more trees have been lost than gained.

But the goal has remained the same, and if the city can somehow green up in the next few years, removing concrete and other surfaces that plants don't grow on, it could have a huge impact.

Even if the city doesn't meet its 30 percent goal by 2025, and it only increases tree coverage by five percent in areas currently without trees, then it could still result in 302 less deaths citywide per year.

Valuing these lives in economic terms is shaky business, but using a common model, the authors found this translates to a saving of nearly US$3 billion.

Add five percent more tree coverage on top of that and the city would save an additional US$700 million or so.

"Although every city has its own characteristics, this study provides an example for all the cities in the world: many lives can be saved by increasing trees and greening urban environments, even at modest levels," concludes Mark Nieuwenhuijsen, director of the Urban Planning, Environment and Health Initiative at ISGlobal.

"What's more," he adds "green spaces increase biodiversity and reduce the impact of climate change, making our cities more sustainable and more liveable".

The study is a bird's eye view of how green spaces can impact mortality, based on data from more than 7 million people, but because it doesn't examine the individual causes of premature deaths, it's unclear how trees are actually saving lives on the ground. 

Nevertheless, the authors have a few ideas. They suggest greener space could contribute to greater social cohesion, less stress, more physical activity and the reduction of heat - combined leading to happier, healthier lives.

Affluent neighbourhoods tend to have more space, trees, and vegetation, so it's perhaps not surprising that increasing tree coverage had the biggest health benefits among areas of lower socioeconomic status.

"Urban forestry programs rarely achieve equitable distribution of trees across a city," the authors write.

And while Philadelphia's residential tree program is more equitable than other cities, the researchers acknowledge these interventions can often come with real legitimate fears of gentrification.

"Although further research is needed to assess whether trees contribute to displacement, tree planting in poor neighbourhoods might need to be coupled with additional programs and policies to maintain neighbourhood economic diversity, for example preserving affordable housing and assisting tenants at risk of displacement," they write

When done right, the authors argue urban greening programs can improve public health, decrease inequalities, and promote environmental justice all at once. 

The study was published in The Lancet Planetary Health.