A Minnesota woman rescued a pit bull hours before he was to be euthanized, and a few days later, the dog returned the favor by detecting a life-threatening drop in her son's blood sugar.

The young pit bull named TaterTot sensed something was wrong with 4-year-old Peyton Anderson and began licking and jumping on the boy when he wouldn’t wake up.

"He kept on whining and barking and running between the two of us," Smith told Fox 9. "I checked on him, and he was barely breathing."

Smith rushed her son to the emergency room, where doctors discovered the boy was experiencing a severe drop in blood sugar.

Isis Sanchez of the Blue Pearl Veterinary Clinic said that dogs’ exceptional sense of smell likely helped TaterTot sniff out ketones, a compound created when blood sugar is low.

"What, for us, is barely a whiff of something gives them a huge picture of what's going on," she said.

In addition to smelling ketones, Sanchez said that dogs might also have a "sixth sense" that can detect changes in electrical activity, which is how some dogs are able to warn epileptics before they have seizures.

Anderson tested negative for diabetes, and doctors still aren’t sure what caused his drop in blood sugar.

Smith is convinced that TaterTot saved her son's life, and she says the pit bull is no longer just a temporary foster pet — she's giving him a permanent home.

Meet TaterTot and his new family in the video below.

Laura Moss writes about a variety of topics with a focus on animals, science, language and culture. But she mostly writes about cats.

Rescued pit bull saves boy's life
Just days after he was saved from a shelter, TaterTot returned the favor by performing a rescue of his own.