They say dogs are man's best friend.

But new research out of the University of Alberta shows that may ring true for babies as well.

A recent study examined 800 babies and found infants exposed to a furry pet at just the right time in their development had some interesting health benefits.

"We looked at the kinds of gut bacteria these babies have around three months of age," Anita Kozyrskyj, a professor of pediatrics at the U of A, told the Calgary Eyeopener.

"And we found exposure [to dogs] during pregnancy or postnatally was associated with some beneficial gut bacteria in these babies."

While most study participants were dog owners, Kozyrskyj said the benefits can come from cats as well.

The animals carry a pair of healthy bacteria — ruminococcus and oscillospira — the result of running around, foraging and digging outside.

"They carry these bacteria and they bring them from outside, indoors," said Kozyrskyj, who led the study. "The interesting thing is exposure during pregnancy resulted in these changes, suggesting there might be some changes to mom's gut bacteria while she's pregnant."

Therapy dog

Having a dog or cat in the home with a baby can lead to lower rates of allergies and obesity later in life, according to new research from the University of Alberta. (CBC)

Rather than being transferred directly from the pet to the baby, the bacteria accumulates in dust and dirt, usually found on floors.

"We didn't assess the closeness of the interaction of the pet," said Kozyrskyj.

Babies in homes without a pet had lower levels of the two bacteria.

"Both have been associated with lower incidents of allergies later in life and lower incidents of becoming overweight," she said.

Parents need to keep their kids' environment clean, but not always as much as many people think, said Kozyrskyj.

"Certainly some bacteria are pathogenic. They're dangerous and babies can develop pneumonia — I think that's probably the concern," she said. "But our society has become overly concerned about exposure to microbes, and it's this obsession with hygiene people have hypothesized has resulted in increased incidents of allergies and asthma."