Your four-legged best friend, it seems, not only guards you and your home from outside attackers but protects the little ones from environmental attacks of allergies and asthma.

Experts have long suspected close contact with canines helps keep children from developing certain allergies and other respiratory problems.

Now, a study published online this week in the Proceedings of the National Academies of Sciences says dust collected from homes where dogs live leads to the development of gut bacteria that trigger an immune response in young mice. Following that logic, the same would apply to the resident rug rats, as it were.

In the report, lead researcher Susan Lynch, a scientist at the University of California, San Francisco, described how she and her team tested for allergies in pre-adult mice and noted rodents exposed to dust from a dog owner's home produced less mucous and fewer airway T-cell --which help reduce inflammation and mucous caused by allergens in the body -- when they were later exposed to a cockroach allergen.

Lynch's experimentation found mice exposed to the dog dust had a type of intestinal bacteria called Lactobacillus johnsonii.

After the scientists gave a control group of mice a dose of the same bacteria, they appeared to enjoy the same protection from the cockroach allegerns as the dog dust group. However, the mice exposed directly to the dog habitat still showed stronger levels of immunity.

Lynch told Healthline the findings suggest the dog dust itself leads to the growth of a number of different types of bacteria in one's gut, not just a specific one or two. She indicated she hopes she'll be able to identify the other factors -- the other dog dust bacteria that provide the layer of protection that was examined.

"The long-term aim is to leverage these studies to develop refined communities of bacteria that can be used therapeutically to treat or prevent against allergic asthma in humans," Lynch said.

Previous research had shown children exposed to dogs early in life -- and, to a lesser degree, cats -- are less likely to develop allergic asthma. The resulting assumption was that dogs bring specific organisms from the outside into homes, exposing the children to germs and bacteria they otherwise might not experience until later in the lives.

"We'll do further studies to prove that the bacteria originate from the external environment and that the same species actually colonize the human gut," Lynch said. "It should be noted that there is a time-dependent component to the protective effect of furred pets. They tend to be protective if present early in life, so it is more complex than simply having a pet in the home -- the timing of pet exposure matters."