There are few things sweeter than a mother dog tending to her puppies. It’s hard to imagine giving birth to a litter of puppies and somehow knowing just what to do to take care of them all. And yet, mother dogs manage to make it look natural—because it is! People generally chalk her actions up to “maternal instinct.” More specifically, her behaviors come from a mix of hormones and lessons carried over from her ancestors.

A dog’s maternal instinct starts to kick in before she has given birth. If you’ve been around a pregnant dog, you may have seen her “nesting,” or circling around looking for the perfect place to have her puppies. She may paw at blankets or pillows, trying to make the area as safe and comfortable as possible. This behavior stems from her wild dog ancestors that used to build dens so they could give birth in a space protected from predators and the elements.

Once a dog gives birth to her puppies, two different hormones are released that contribute to her motherly instincts. The first is oxytocin (sometimes called the “love hormone”) that promotes bonding between a mother and her pups. This love for her puppies can be seen when she nuzzles them or wraps around them to keep them warm while nursing. Interestingly, oxytocin is also linked to the bond that humans have with their pets, which we covered in an earlier blog post.

The second hormone is prolactin. It’s involved in milk production but is also responsible for a mother dog’s protective nature. This need to protect is strongest in the early days of her puppies’ lives, before their eyes open or they gain the ability to hear.

You’ve probably seen a mother dog licking her puppies after they are born. She does this for a variety of reasons. First, it stimulates basic functions like breathing, urinating and defecating. She also does it to keep them clean. This is another carryover from her ancestors, who cleaned their pups to remove any scents that might attract predators.

There are some circumstances when a mother dog may not show all of these maternal behaviors. But by and large, a mother dog is well-equipped to provide her puppies with all the care and nurturing they need when they are born.