A pet dog is being hailed a hero after his owners shared a heartwarming tale of how the canine saved their baby’s life.

Kelly Andrew took to Twitter on Tuesday to say that the canine, named Henry, kept breaking into the nursery the previous night, trying to wake the baby up. Initially, the family could not understand the dog’s behavior.

"Last night the dog kept breaking into the nursery and waking the baby. She's been sick, and I was getting so fed up with him," Andrew tweeted.

The family later realized that the canine was only trying to wake the baby up as he had stopped breathing. They quickly rushed the infant to a nearby hospital for treatment.

"We spent the night in the hospital. I don't know what would have happened if he hadn't woken her. We don't deserve dogs," she wrote.

Giving an update about her son’s health, Andrew wrote, "The baby is doing much better today and we are home with Henry, who bravely held the fort all night even though he is scared of the dark."

In another tweet, the mother gave a shout-out to Connecticut Children's hospital for the healthcare they provided.

"I would like to shout out the ER department at Connecticut Children's hospital for being literal heroes. Not just for our LO but night after night, patient after patient. They go above and beyond in their care, and it shows," she tweeted.

The post has since gone viral with over 90,000 likes and 8,000 retweets. Several people took to the comments section to talk about how their pets had saved their lives.

"Many years ago, we had a cat that slept with me in my crib. One night the cat went in and tried to get my parents up, after being thrown unceremoniously of the bed several times, he peed on my dad's chest and ran out and back to my crib where I was, blue, and not breathing," one person wrote.

"I got my dog when I was deep in depression. The kind where you can barely eat and can’t stop crying and won’t get out of bed. When I was depressed she never left my side. She cuddled up with me and nudged me to make sure I was good. It was like she knew. She saved my life," another user commented.

Cavalier King Charles Spaniel/Dog Breed
Representative image. Pixabay