Professor Harald Renz, who leads a team of scientists at the Gießen university clinic, says the antibodies developed by heavily pregnant women in response to bacteria can be carried over to the baby.
It is already widely understood that children brought up in hyper-hygienic surroundings are more likely to develop allergies than those whose houses are sometimes dirty, who play in dirt and go to kindergarten.
Early contact with harmless bacteria strengthens the immune system and is now generally seen as a positive factor in long-term health.
But now Professor Renz says he has shown that the development of the immune system is affected before birth.
He even says that the bacteria in cow stalls are better for unborn children than those in pig pens, while the air around sheep is practically worthless for immune system purposes.