A Utah County search crew rappelled into a 40-foot-deep cavern of snow this weekend to rescue a dog that fell through an opening in the ceiling.

The cavern formed last week after an avalanche deposited a 40-foot mound of snow at the base of Stewart Falls, near Sundance Ski Resort in Provo Canyon. Warmth from the flowing water melted the snow mound from below, leaving the large chamber under the snow’s surface, Utah County sheriff’s deputies wrote in a press release.

The dog, named Beeroo, was with its owner near the waterfall when it wandered off, deputies wrote. A witness had seen Beeroo fall through a small opening in the snow mound, near a cliff, and disappear under the snow and ice.

A rescue team dug a second hole into the cavern from above, where the “roof” of ice and snow ranged from 4 to 7 feet thick. Rescuers saw that Beeroo still alive and moving at the bottom. To lessen the risk of the cavern collapsing, the crew set up anchors above the cavern, and a rescuer rappelled in through the ceiling.

“There was concern about how the dog would respond to a stranger, but in this case the dog seemed glad to see the rescuer,” Sgt. Spencer Cannon wrote.

Seven hours after Beeroo had fallen into the cavern, the rescuer put the dog into a harness, and it was pulled up to the surface, Cannon wrote. The rescuer soon followed Beeroo up through the ceiling hole.

“A short time later there was a happy reunion with the dog, Beeroo, its owner, [Yichoo] Su, and others in the group with Su,” Cannon wrote.