Here’s hoping your hunting dog never gets into a predicament like this one: A black and white labrador named Oreo had to be rescued by a helicopter crew on Saturday after trapping herself halfway down a sheer 90-foot cliff at Portuguese Beach, Calif. The lab survived unscathed, but it was a close call.

Fire and state parks officials responded to a request at 1:47 p.m. to aid the Sonoma County Sheriff’s Department with the helicopter rescue, reports The Press Democrat. Somehow the lab had scrambled 40 feet down a rocky cliff before realizing she couldn’t continue or turn back.

“It was kind of like a billy goat trail the dog went down. Even the dog realized it was dumb move,” Capt. Todd Rollings of the Bodega Bay Fire Protection District told the Press Democrat.

A 50-foot drop into rocky waves lay below the dog and bystanders calling from above were unable to coax her back. Officials concluded their best option would be to suspend a sheriff’s deputy from the chopper and lower him down the crag. After taking a few passes along the cliff to ensure the dog wouldn’t spook, the pilot landed and Deputy Henri Boustany hooked himself to the 100-foot rescue rope.

Panicked dogs in similar situations occasionally bite their rescuers, and Boustany was unsure how the lab would react when a stranger tried to pick her up. He grabbed a towel to toss across the dog’s face in case things got nasty, but it turned out to be an unnecessary precaution.

“The dog and I got to know each other real quick,” Boustany told the newspaper, noting that he talked reassuringly as he approached. “I think the dog just wanted to be out of there.”

Boustany gripped the rock face and maneuvered toward the dog’s ledge. Without any footholds big enough to stand on the deputy had to grab the dog while dangling in the air. He slipped one arm through her harness and the other around her legs and kicked away from the cliff. As soon as the pair landed firefighters took charge of the dog as the watching crowd applauded. Needless to say, Oreo’s owner was overjoyed by the smooth recovery of her injury-free pup.