Man's best friend indeed.

One rescue puppy in Ireland is being praised as a hero for “doing a bit of rescuing himself” and helping police find his owner after the 62-year-old man fell into a ditch during a nighttime walk.

Pat Brennan of Portarlington, County Laois, was taking his puppy, Jack, for a walk on Monday evening when he tumbled into a steep ditch and realized he wouldn’t be able to get out on his own, the Irish Independent reports.

WATCH: VIDEO OF GARLIC-PEELING SECRET MESMERIZES THE INTERNET

"I'm a bit of an astronomy geek, and I had noticed a planet beside the moon while out walking, and I was looking up, wondering which one it was," Brennan recalled. "Jack was scratching around beside me, and when I went to move on again he kind of jerked the lead and knocked me off balance.”

"I've had a stroke in the past so my balance isn't great, and I ended up falling sideways down the bank and out of view,” he said, describing the terrifying ordeal. “I knew there was no way I could get out, and I also feared that Jack might just run off, because he's only a pup."

The man was able to call emergency services from his cell phone – but realized that responders may not be able to find him so easily on the vast road. At this point, the sky had gone dark, and Brennan realized he was injured.

FOLLOW US ON FACEBOOK FOR MORE FOX LIFESTYLE NEWS

Fortunately, Brennan’s four-legged friend loyally stayed by his side, waiting on the road until emergency personnel arrived.

"After about 10 minutes I could hear a car going by, but there was no way for me to alert them or draw their attention to me. But then when they spotted Jack they knew I must be nearby," he recalled.

Authorities later acknowledged they wouldn’t have been able to find Brennan so quickly in the deep ditch if they hadn’t spotted the 1-year-old pup, The Irish Times reports.

Even when an ambulance arrived to treat the man for the bumps and scratches he suffered in the fall, Jack wouldn’t rest until he could see his owner, pacing around with a watchful eye on the vehicle.

“The [police] would have driven past but for Jack sitting there. When the ambulance came, Jack would not move for anybody until he saw Pat was in the ambulance,” Brennan’s wife, Melanie, said.

“The [police] would have driven past but for Jack sitting there. When the ambulance came, Jack would not move for anybody until he saw Pat was in the ambulance,” Brennan’s wife, Melanie, said. (An Garda Siochana)

CLICK HERE TO GET THE FOX NEWS APP

“The [police] would have driven past but for Jack sitting there. When the ambulance came, Jack would not move for anybody until he saw Pat was in the ambulance,” Brennan’s wife, Melanie, told the Times. “He’s a bit of a character is our Jack.”

According to the outlet, the couple rescued the pup about six months ago.

"Now he has repaid that favor by doing a bit of rescuing himself," Melanie told the Times of their “lovely” pet.

The very good dog was rewarded for his actions with a special lamb burger to feast on.

Law enforcement has since shared the Brennan and Jack's story to social media, where it has gone viral on Twitter with over with over 17,000 likes and 2,600 shares.