Wearing dirty shoes indoors could make children less likely to get asthma, research has found.
Children were at a lower risk of developing the common lung condition if the bacteria in their family home was more like that of a farmyard.
Scientists said larger numbers of certain organisms, which were found in soil, helped to build up children's resilience.
Researchers from the National Institute of Health and Welfare in Finland analysed the range of bacteria in 1,400 homes in Finland and Germany.
They found children with more siblings were also less likely to get asthma.
Exposure to greater numbers of bacteria species which usually belonged outdoors made children's lungs healthier.
'It is interesting to see how clear of a protective effect indoor microbiota can have against the development of asthma,' said Professor Juha Pekkanen.
His colleague, Pirkka Kirjavainen, added: 'The key characteristic of microbiota in homes protecting from asthma appears to be large abundance of bacteria which originate from the outdoor environment and are beneficial or harmless to health, relative to bacteria that are a potential threat to our health.'
If living in urban areas where farmyard bacteria were hard to come by, children's asthma risk could be reduced by families wearing outdoor shoes indoors.
Having more siblings - and therefore more people to carry around different germs - and living in an older house also corresponded with a smaller chance of asthma.
Professor Pekkanen and his team said past research has found growing up on a farm alongside animals may as much as half the risk of asthma and allergies.
Although there were more of certain strains of bacteria, there were fewer of those which would normally be found in the human lungs or which could cause breathing infections.
Around 5.4million people in the UK and 25million Americans are living with asthma.
Although the condition can normally be controlled with medication, sufferers live at risk of having potentially deadly attacks.
The condition is caused by swelling in the tubes which carry air into and out of the lungs.
Allergies, smoke and pollution, exercise and colds or flu may trigger the condition.
Professor Pekkanen added: 'The results suggest that asthma could be prevented in the future by modifying children's early microbial exposures.'
The research was published in the journal Nature Medicine.