A test which can measure the electrical signals in the fetal brain could one day help doctors protect babies from damage sustained in the womb.

It is one of the first times that the activity of the brain has been measured, and showed that fetuses could even respond to a bright light shining through their mothers’ abdomen.

Nerve activity in the brain involves tiny electrical impulses, and this technique relies on the principle that even the smallest of these creates a magnetic field.

To test the device, 10 pregnant women with fetuses aged between 28 and 36 weeks leaned into an array of 151 sensors around their “bumps”.

A fibreoptic cable was then used to deliver light pulses – about 11 times less intense than sunlight on a bright day.

The mother and the fetus both produce a strong magnetic signal because of the electrical discharges from their respective heart beats, but scientists were able to screen these out and look instead for signs of a response to the flashing light.

Four out of the 10 fetuses had measurable brain responses to the light, with reaction times better in the more highly developed fetuses.

The scientists did not believe that no response from the other six was a reason for concern, they may simply have been asleep or facing in the wrong direction.