SEVIERVILLE, Tenn. (WATE) — Rescue personnel in Sevier County attempting to free a dog from a cave shaft this week had to deal with a challenging obstacle: a 200-pound bear.

A joint team of rope rescue technicians from the Waldens Creek Volunteer Fire Department, Sevier County Fire & Rescue, Sevier County Volunteer Rescue Squad and Catons Chapel/Richardsons Cove Volunteer Fire Department was called to an area near Nuns Cove Road on Tuesday to free a dog that was trapped approximately 40 feet down a narrow cave shaft.

A firefighter descended into the cave to find a sleeping bear and the trapped hunting dog farther down in the cave system.

The team was forced to exit the cave and set up trail cameras to monitor when they could safely retrieve the dog. They returned Wednesday after the bear had left and were able to reunite the dog with his owner.

The Waldens Creek Volunteer Fire Department wrote on Facebook that the dog, named Charlie, was trapped in the cave for three days. He was dehydrated and hungry but otherwise in good condition, according to a post from the department.

They estimated that the bear was around two years old and weighed 200 pounds.