On the northeastern edge of Denver, a masked bandit is plotting a midnight raid.

It’s no ninja, but a black-footed ferret — until recently one of the most endangered species in the West — in search of its next meal. Prairie dogs, beware.

This struggle is playing out within sight of downtown and the Rocky Mountains inside one of the largest urban wildlife refuges in the country. Sure, most cities don’t have a wildlife refuge on the urban fringe, but Denver isn’t most cities: The Rocky Mountain Arsenal National Wildlife Refuge is less than 10 miles from downtown.

Once a contaminated U.S. Army outpost, the 15,000-acre refuge opened to the public in 2004 after 23 years of environmental cleanup. Bald eagles came to roost in the 1980s, and a bison herd was introduced in 2007. The arsenal is now home to 330 species, including burrowing owls, deer and snapping turtles.

Of all of the resident animals, the black-footed ferrets might just have the most compelling backstory. With a diet that’s nearly exclusively prairie dogs, the ferret population went into steep decline as habitat loss impacted prairie dogs in the 20th century. Researchers declared the black-footed ferret extinct in 1979.

That changed with the discovery of a colony (few dozen ferrets) near Meeteetse, Wyo., in 1981. Those ferrets formed the basis of a captive breeding program that catalyzed a comeback in the 1990s and 2000s. After reintroduction of about 150 to 200 ferrets a year at sites from Saskatchewan to Chihuahua, there are now more than 1,200 black-footed ferrets living in the wild in North America.

The initiative is based at the National Black-Footed Ferret Conservation Center near Fort Collins in Carr, Colo. Five zoos, including Cheyenne Mountain Zoo in Colorado Springs, also participate in the breeding effort.

The program brought ferrets to the arsenal in 2015. More than 50 have been released at the refuge, and there have been about 60 live births in the years since. “It’s amazing,” says Souders. “We’re thrilled. And they’ve been moving out.” A few ferrets have made their way north of the refuge.

There, the nocturnal mustelids, relatives of badgers and skunks, move from burrow to burrow on the hunt for prairie dogs, which make up more than 90 percent of their diet. Black-footed ferrets are extremely efficient carnivores: Nothing goes to waste.

“They're quite the predator,” says Cindy Souders, supervisory ranger at the Rocky Mountain Arsenal National Wildlife Refuge. “They each eat 100 prairie dogs a year.”

The arsenal is a smorgasbord on the high plains, a perfect match for the ferret’s sky-high metabolism. “They basically have to eat every day,” explains Souders, noting that the ferrets play a key role in the “very intricate” prairie ecosystem by keeping prairie dogs in check.

All microchipped for tracking purposes, the ferrets live in the arsenal’s bison management area, where visitors are required to stay in their vehicles. That means they are notably hard to spot — at least without a pair of binoculars and plenty of good luck.

There is a way to get up close and personal with a ferret: A pair of ferrets live in the Ferret House, an indoor/outdoor enclosure with 80 feet of simulated burrows behind the visitor center. Souders says they tend to be most active in the morning; the indoor exhibit opens up at 9 a.m. and the outdoor exhibit opens with the refuge gates at sunrise.

“It’s been a tremendous teaching tool for us about prairie wildlife and recovery of endangered species,” she says.

Check out the ferrets, but plan to spend at least a couple of hours at the arsenal. There’s a sustainable, state-of-the-art visitor center, 10 miles of hiking trails, places to fish and an 11-mile wildlife-watching drive.

Photo credits: Elisa Dahlberg/USFWS ​(top and middle); Cindy Souders/USFWS ​