Use of certain painkillers such as ibuprofen and Diclofenac increases the risk of miscarriage, according to new research. Photograph: John Stillwell/PA

Women who take even a small dose of painkillers such as ibuprofen early in their pregnancy more than double their risk of suffering a miscarriage, research shows.

The findings prompted medical experts to advise mothers-to-be to avoid taking the drug and instead to use paracetamol for pain relief. Taking any painkillers from the class of medicines known as non-steroidal anti-inflammatory drugs (NSAIDs) – such as ibuprofen, naproxen and Diclofenac – in the first 20 weeks after conception increases the risk of miscarriage by 2.4 times, the study found. The paper, published in the Canadian Medical Association Journal, found that pregnant women taking any type of NSAID, and any dose of one, ran that scale of extra risk of spontaneous abortion.

Researchers examined 4,705 cases of miscarriage, of which 352 (7.5%) had taken a non-aspirin NSAID.

The women in the study, aged from 15 to 45, were compared with 47,050 women of a similar age who had not lost a baby during pregnancy, of whom 1,213 (2.6%) had used an NSAID.

They identified the drug with the highest risk of miscarriage as Diclofenac when used on its own, and the lowest as rofecoxib, which was taken out of use in 2004 because of safety concerns. "The use of non-aspirin NSAIDs during early pregnancy is associated with statistically significant risk (2.4-fold increase) of having a spontaneous abortion," said Dr Anick Berard, from the University of Montreal, one of the study's Canadian and French co-authors.

"We consistently saw that the risk of having a spontaneous abortion was associated with gestational use of Diclofenac, naproxen, celecoxib, ibuprofen and rofecoxib alone or in combination, suggesting a class effect."

The authors concluded: "Women who were exposed to any type and dosage of non-aspirin NSAID during early pregnancy were more likely to have a spontaneous abortion.

"Given that the use of non-aspirin NSAIDs during early pregnancy has been shown to increase the risk of major congenital malformations and that our results suggest a class effect on the risk of clinically detected spontaneous abortion, non-aspirin NSAIDs should be used with caution during pregnancy." Previous studies of use of NSAIDs in pregnancy have produced mixed results.

But the Royal College of Midwives (RCM) and Royal Pharmaceutical Society (RPS) advised that, in order to ensure safety of the mother and her unborn child, they should be avoided in pregnancy altogether. "We need to advise women, as midwives often do, to avoid buying over the counter medication for pain relief. If a pregnant woman does need to take any analgesia, then paracetamol would be appropriate," said Janey Fyle, the RCM's professional policy adviser. "The most important advice to pregnant women is to report any pain to the midwife and avoid buying over the counter medication, as it may be contraindicated in pregnancy."

Jane Bass, the RPS's women's health spokeswoman, said: "This study reinforces current advice that women should avoid ibuprofen and other non-steroidal medicines in pregnancy. For most women, paracetamol is the safest painkiller to take at any stage of pregnancy. In certain circumstances, it may be appropriate for women to take medicines like these in the first six months of pregnancy, but only under close medical supervision."

But Dr Virginia Beckett of the Royal College of Obstetricians and Gynaecologists, a consultant at Bradford Royal Informary, said that while it was safe for women to take paracetemol in pregnancy "if a woman takes a NSAID the risk of miscarriage is still very low".

About a quarter of women who become pregnant will miscarry at least once, and at least one in eight of pregnancies in England and Wales in 2009 ended that way, official figures and studies suggest.