According to an NBC7 San Diego report, the dog, a German shepherd named Indy, is a retired member of an Arizona sheriff’s department.

According to the Chula Vista Fire Department, the 9-year-old German Shepherd, named Indy, fell down the abandoned well in the afternoon. Officials said Indy is a retired police K-9. Firefighters arrived at the scene and had to figure out how they could get the dog out safely.

Multiple agencies, including the Chula Vista Fire Department and the San Diego Humane Society, worked together to free a dog that had spent several hours at the bottom of what was described as an unsupported well.

The well is 40 to 50 feet deep and only about 3 feet wide, making the rescue complicated and dangerous.the opening was covered with grass and vines, and the dog slipped in while investigating.

Fire crews said the rescue mission took more than four hours, and eventually, it was an old-school lasso technique that did the trick. Once Indy was out of the hole, his owner took him immediately to a veterinarian for medical treatment.

Firefighters said being able to reunite Indy with his owner was a sentimental moment.

Watch to video: