The study, a collaboration between MCRI and Aarhus University of Denmark, found children between the ages of newborn up to 14 years of age, of women prescribed antibiotics closer to birth or prescribed more than one antibiotics course during pregnancy, had an even greater risk of infection.

The study, published in the International Journal of Epidemiology looked at data from more than three quarters of a million pregnancies from 1997 to 2009 in Denmark. About 1 in 5 mothers were prescribed antibiotics in pregnancy.

In Australia, 12% (approximately one in 8) pregnant women were prescribed antibiotics in pregnancy in a large Australian studyof pregnant women are prescribed antibiotics during pregnancy. There are few studies comparing antibiotic rates in pregnancy internationally, but antibiotic use in early childhood in Australia is one of the highest in the world.

Lead author Dr Jessica Miller said infections during pregnancy are common and need to be treated appropriately.

"We do however need to use antibiotics sensibly in all age groups, including pregnant women because they do decrease "good" bacteria in the gut microbiome. A healthy microbiome is important early in life for the developing immune system and possibly for preventing serious infection."

Babies born vaginally had a higher risk of infection risk than those born by caesarean section when mothers were prescribed antibiotics in pregnancy. Researchers believe this is related to the influence of the gut microbiome. This is because a vaginally born baby gets their microbiome from the mother's gut and birth canal. Whereas babies born by caesarean section acquire a microbiome from the mother's skin and the hospital environment. 

The greatest risk for hospitalised infection was gastrointestinal infection in children born vaginally to mothers who were prescribed antibiotics in pregnancy. The child's gut microbiome is particularly important in gastrointestinal infections.

Researchers also found that children born to mothers who were given antibiotics before conception had an increased risk. This suggests that other shared factors, such as genetic make-up and the home environment, may also contribute to infection risk in both mother and child.

Senior author Professor David Burgner said the research was not about avoiding the use of antibiotics, but being aware and careful about their use.

"Infections during pregnancy are relatively common and should be treated appropriately; some are due to bacteria and will require antibiotics," Professor Burgner said, "We need to use antibiotics sensibly in all age groups, including pregnant women. Unnecessary antibiotic use can have effects even in the next generation."