The polyphagous shot hole borer, a brown-black beetle from southeast Asia, never gets bigger than a tenth of an inch. It breeds inside trees; pregnant females drill into trunks to create networks of tunnels where they lay their eggs. The beetles also carry a fungus called Fusarium; it infects the tunnels, and when the eggs hatch, the borer larvae eat the fungus.

Unfortunately Fusarium also disrupts the trees’ ability to transport nutrients and water. Holes where the beetle bored into the tree get infected and form oily lesions. Sometimes sugars from the tree’s sap accumulate in a ring around the hole—that’s called a “sugar volcano.” The tree dies, and the wee baby beetles fly off to continue the circle of disgusting life.

This would just be a scary story for arborists and tree-huggers, except: Fusarium dieback is on track to kill 26.8 million trees across Southern California in the next few years, almost 40 percent of the trees from Los Angeles to the Nevada border and south to Mexico. That’s more than just an aesthetic tragedy. It means that thousands of human beings are going to die, too.

I’m not just being a monkeywrenching fearmonger. Dead trees mean dead people, and scientists are finally starting to figure out why. In the 1990s, spurred by a program to plant half a million trees in Chicago, researchers started trying to quantify the value of a tree beyond the fact that one is, like, at least slightly more lovely than a poem. It’s a field of study today called ecosystem services. “I’ve been trying to quantify the impacts of trees on rainfall interception, pollutants in the atmosphere, cooling and energy used by buildings, CO 2 stored and emitted,” says Greg McPherson, a research forester with the US Forest Service who conducted the latest study of SoCal’s trees. “But I think those are the tip of the iceberg.”

And at the base? Public health impacts—and differences in illness and death in populations that live near greenery versus those that don’t. It’s only been in the past few years that anyone has been willing to go out on a limb and associate morbidity and mortality numbers with nature. Oh, sure, everyone agrees that trees pull particulate-matter pollution out of city air. Simply by dint of being shady, trees reduce the “urban heat island” effect that drives people to run their AC all the time, a contributor to climate change. And, yes, trees inhale carbon dioxide, another win for the climate.

But fighting disease is a whole other question. What is a “dose” of nature? What’s the response curve? By what mechanism would a walk in the park alleviate, let’s say, heart disease? Is it the park? Or the walk? (Some Japanese researchers think trees literally emit life-giving chemicals, like that weird M. Night Shyamalan movie where trees kill people, but in reverse. No, wait, that’d be people killing trees, which actually happens. The converse, then.)

Whether the mechanism is stress reduction, pollution reduction, or increased physical activity, somehow trees make a difference. The biophysics is less important than the epidemiology. In 2013 another researcher with the US Forest Service named Geoff Donovan took advantage of the fact that another beetle, the emerald ash borer, killed 100 million trees across 15 states in the US. Using statistical models to rule out the impacts of a whole bunch of other potentially confounding factors—race, education, income—Donovan’s team was able to connect illness with places that had ash borer infestations and concomitant loss in tree cover (which you can see in satellite imagery).

His result: Counties with borers had 6.8 additional deaths per year per 100,000 adults from respiratory disease, and 16.7 deaths from cardiovascular disease. Over the arc of the paper, that means 100 million dead trees—roughly 3 percent of tree cover on average—killed 21,193 people. “The implicit thing I’m saying here is that if you either kept the trees or increased the amount, you’d get the opposite effect,” says Donovan, now on a sabbatical at Massey University’s Center for Public Health Research in New Zealand. “I don’t think it’s the worst assumption in the world.”

Donovan isn’t the only one on the case. A 2015 meta-analysis of the few studies that had tried to take up the issue showed that higher exposures to green space, even controlling for things like poverty and education level, indeed resulted in a statistically significant reduction in death from cardiovascular disease. Other outcomes, like higher-birthweight babies and lower rates of antidepressant prescriptions, have also shown up in the literature.

That means that if Southern California doesn't somehow stave off the loss of 11 percent of its tree cover, that loss is going to be deadly over time. “It’d probably be unwise to try and just turn the crank and say, ‘That’s going to be X thousand people,’” Donovan says. But the risk isn’t one of overstatement. Southern California has a much higher population density than the area he studied. “You might anticipate a major public health impact.”

That’s what McPherson is worried about, too. He was collecting data on California trees and Fusarium dieback for a journal article when he met John Kabashima, an entomologist working for the University of California on the Fusarium problem—an invasive pest that wasn’t jeopardizing crops but landscape. Kabashima realized that McPherson’s data might be what he needed to get some bureaucratic attention. What McPherson had come up with was, as he says, “the first statewide assessment for California, and probably the first nationally to combine satellite data and field plot data, and to incorporate the benefits and services of trees.” By his count, if the beetles spread as widely as he’s predicting, it could cost $1.4 billion in lost ecosystem service benefits—not counting the public health cost.

The next step will be figuring out what to do about the bugs. “A normal response to an invasive pest means millions of dollars would be thrown at it,” Kabashima says. “This one has received hundreds of thousands.” The people he’s working with at least know that it’s not enough to cut down an infected tree. If you don’t chip it, the beetles inside survive to infect another host. And the little holes and sugar volcanoes tend to show up first1 on the north side of the trunk or limb. “You have to get out and walk around each tree, which we’re doing in Orange County parks,” Kabashima says. “We go out on off-road Segways. We can cover square miles in a day.”

Meanwhile, all over the state, McPherson and other forestry researchers are looking for new species of trees to replace the ones sure to be lost. Resistance to shot borers and Fusarium won’t be the only criteria. “We developed a five-step process for identifying promising trees, scoring them on factors like drought tolerance, salinity tolerance, invasiveness,” McPherson says. Even characteristics like root depth might be important—deeper roots mean less destruction of sidewalks. “We’ve narrowed it down to 12 new species for coastal Southern California and 12 for the inland.”

The problem is, it takes a lot longer to grow experimental tree species and see if they’re up to spec than it does for drought, polyphagous shot borers, and fungus to do their work. The race is on—and not for all the usual reasons. “We don’t think of trees as something essential to our urban infrastructure, like roads or sewers. In fact, we see them as something that can interfere with those things,” Donovan says. “But health benefits are where it’s at. Trees are an essential part of our public health infrastructure.” If you believe that the ballpark value of a statistical human life, stated most coldly, is around $7 million, then the potential of tens of thousands of additional lives lost makes the cost of saving trees, and getting healthier ones planted, a bargain.

1UPDATE 5/9/17 10:20 AM Corrected to more accurately reflect the progress of polyphagous shot hole borer infestation.