The team, reporting in Science Translational Medicine, were analysing the billions of bugs that naturally call the human body home.
Their analysis of 319 children showed they were at higher risk of asthma if four types of bacteria were missing.
Experts said the “right bugs at the right time” could be the best way of preventing allergies and asthma.
In the body, bacteria, fungi and viruses outnumber human cells 10 to one, and this “microbiome” is thought to have a huge impact on health.
The team, at the University of British Columbia and the Children’s Hospital in Vancouver, compared the microbiome at three months and at one year with asthma risk at the age of three.
Children lacking four types of bacteria – Faecalibacterium, Lachnospira, Veillonella, and Rothia (Flvr) – at three months were at high risk of developing asthma at the age of three, based on wheeze and skin allergy tests.
The same effect was not noticed in the microbiome of one-year-olds, suggesting that the first few months of life are crucial.
Further experiments showed that giving the bacterial cocktail to previously germ-free mice reduced inflammation in the airways of their pups.
One of the researchers, Dr Stuart Turvey, said: “Our longer-term vision would be that children in early life could be supplemented with Flvr to look to prevent the ultimate development of asthma
“I want to emphasise that we are not ready for that yet, we know very little about these bacteria, [but] our ultimate vision of the future would be to prevent this disease.”