The use of frequently prescribed antibiotics in early pregnancy has been linked by researchers to an increased risk of major birth defects.
Macrolide antibiotics are widely used to treat common bacterial infections, often as an alternative for patients allergic to penicillin.
Experts have urged caution in their use during pregnancy and said alternatives should be prescribed if possible.
Researchers at University College London analysed data on 104,605 children born in the UK between 1990 and 2016 to assess the association between macrolide antibiotics and major malformations.
They also looked at whether there was a link to their use and neurodevelopmental disorders including cerebral palsy, epilepsy, ADHD and autism.
In the children of women prescribed macrolides during their pregnancy, 186 out of 8,632 had major malformations, they found.
This compares to 1,666 out of 95,973 children of mothers who received penicillin.
After accounting for other factors, they found that macrolide prescribing during the first three months of pregnancy was associated with an increased risk of major malformation compared with penicillin (28 v 18 cases per 1,000), particularly heart defects.
They found no association when women were prescribed macrolides later on in the pregnancy.
And they observed no significant link to any of the four neurodevelopmental disorders.
But they found macrolide prescribing in any trimester was associated with a slightly increased risk of genital malformations.
One of the authors, Professor Ruth Gilbert, of UCL Great Ormond Street Institute of Child Health, said: “Our findings suggest it would be better to avoid macrolides during pregnancy if alternative antibiotics can be used.”
She added: “Women should not stop taking antibiotics when needed, as untreated infections are a greater risk to the unborn baby.”
The study does not establish cause and the actual risk to an unborn baby remains low, experts said.
Andrew Shennan, Professor of Obstetrics at King’s College London, said: “The study found that treatment was linked to some abnormalities in children (mainly in the heart).
“These specific defects suggest the antibiotic caused the problem directly, rather than it being related to the illness that the antibiotic was prescribed for.
“The abnormalities were greater than in women who received penicillin, which is safe in pregnancy.
“However, defects were still rare (about 2%), and as these antibiotics may still be necessary to prevent serious infections, they should only be avoided if there are suitable alternatives.
“Fortunately many antibiotics are safe in pregnancy but macrolides should be avoided in the first three months of pregnancy when the baby is developing rapidly.”