A dog that was missing for several days happened to howl at the right time last Wednesday as a man was getting into his truck nearby, triggering a dramatic rescue caught on video.

The dog, named Ginger, had ended up trapped in the mud on a riverbank in Ulysses, Ky. when Darrell Perkins heard her cries for help.

"I was getting in my van to go to work and I hear a lot of howling. It sounded like it was coming from the other side of the river but by knowing that Ginger was missing I thought I would investigate," Perkins said on a Facebook post. "As I walked the River Bank I found Ginger stuck in the mud and in Creek Water next to the river[. She] had been there since Friday."

Perkins said he was "thankful" the river did not rise by a couple feet or the dog would have drowned.

He then called his neighbor and Lawrence County Dog Warden Johnny Rickman to help rescue the dog, as the hill was too steep and muddy for him to venture down alone.

"I didn't think, I just put the harness on and went down and got her," Rickman told WSAZ-TV.

Perkins recorded the rescue, which showed Rickman slowing heading down the muddy hill then slowly helping to bring Ginger back up. He told WSAZ he thinks she fell down the bank, perhaps on Saturday, hurt her leg and has been stuck ever since.

NEGLECTED DOG BORN WITH DEFORMED FACE FINDS HAPPY HOME

The dog's owner, Brenda Osborne, said she left her three dogs out on Friday morning before heading away for the weekend. She didn't realize anything was wrong until last Monday when Ginger was still missing.

"She's like one of the grandkids I guess you'd say," she told the television station.

The 12-year-old dog has since been taken to a veterinarian where she's now eating and drinking, but still is too weak for X-rays.

"It's a miracle we got out in time," Rickman said.