A dog that chased a rabbit into a drainage pipe was rescued after a hairy, 20-hour ordeal, NJ.com reported.

>> Read more trending news

Khaleesi, a miniature long-haired female dachshund mix, was rescued by Secaucus firefighters shortly after noon Sunday, News12 New Jersey reported. The dog became stuck in the pipe around 5 p.m. after chasing the rabbit in a Secaucus park, according to Kristie Ann Ramos and Emilio Ramos, the animal's owners.

“We had to dig around the pipe a good 6 feet, and at that point we were breaking the pipe little by little, using caution of course for the dog, cause the dog's tail was sticking out,” Capt. Guido Bravo, of the Secaucus Fire Department,told the television station.

Firefighters were unable to free the dog Saturday night and returned Sunday, NJ.com reported.

Officials were able to locate Khaleesi because she was wearing a transmitter collar, WNBC reported.

"Once I got near, I started hearing her bark," Emilio Ramos told the television station.

“After a while, that bark turned into a crying noise."

After responders cut away several feet of pipe, they were able to rescue the dog, who was shivering but unhurt.

"Those men are incredible. … I was so grateful that's she's not hurt," Emilio Ramos told WCBS.

“It’s a really happy ending. It’s a good ending, that’s what it’s about,” Secaucus Mayor Michael Gonnelli told the television station.