The charity Bliss said it reinforced the need for regular health checks.

Being born too soon can lead to long-term health problems and the earlier the birth the greater the problems.

One immediate issue is the baby's lungs being unprepared to breathe air. Steroids can help accelerate lung development.

Risks factors for premature birth

There is no clear cause of premature birth and there tend to be many different risk factors involved.

These include infections of the genito-urinary tract, pre-eclampsia, problems with the placenta and gestational diabetes.

Obesity is another major risk factor for premature birth.

Foetal fibronectin is a protein that can be used as a reliable indicator of preterm birth. It normally appears around 22 weeks and then again at the end of pregnancy. If it appears between these dates, early labour often follows.

Research also suggests that low levels of the hormone progesterone in the saliva could help identify women at risk of sudden premature labour.

Source: Tommy's

However, the study by researchers at Imperial College London and the University of Oulu in Finland showed the drugs may also be affecting the developing brain.

'Most children not affected'

These are really important and lifesaving drugs. These findings shouldn't affect clinical practice and parents shouldn't worryProf Vivette Glover, Imperial College London

They compared what happened to 37 premature children whose mother was injected with steroids with 185 premature children, of the same weight and gestational age, who were not exposed to the extra dose of steroid.

When the children were followed to the age of eight, there was a higher incidence of attention deficit hyperactivity disorder. No difference could be detected at age 16, but this may have been due to the small size of the study.

Prof Vivette Glover, of Imperial College, told the BBC: "There is an increase in risk, but most children are not affected.

She said the findings backed up previous research on stress, anxiety and depression in pregnancy affecting the child.

Those conditions increase levels of cortisol and may be having a similar effect on the developing brain as glucocorticoid steroids had in this study.

Prof Glover said womb environment could have "huge and very important long-term effects".

Andy Cole, the chief executive of the baby care charity Bliss, said: "Steroid treatments are extremely important to the development of many preterm baby's lungs and are proven to save lives.

"This study reinforces the need for the very best care to be given to all preterm babies and the importance of thorough follow-up and developmental checks.

"While the study indicates a very slight increase in the risk of ADHD in the short term, as the study states no long-term difference between those babies whose mothers did and didn't receive steroid injections we would not suggest this is a cause for concern."