When you think about gut health for kids, your first thought might not be about how your four-legged friends, the pawsitively cute kind, can help you out. Well, turns out there are many benefits of pets for kids, including gut health.

That's good news for pet-loving mamas: The dog or cat using your baby bump as a pillow is already having a positive impact on your little one. A study out of the University of Alberta (U of A) indicates the benefits of pets for kids include lower risks of developing allergies or struggling with obesity later in life. The biggest reveal from the study is that we have good gut bacteria to thank for all of that.

Having pets improves gut health for kids

“We looked at the kinds of gut bacteria these babies have around 3 months of age, and we found exposure during pregnancy or postnatally was associated with some beneficial gut bacteria in these babies,” study author Anita Kozyrskyj said on CBC radio.

It’s long been thought that sharing the floor with a pet exposes babies to good bacteria, as other studies indicated kids who live with pets are better protected against asthma and respiratory illnesses. But the U of A study indicates the benefits of a household pet start long before the kids are doing tummy time—while they’re still in the tummy, in fact.

“The interesting thing is that exposure in pregnancy also resulted in these changes, suggesting that there might be some changes to mom’s gut bacteria while she’s pregnant,” Kozyrskyj explains.

The research looked at the gut bacteria of more than 700 3-month-old babies whose moms were enrolled in the Canadian Healthy Infant Longitudinal Development Study between 2009 and 2012. Those whose moms kept a pet while pregnant had more of two kinds of beneficial gut bacteria (Oscillospira and Ruminococcus).

“Both have been associated with a lower incidence of allergies later in life and a lower incidence of becoming overweight,” Kozyrskyj told CBC.

Having a pet is beneficial in pregnancy

The work also indicates that when moms have a pet during pregnancy, the transmission of vaginal group B strep, an infection which can cause pneumonia or other illness in newborns, is reduced.

Most of the moms with pets who participated in the research were dog owners, but a smaller group of cat lovers was represented in the research—indicating kitties bring the beneficial bacteria to pregnant moms, too. (The positive connection between cats and pregnancy may come as a relief to many moms who are often warned about the connection between cats and the toxoplasmosis parasite, though you should still be careful about changing the cat's litter box when pregnant.)

The connection between pets and gut health for kids suggests too much sanitization can do more harm than good, according to Kozyrskyj.

“Our society has become over concerned with exposure to microbes and it is this obsession with hygiene that people hypothesize had resulted in an increase in allergies and asthma.” A little pet dander and saliva does a baby good, it turns out.

Kozyrskyj and her colleagues will be following the babies in the study until they are 5 years old, so they’ll be able to see how the gut bacteria from pets during pregnancy impacts kids in the long run.

In the meantime, keep loving on your fur babies, mamas. And if you were looking for a sign that it's time to adopt a new furry friend? This is it. It’s good for you and for their “sibling.”

A version of this post was published August 31, 2017. It has been updated.