Updated

It turns out, dogs know how doorbells work.

A couple in South Carolina worried about their lost dog were surprised when their doorbell rang in the middle of the night. They were even more shocked when it turned out that their beloved pet had not only returned home but had also figured out how to use the electronic device.

dog rings doorbell 2

Rajah, an 18-month-old dog from South Carolina, used her nose to ring her family's doorbell after running away. She had been spooked by fireworks and seemingly escaped from the backyard. (SWNS)

Mary Lynn Whitacre spoke with Fox News and explained that her dog Rajah got spooked by fireworks and escaped from their backyard in Greenville. 

She explained that since the dog is such a fast runner, she and her husband had no idea where Rajah was or how far away she could have gotten. For seven hours, the worried couple searched for the dog but could not find her.

"Ryan and I were freaking out and we felt really helpless," she said.

Then, around 3:00 a.m., Rajah walked up to the house’s front porch and rang the doorbell with her nose. "It was the longest seven hours of my life," Whitacre said.

OCTOPUS SHOWS OFF PAINTING TALENT AT FLORIDA AQUARIUM

Whitacre explained that she has no idea where Rajah learned how to do this. She said she and her husband hardly ever have to use their own doorbell, so she's not sure when the dog would've seen somebody press it. 

Since Whitacre works from home and the dog spends the day with her, she probably hasn't seen anyone use the doorbell through the window, Whitacre said.

dog rings doorbell

"She had thorns on her and seemed to have rolled in poop," Lynn explained. "So, it seems like she had a great time." (SWNS)

While the dog was perfectly fine, she did bring back some evidence of going on an adventure.

FOLLOW US ON FACEBOOK FOR MORE FOX LIFESTYLE NEWS

"She had thorns on her and seemed to have rolled in poop," Whitacre explained to Southwest News Service (SWNS). "So, it seems like she had a great time."

Apparently, the 18-month-old puppy thought she might have done something wrong, based on her behavior when she got home.

CLICK HERE TO GET THE FOX NEWS APP

Whitacre said, "She thought she was in so much trouble and she was sad and sulking, but we were like ‘we’re just happy you’re back.’ It was hilarious, and we couldn’t stop laughing."

In regards to the Fourth of July, Whitacre says she and her husband are planning on spending the fireworks heavy holiday at her parents' lake house. Since other family members will be there with their dogs, Rajah will likely spend the day playing and won't be too upset by any fireworks she hears.