The findings showed that babies born to mothers who took aspirin were almost two-and-a-half times more likely to develop the life-long and incurable condition.
While babies exposed to paracetamol were 30 per cent more likely to have overall cerebral palsy and 50 per cent more likely to have it on one side. Ibuprofen had little or no impact, the Daily Mail reported.
The biggest danger seemed to be from taking the painkillers in the middle stage of a pregnancy -- a crucial time for brain development.
This is because drugs such as paracetamol and aspirin could trigger toxic conditions in the developing brain that lead to permanent damage, or could disrupt the normal level of a mother's hormones needed to regulate brain development.
"The safety of these drugs now needs to be further evaluated and women should be further cautioned about their use in pregnancy," said researchers the from the University of Copenhagen in Denmark
For the study, published in the International Journal of Epidemiology, the researchers examined 185 617 mothers and their babies.
Around 5000 of the women took aspirin and a similar number took ibuprofen. Nearly 90 000 -- almost half -- admitted taking paracetamol while expecting.
The team found 357 babies went on to develop brain-related problems - and those born to mothers who took aspirin were at the higher risk of developing cerebral palsy on both sides of the body.