Women who take painkillers during pregnancy could be harming the fertility of their unborn child, new research has found.
According to a study, paracetamol and ibuprofen were found to reduce the number of cells which later become eggs or sperm in babies.
Painkillers may also affect the fertility of future generations by triggering changes in the structure of DNA which can be inherited, the research found.
The findings add to a body of evidence suggesting certain painkillers, including paracetamol, should be used with caution during pregnancy.
Scientist stress the advice for women to limit the use of paracetamol and avoid ibuprofen completely remains unchanged.
Current guidelines say that paracetamol, if needed, should be used at the lowest possible dose and for the shortest possible time.
Ibuprofen, on the other hand, should be avoided completely during pregnancy.
Ovaries exposed to paracetamol for one week had more than 40 per cent fewer egg-producing cells, while after ibuprofen exposure, the number of cells was almost halved.
Experts say this is important because girls produce all of their eggs in the womb, so if they are born with a reduced number it could lead to an early menopause.
Painkiller exposure during development could have effects on unborn boys too, the study found. Testicular tissue exposed to painkillers in a culture dish had around a quarter fewer sperm-producing cells after exposure to paracetamol or ibuprofen.
The team also tested the effects of painkiller treatment on mice that carried grafts of human fetal testicular tissue.
These grafts have been shown to mimic how the testes grow and function during development in the womb.
After just one day of treatment with a human-equivalent dose of paracetamol, the number of sperm-producing cells in the graft tissue had dropped by 17 per cent. After a week of drug treatment, there were almost one third fewer cells.
Previous studies with rats have shown that painkillers administered in pregnancy led to a reduction in germ cells in female offspring. This affected their fertility and the fertility of females in subsequent generations.
The scientists found that exposure to paracetamol or ibuprofen triggers mechanisms in the cell that make changes in the structure of DNA, called epigenetic marks. These marks can be inherited, helping to explain how the effects of painkillers on fertility may be passed on to future generations.
Painkillers' effects on germ cells are likely caused by their actions on molecules called prostaglandins, which have key functions in the ovaries and testes, the researchers found.
The study, published in Environmental Health Perspectives, was funded by the Medical Research Council, Wellcome and the British Society of Paediatric Endocrinology and Diabetes.
Dr Rod Mitchell, who led the research at the University of Edinburgh's MRC Centre for Reproductive Health, said: "We would encourage women to think carefully before taking painkillers in pregnancy and to follow existing guidelines - taking the lowest possible dose for the shortest time possible."