Firefighters rescued a Geyserville man Saturday night after he got stuck in a hole while trying to save his dog, fire officials said.

The man was attempting to climb down a ladder to grab his dog after finding the canine whimpering at the bottom of a 12-foot-deep shaft near his home off River Road, Geyserville Fire Chief Marshall Turbeville said. Somehow, the pet owner got wedged inside the narrow shaft, which measured 3 to 4 feet in diameter and likely led to a septic tank, he said.

“He was just stuck,” Turbeville said.

He said the man, who was not identified, had been stuck a few feet down in the hole for about 20 minutes before emergency responders arrived about 6 p.m. and used a rope to help free him. It took about 10 minutes to get him out, Turbeville said.

Responders, including a Sonoma County sheriff’s deputy, then quickly set up a tripod-and-rope system and lowered a Cloverdale firefighter down the shaft to rescue the dog, Geyserville Fire Capt. Joe Stewart said.

“We tried to pick the smallest firefighter to go down,” Turbeville added.

The firefighter was able to tie the canine to his harness and hoist the dog up. A Sonoma County Animal Services officer helped assess the dog, which didn’t appear to have any injuries, Turbeville said.

A paramedic checked the pet owner, who suffered a few cuts and scrapes but escaped serious injuries, he added.

“They’re very lucky, especially the dog,” Turbeville said.