A small dog who found himself trapped in a tree is home safe after being rescued by two off-duty Kentucky State Troopers.

Kentucky State Police said in a release that Sgt. Michael Williams and Trooper Gerick Sullivan were mowing grass in a cemetery in Salem, Kentucky, when they heard a dog barking.

After trying to determine the source of the yelps, the officers discovered Rocco, a dachshund, stuck in a tree trunk. Rocco had apparently gotten trapped after crawling through a groundhog hole near the tree and was unable to get out.

Get Breaking News Delivered to Your Inbox

Williams and Sullivan called the Salem Fire Department, and firefighter Daniel Newcomb arrived to cut a hole in the tree with a chainsaw.

Firefighter Daniel Newcomb cuts Rocco the dachshund out of a tree trunk. Kentucky State Police

Rocco was extracted safely and returned to his owner.

"The opening in the tree was made larger, should Rocco or another dog find themselves inside the tree again," state police noted.