Pregnant women who take common painkillers could unwittingly be putting the fertility of their daughters at risk, a study suggests.
Tests on rats found that when a mother was given paracetamol or the aspirin-like drug indomethacin, her female offspring had fewer eggs than those not exposed to the medicines.
They also had smaller ovaries and gave birth to smaller litters of babies.
Males were affected too, having fewer cells that give rise to sperm later in life. However, their fertility recovered to normal levels by the time they matured into adults.
Despite the fact that foetal development is slower in humans than in rats, scientists say the findings are significant given the similarity of the two species' reproductive systems.
Paracetamol is widely used to treat headaches, while prescription-only indomethacin reduces inflammation and the pain of fever and arthritis.
Professor Richard Sharpe, from the University of Edinburgh's MRC Centre for Reproductive Health, who co-led the study published in the journal Scientific Reports, 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."
Rats were given the drugs over several days and experienced effects after one to four days.
As well as affecting a mother's immediate offspring, the medicines also appeared to have an impact on subsequent generations.
Granddaughters of the animals given the painkillers while pregnant also had smaller ovaries and altered reproductive function.
Some painkillers may affect the development of "germ cells" that mature into eggs and sperm within the womb, the scientists believe. The reason could be that the drugs act on hormones called prostaglandins which are known to regulate ovulation, the menstrual cycle, and the induction of labour.
Co-author Professor Richard Anderson, also from the University of Edinburgh, 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."
The work was funded by the Medical Research Council and the Wellcome Trust.