This story appears in the December 2019 issue of National Geographic magazine.

Our task was simply to change some batteries.

But the batteries were in a radio collar worn by a male black bear in Bryce Canyon National Park, Utah. Wes Larson, a wildlife biologist at Brigham Young University who was figuring out how to reduce human-bear conflicts near backcountry campsites, had invited me along for a “little adventure”: We would tranquilize the bear while he was hibernating.

On a cold and clear day in February, Wes, his brother Jeff, his assistant Jordan, and I were following the GPS coordinates from the bear’s collar up a steep and into a red earth canyon covered in high desert brush and freshly fallen snow. The signal led us up the face of a steep hillside. The temperature dropped into the single digits as we poked at the snow, trying to locate the den’s entrance.

A weak radio signal led us to several empty dens, and as the sun set, we considered turning back. Then a curtain of snow collapsed, revealing a sandstone cave. It narrowed to a dark tunnel, and the musky scent of wild animal steamed from within.

The tunnel was barely wide enough for a person to turn around in, and it kinked to the left, obscuring our view of what lay inside. Wes didn’t hesitate. Armed with an expandable six-foot stick tipped with a tranquilizer syringe, he dived in headfirst. His brother crawled after him.

Thirty seconds later, they came flying backward out of the tunnel. The bear they’d collared a year and a half ago now weighed about 350 pounds—and he was awake. Wes had managed to jab him with the syringe, so we waited for the drug to take effect. When black bears hibernate, their breath slows and their body temperature drops by roughly 12 degrees Fahrenheit—low enough to cut their metabolic rate in half, but high enough for them to react to danger. Then, crawling on forearms and knees, I followed Wes, feeling only slightly more secure knowing that he’d be chomped before me if the bear charged. (Learn how not to get attacked by a bear.)

When we rounded the tunnel bend, wide eyes flashed at us. He was still awake. I quickly snapped the photo above. Wes told me to stay put while he backed out and prepared another dose of tranquilizer; if the bear escaped half sedated, he could fall into the canyon below.

The bear started crawling toward us until I was forced out of the den. We frantically blocked the exit with backpacks and sticks as Wes jabbed him again—but he powered through our barricade with groggy steps and began to crawl down the snowy slope. Jeff and Jordan lunged for his back paws, straining to hold on to him; Wes jumped on his back and grabbed his collar.

The bear pulled them down the hillside and came to rest in the lower branches of a pine tree. The tranquilizer had kicked in—he was asleep. Wes and his brother changed out the radio collar and checked his health, but we had one more daunting task: getting a limp 350-pound bear up the snowy embankment and safely back to his den before he awoke. We pushed and pulled with every muscle. Before the sedative wore off, we succeeded.

When spring came, signals from the bear’s new radio collar showed he’d resumed his everyday life—avoiding any more contact, we hope, with humans.