The research found infants born vaginally pick up most of their initial doses of bacteria, or microbiome, from their mothers, whereas C-section babies instead picked microbes associated with hospital environments.
The scientists who carried out the study, which is the largest to date into neonatal bacteria, said the point of birth may be a “thermostat moment which sets the immune system for future life”.
The gut microbiome contains millions of microbes which are thought to be important for the development of the immune system. Lack of exposure to the right bacteria in early childhood has been implicated in autoimmune diseases such as asthma, allergies and diabetes.
Researchers at the Wellcome Sanger Institute, University College London (UCL), and the University of Birmingham found babies delivered vaginally had more bacteria associated with good health than those born by C-section. In place of their mother's bacteria, caesarean children were found to have potentially harmful microbes commonly acquired in hospitals.
However, those differences had largely disappeared within a year. The scientists stressed the exact role of a baby’s gut bacteria was unclear and it was unknown if differences at birth had any effect on later life.
Dr Nigel Field, clinical associate professor at UCL, said: "Babies are sterile when they are in the womb.
"And the moment they are born is the moment when the immune system has a huge number of bacteria that is it presented with. And so the hypothesis is that that moment of birth might be a sort of thermostat moment which sets the immune system for future life.
"There is research showing that babies born by caesarean section have a slightly higher risk of immune-related conditions. They have a slightly higher risk of asthma, or inflammatory bowel disease and other allergic conditions."
The study, published in Nature, found “significant differences” between babies born by caesarean and babies born vaginally. But those differences had largely evened out by the time the children were 12 months told, researchers said.
Experts from the Royal College of Obstetricians and Gynaecologists said the findings should not deter women from having a caesarean birth.
“In many cases, a caesarean is a life-saving procedure, and can be the right choice for a woman and her baby,” Dr Alison Wright, the college’s vice president and consultant obstetrician. “The exact role of the microbiome in the newborn and what factors can change it are still uncertain.
“This study shows that more research is required to improve our understanding of this important area.”
Professor Peter Brocklehurst, of the University of Birmingham, said: “The first weeks of life are a critical window of development of the baby’s immune system, but we know very little about it.
“We urgently need to follow up this study, looking at these babies as they grow to see if early differences in the microbiome lead to any health issues.”
The researchers studied 1,679 samples of gut bacteria from nearly 600 healthy babies and 175 mothers, using samples taken from the infants at four, seven or 21 days of age.
As well as differences between methods of delivery, the study found the microbiome of vaginally delivered newborns came from their mother’s gut rather than vagina.
This calls further into question the controversial practice of swabbing C-section babies with their mother’s vaginal fluids, a technique known as vaginal seeding which doctors warn can increase the risk of infection.
Previous smaller studies had suggested vaginal bacteria were swallowed by babies on the way down the birth canal. However, the new research found no difference in vaginal bacteria in the guts of babies born vaginally and by C-section.
Join our new commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies