A study published in JAMA Pediatrics reports that children who had pet dogs in the first year of life had a 15% lower rate of asthma than those who did not grow up with a dog in the home.

The study looked at nine different data sets that accounted for more than 1 million children, all born in Sweden between January 2001 and December 2010. The results were consistent even among children who had parents with asthma.

The authors of the study call the phenomenon the “farming effect,” because other researchers have found that children who grow up on farms are also less likely to develop asthma. An analysis of 39 studies on farming and asthma found children who had early exposure to farm animals, such as cattle and sheep, had a 25 percent lower risk for developing asthma, compared with those who did not grow up on a farm.

The findings indicate that having a dog in the household may affect a child’s microbiome, the unique bacterial environment of the gut that is determined by a number of factors, including the air we breathe and the food we eat.

Researchers wonder if there is a specific strain of bacteria that’s transmitted from dog to child that makes the latter less prone to asthma. She added that children living in households with dogs probably spend more time outdoors and may be exercising more frequently, both of which could lower their risk for childhood asthma.