Having a pet makes you feel better, but a new study shows even more benefits to owning a pooch. The study from the University of Alberta in Canada revealed that babies from families with pets had more microbes that are linked to a lower allergy and obesity risk, according to a release. About 70 percent of the pets owned were dogs.

Read: What It Means When You Talk To Your Pets: Speaking To Your Dog Or Cat May Be Sign Of Intelligence

The team studied infant fecal samples from the Canadian Healthy Infant Longitudinal Development study, which was made up of two decades of research. They found that babies in the womb who had been exposed to pets or up to three months after birth had higher levels of the Ruminococcus and Oscillospira bacteria. Both have been linked to reduced childhood allergies and obesity.

"The abundance of these two bacteria were increased twofold when there was a pet in the house," said Anita Kozyrskyj, a U of A pediatric epidemiologist and study co-author, in a release.

Because the exchange can occur even before the baby is born, scientists believe infants will still benefit if the dog is given away just before birth.

C-section deliveries, using antibiotics during pregnancy, and not breastfeeding are three events that typically lower the immunity-boosting exchange between mothers and children. However, the study showed that babies received the benefits of pet ownership even in these situations. The team thinks they could mimic the same effects in a lab with a pill to help allergy sufferers.

"It's not far-fetched that the pharmaceutical industry will try to create a supplement of these microbiomes, much like was done with probiotics," she said.

Read: Children Have Closer Relationships With Family Pets Than With Siblings, Study Suggests

As we previously reported this week, pets are linked with other factors too, like intelligence. In an interview with Quartz, Nicholas Epley, professor of behavioural science at the University of Chicago, said that talking to your pet is a sign of high intelligence.

See Also:

Stress-Related Disorders And Allergies: Why Women Are More Susceptible Than Men

5 Tips To Cope With Allergies: Early Start To Spring Makes Seasonal Allergies Worse For Sufferers