A man in Australia has a dog and a teenager to thank for saving his life after he fell head-first into a septic tank.

The contractor in his 40s was working on a property in northern Sydney when he fell into the septic tank Wednesday and wound up getting trapped inside. He was stuck head-first for more than an hour in the tank, located on Myoora Road in Terrey Hills, according to 7NEWS. The water continued to rise as the man struggled to free himself from the 2.3-meters-deep tank.

A border collie named Spot was on a walk with his pet parent, Kayla, and began frantically barking when he realized the man was stuck in the tank. The 13-year-old girl immediately notified authorities about the situation, and paramedics arrived at the scene.

“The girl contacted Triple Zero (000) and Police, Fire and Rescue NSW, NSW Ambulance and the Rural Fire Service rushed to the scene where they found the man, stuck upside down inside the tank,” read a statement released by Fire and Rescue NSW.

See posts, photos and more on Facebook.

Inspector Charnan Kurth from NSW Ambulance said rescuers were “confronted with a challenging scene,” according to 9News.

“The man was unable to free himself and had stated that the water inside the tank was rising,” Kurth added.

Water levels continued to slowly rise as the 40-minute rescue was underway. Rescuers rigged a rope hauling system to extricate the man and managed to get him out of harm’s way. He was rushed to the Northern Beaches Hospital and is reportedly in stable condition.

"Had the dog not heard the man's cries, it may not have been such a good ending," said Kurth, according to the outlet.

In an unrelated incident reported earlier this year, a dog saved an injured hiker’s life by laying on top of him in freezing cold until rescuers arrived at the spot, located in the Croatian mountains. The Alaskan malamute was accompanying Grga Brkić on a hike in the Velebit mountain range when Brkić fell 500 feet down a snowy slope and fractured his leg. The four-legged companion lay on top of Brkić, saving him from hypothermia, and stayed with him for 13 hours until rescuers arrived.

pet-5054023_1280
Representative image Credit: Pixabay / stephencphotog