By SIMONE SCULLY, originally published on Upworthy.com

On a quiet hike in Yellowstone National Park, some lucky visitors might get to hear an amazing sound: the howl of a gray wolf.

They might even get to spot one of these beautiful animals darting across the landscape. In fact, today, the chances of seeing a wolf in some parts of this park — such as Lamar Valley — are so good that some people come just to wolf-watch.

But for most of the 20th century, it was impossible to view these animals at all inside the park. In fact, it was hard to see a gray wolf anywhere in the lower 48 statesThat is because ever since settlers moved west, they feared the great gray wolf. The fact that wolves started killing livestock didn’t help either.

So, starting in the late 1800s up until the 1920s, wolves were hunted and poisoned by ranchers and predator control programs in order to protect people, livestock, and other “more desirable” wildlife species.  In the end, not a single breeding pair of wolves remained in Yellowstone National Park.

When Yellowstone lost its wolves, it caused some big problems for the whole ecosystem.

Wolves are apex predators, which means they are at the top of the food web. When wolves were eliminated, it caused what scientists call a top-down trophic cascade. In other words, the whole ecosystem became unbalanced.

“Most ecosystems are best when they’re balanced,” Doug Smith, project leader for the Wolf Restoration Project in Yellowstone, said in a National Park Service Q&A. “Having a lot of different kinds of things at moderate numbers is better than having a lot of any one thing.”

Without wolves, there was a lot of one thing: elk. And biodiversity across the entire park declined as a result.

Why? Because without one of their major natural predators, fewer elk were dying. Their numbers grew so much that they ended up overgrazing large areas of land, leaving them vulnerable to erosion and defoliation.

This hurt plants and other animal species. Willow and aspen trees started dying off — and that hurt the species that relied on these trees for their survival, such as the birds that use them as nesting grounds and the beavers that use the wood to build dams and survive the winter.

The numbers of rabbits and mice species fell, too, because of all the overgrazing. They simply had fewer places to hide from predators.

Everything started to change after scientists reintroduced 41 wolves into Yellowstone National Park.

From 1995 to 1997, wolves were captured in Canada and northwest Montana and transported to Yellowstone. Once there, each was radio-collared and temporarily penned so biologists could make sure they were healthy. Then they were released into the wilderness of the park.

The wolves thrived in their new home.

The newly formed packs spread out and established their territories, and the large populations of elk and deer provided them with ample prey. And because they were inside the national park, the animals were protected from hunters. So their numbers grew.

Before long, the wolves started changing Yellowstone’s ecosystem all over again, but this time for the better.

The first thing that happened was the number of large prey dropped. In 1995, Yellowstone was home to about 18,000 elk, but by 2015, that number had dropped to 4,500, helping restore the ecosystem’s natural balance.

Scientists think this happened, at least in part, because wolves started to change their prey’s behavior. Deer and elk started avoiding areas where they could be easily hunted, such as open valleys and gorges, which caused those areas to regenerate. Plants started growing on the riverbanks and erosion decreased, causing rivers and streams to actually change course.

Meanwhile, birds, beavers, mice, and bears started returning to those once-barren areas. The landscape of the whole park transformed, and the ecosystem as a whole became healthier.

Because they are carnivores, wolves often get a bad rap — but the Yellowstone story shows just how important they are to our planet.

The ecosystem in Yellowstone is complex and always changing, but recent history has shown scientists and ecologists how important wolves are to keeping the natural balance. It is true that wolves hunt large animals, but they are not just killers — they also help other species thrive.

We all know the story about the “big bad wolf.” But today, Yellowstone National Park is helping us learn a different story about wolves, and this is one is a lot happier.