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 recent study out of the University of Alberta indicates the benefits of pets for kids include lower risks for developing allergies or struggling with obesity later in life. The biggest reveal from the new study is that we have good gut bacteria to thank for all of that.

“We looked at the kinds of gut bacteria these babies have around three 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 good 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.

The work also indicates that when moms have a pet during pregnancy, the transmission of vaginal group B Strep, which causes pneumonia 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.)

The connection between pets and healthy gut bacteria 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.”

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. It’s good for you and for their “sibling.”