Mountain lions and wolves have suffered from our ignorance ever since pioneers inundated their wilderness homes. But an emerging view of mountain lions’ unique ecological role is coming into focus.

Early settlers who saw only blood-thirsty threats to life and livestock pushed for extermination, aided even by early conservationists who mistakenly blamed predators for dwindling deer and antelope herds. Aldo Leopold famously called for killing every last lion and wolf to safeguard game in 1920, then had a change of heart after emptying his rifle into a family of wolves and watching the life pass from the mother’s eyes. He later lamented his misguided campaign upon seeing “many a newly wolfless mountain” filled with deer trails and “every edible tree defoliated.”

Biologists have since shown that wolves and lions don’t just foster plant biodiversity by keeping deer and other herbivores in check. They also supply bobcats, coyotes, ravens and other scavengers with a steady stream of food, a particularly critical service during winter and other lean times.

And now recent evidence suggests that mountain lions play yet another vital role: ecosystem engineer. Just as beaver ponds create habitat for fish, amphibians and other species, lion kills create habitat for nature’s janitors, insect “decomposers” that break down rotting flesh and liberate nutrients for soil microbes and plants.

Granted, rotting flesh might not be the first thing that comes to mind when you think of habitat. But the large chunks of meat lions leave behind create a rich resource that supports entire insect communities and fosters the biodiversity necessary for ecosystem health.

“The second you get a dead animal like a deer, the number of linkages in a food web just skyrockets,” says Mark Elbroch, who led the recent study as Puma Program Director for Panthera, the global wild cat conservation organization. (Mountain lion, puma, cougar all refer to the same species, Puma concolor.) Suddenly animals that don’t normally interact with such a large animal—red squirrels, chickadees, eagles, bobcats, fishers and, now, beetles—are feeding on its remains.

Predators like wolves and lions run the animal kingdom’s version of meals on wheels, distributing food on a regular basis to those in need. But lions, it turns out, distribute food in their own way.

Wolves generally hunt more often than lions do, Elbroch says, but wolves tend to dismantle a carcass and leave fewer scraps. And mountain lions are not inclined to fight when hungry interlopers like wolves or bears show up, so they’re forced to leave big hunks of meat behind and hunt more often. As a result, he says, they may fill a unique and critical role in the ecosystem.

In a 2012 study in Patagonia, Elbroch found that the big cats left more than three times as many table scraps as wolves did in Yellowstone. And more recently, his team documented 39 species of birds and mammals feeding on lion kills in the Greater Yellowstone Ecosystem. “That’s the highest diversity ever recorded in a scavenger study anywhere in the world,” Elbroch says.

So far, at least 275 species have been tied to the food mountain lions leave behind.

And those species, Elbroch is discovering, are benefiting in surprising ways. Foxes never feed on a carcass when a lion is nearby in the summer to avoid turning into the cat’s next meal. But in winter, when food is scarce, he found, they’re just as likely to feed when cats are present as when they’re gone. And data from radio-tagged golden eagles has shown that when juveniles overwinter in the mountains near Jackson, Wyoming, they spend most of their time on cat and wolf kills.

Once the vertebrate scavengers have their fill, invertebrates like flies and beetles take over. In the recent study, Elbroch’s team set out to understand how beetles benefit from lions’ leftovers by sampling 18 fresh carcasses, mostly deer and elk, over the summer of 2016 in northern Wyoming. Lion kills hosted 215 species of beetles, representing eight families of carcass “specialists,” he found.

The beetles live their whole lives on these mountains of meat, Elbroch says: seeking mates, contending with competitors, foraging, avoiding predators, mating and producing young that grow and develop while feeding on the carcass. Then they disperse to find the next carcass and start the cycle anew.

“We would love to get to the point where we could say you need this many predators in your ecosystem to maintain this diversity of beetles,” Elbroch says.

A recent study lends urgency to his goal: more than 40 percent of insect species, including several found on lion carcasses, are in danger of extinction. These insects in turn support numerous critically threatened taxa, from amphibians to bats and birds.

It’s also likely that the carcass pumps nutrients into the soil that nourish surrounding vegetation, attracting deer and elk, which in turn attract pumas and other predators to sustain the cycle of life.

Elbroch hopes that once people appreciate all the ways mountain lions build ecological resilience, they’ll see them not as threats but as vital players in a healthy ecosystem—a role that will become increasingly critical as climate change and vanishing biodiversity undermine the health of our own communities.

These wide-ranging carnivores are rapidly losing habitat and die by the thousands in human encounters, both in legal hunts and to appease livestock owners who lose animals to lions. Though state hunting programs aren’t designed to exterminate lions the way they were in Aldo Leopold’s day, their ecological consequences could prove as dramatic.

The Panthera team recently discovered that older cats tend to hunt elk while less experienced, younger cats favor easier to manage deer. Killing mostly older males—which states like Colorado do under the auspices of protecting mule deer—could backfire by selecting for cats that specialize on deer.

It’s time to retire the old-fashioned predator-management approaches that “kill as many as you can” to protect their prey, Elbroch says. He’s optimistic that the tide is turning: “As divided a country as we are, I think there’s still forward movement.”