Using painkillers in pregnancy may reduce fertility in subsequent generations, research suggests.
Tests in rats found that when a mother was given painkillers during pregnancy, her female offspring had fewer eggs, smaller ovaries and smaller litters of babies than those not exposed to the drugs.
Exposed male offspring were also found to be affected at birth - showing smaller numbers of cells that give rise to sperm in later life. However, their reproductive function recovered to normal levels by the time they reached adulthood.
Researchers say the findings are significant given the similarities between the reproductive systems of rats and humans, although it is difficult to directly extrapolate these results to pregnant women.
The team recommends that pregnant women should stick with current guidelines to use painkillers at the lowest possible dose, for the shortest possible time.
Scientists tested the effects of two painkillers in pregnant rats - paracetamol and a prescription-only painkiller called indomethacin, which belongs to the same class of drugs as ibuprofen and aspirin.
Rats were given the drugs over the course of several days - four days for indomethacin or nine days for paracetamol. The effects of the drugs were seen within one to four days of the start of treatment. Scientists say that because the pace of foetal development in humans is slower than it is in rats, it is hard to say from this study how this would translate in human use.
In addition to affecting a mother's immediate offspring, the study showed that painkillers taken in pregnancy also affected the subsequent generation of rats.
The team found that the resulting females - the granddaughters of the mother given painkillers in pregnancy - also had reduced ovary size and altered reproductive function.
Scientists say the results suggest that some painkillers may affect the development of the cells that give rise to eggs and sperm - called germ cells - while a foetus is in the womb.
This may be because the painkillers act on hormones called prostaglandins. These are known to regulate female reproduction and control ovulation, the menstrual cycle and the induction of labour.
The study has been published in the journal Scientific Reports. It was funded by the Medical Research Council and the Wellcome Trust.
Prof Richard Sharpe, who co-led the study at the University of Edinburgh's MRC Centre for Reproductive Health, said the results follow previous research that indicates painkillers should be used with caution during pregnancy.
He said: "It's important to remember that this study was conducted in rats not humans, however, there are many similarities between the two reproductive systems. We now need to understand how these drugs affect a baby's reproductive development in the womb so that we can further understand their full effect."
Prof Richard Anderson, Elsie Inglis Professor of Clinical Reproductive Science at the University of Edinburgh, who co-led the study, said: "These studies involved the use of painkillers over a relatively long period. We now need to explore whether a shorter dose would have a similar effect, and how this information can be usefully translated to human use. "