“Given that the baseline risk of spontaneous abortion can go as high as 30%, this is significant,” said Dr Berard.

“Nevertheless, the increased risk was not seen for all antibiotics, which is reassuring for users.”

Berard and her team looked at data from the Quebec Pregnancy Cohort between 1998 and 2009, comparing 8702 cases defined as clinically detected spontaneous abortions with 87 020 controls.

All the participants in the trial were between 15 and 45 years old.

The Miscarriage Association said the scale and quality of the study made it “a really important piece of research.”

Dr Nicola Davies, a GP and former trustee of the association, said: “The main risk this research throws up is for those women who don’t know they are pregnant.

“Most of these drugs are drugs you wouldn’t prescribe if you knew a woman was pregnant.”

Macrolides are commonly prescribed for respiratory infections, as well as some intestinal infections and skin infections, especially for those resistant to penicillin.

Meanwhile tetracyclines can be prescribed for people suffering from acne.

She said the data indicating that nitrofurantoin was safe was not associated with an increased risk of miscarriage was to be welcomed as until recently its safety had been in doubt.