Previous studies have shown a link between the medicines valproic acid and carbamazepine, used to treat epilepsy, with some mental health problems such as bipolar disorder and schizophrenia.
Now experts, writing in the British Medical Journal, have confirmed the link after a systematic review involving more than 3.8 million births.
The researchers, led by Professor Lolkje de Jong-van den Berg from the University of Groningen in the Netherlands, looked for evidence of major malformations linked with carbamazepine use in the first three months of pregnancy.
Spina bifida was the only one noted, but was 2.6 times more likely in babies born to women who had taken carbamazepine compared with those not taking any anti-epileptic drug.
However, the experts did say it carried smaller risks than valproic acid, which was also included in some of the studies.
They added: "The best option regarding anti-epileptic drug treatment can be chosen only on an individual basis by the woman and neurologist before pregnancy, weighing the benefits of epilepsy control against the risk."