A first-of-its-kind study has shown that being pregnant creates long-lasting effects in a mother's brain, with MRI scans showing changes in grey matter volume that may actually help mums look after their new babies.

Researchers found that first-time mothers consistently demonstrated a reduction in grey matter volume that could mean their brains are optimising and rewiring themselves to help cater to the needs of their infants – with the effects lasting for at least two years.

"These changes may reflect, at least in part, a mechanism of synaptic pruning," says psychologist Elseline Hoekzema, who worked on the research while at the Autonomous University of Barcelona in Spain, "where weak synapses are eliminated giving way to more efficient and specialised neural networks."

The research, conducted over a period of more than five years, saw the team run brain scans on 25 first-time mothers both before and after pregnancy, along with analysing the brains of 19 male partners of the women.

In a control group, the scientists also scanned the brains of 20 women who were not (and had never been) pregnant, along with their 17 male partners.

The results showed a clear distinction between the first-time mothers and all the other participants – including the new fathers – with a reduction in the mothers' grey matter volume in the medial frontal and posterior cortex, in addition to the prefrontal and temporal cortex.

As the researchers explain, these regions of the brain are all involved with social processes such as feelings of empathy and the ability to understand others – what is sometimes referred to as the 'theory of mind'.

While losing grey matter volume like this might sound unhealthy, the researchers think the reduction could be a case of the brain fine-tuning itself, as opposed to something negative. Backing that up, in the study, none of the mothers demonstrated changes in memory or any other cognitive functions.

"We certainly don't want to put a message out there on the lines of 'pregnancy makes you lose your brain', as we don't believe this is the case," Hoekzema told Pam Belluck at The New York Times.

"Grey matter volume loss does not necessarily represent a bad thing. It can also represent a beneficial process of maturation or specialisation."

When it comes to first-time mothers, the researchers suggest the change could be an evolutionary mechanism in response to adapting to the emotional needs of a newborn child.

Of course, first-time dads also need to adapt to their new parenting circumstances. But since the MRI scans didn't show any kind of similar grey matter volume loss on the part of the fathers, the researchers think the change in first-time mothers must be brought about by biological processes during pregnancy, such as hormone fluctuations – although environmental factors could also be involved.

In any case, the volume reduction was so identifiable among the mothers in the study that the before/after MRI scans alone gave away whether the women had recently given birth.

"These changes were remarkably consistent," Hoekzema told Nicola Davis at The Guardian.

"So consistent that a computer algorithm could automatically identify which of the women in our sample had been pregnant between the sessions and which [had] not."

While the researchers don't fully understand the processes involved in the grey matter reduction, when the mothers in the study were shown images of their babies during a post-birth brain scan, the affected regions of the brain showed heightened neural activity – which could suggest that the rewiring is linked to an empathy response.

What's more, the amount of grey matter volume reduction was linked to how the mothers scored on a post-birth emotional attachment test –women with greater reductions also showed greater attachment to their babies.

As this was such a small study, larger experiments with more mothers taking part would be needed to confirm the results.

It would also be helpful to understand if these changes persist longer than two years – and whether similar changes might be seen in second or successive pregnancies.

But the findings here could be the among the first to explain the neurological transition women go through when they become mothers, and could help us understand that epic change in life circumstances in a bit more detail.

"It does make sense that a first-time mother is going to have to work really hard to understand their baby's needs," neuroimaging expert Kirstie Whitaker from Cambridge University in the UK, who wasn't involved with the study, told The Guardian.

"Being a new mum is hard and you have to adjust an awful lot. Your brain is going to be able to respond to that change and it is going to make it so that you can take care of this newborn bundle of joy."

The findings are reported in Nature Neuroscience.