Unborn babies "practise" facial expressions of pain while they are in the womb, scientists say.
Foetuses have been pictured using 4D scanning technology showing what appears to be pain.
By 36 weeks the children were able to create "complex multi-dimensional expressions" such as pain.
Researchers, who examined video footage of 4D scans of 15 healthy babies, said that the process was "adaptive" and helped the unborn baby to prepare for life after birth.
The study expands on previous research that suggests that facial expressions of healthy foetuses develop and become more complex during pregnancy.
Researchers hope that further investigation will examine whether the development of facial expressions in the womb is delayed if the mother smokes or drinks during pregnancy.
Lead researcher Dr Nadja Reissland, of Durham University's Department of Psychology, said: "It is vital for infants to be able to show pain as soon as they are born so that they can communicate any distress or pain they might feel to their carers and our results show that healthy foetuses 'learn' to combine the necessary facial movements before they are born.
"This suggests that we can determine the normal development of facial movements and potentially identify abnormal development too.
"This could then provide a further medical indication of the health of the unborn baby.
"It is not yet clear whether foetuses can actually feel pain, nor do we know whether facial expressions relate to how they feel. Our research indicates that the expression of foetal facial movements is a developmental process which seems to be related to brain maturation rather than being linked to feelings."
Brian Francis, professor of social statistics at Lancaster University, added: "Modern methods of data analysis enable the development of foetal pain faces to be clearly detected, with the complexity of facial movements making up a pain face increasing in the third trimester."
Earlier on HuffPost:
Month 3 - Morning Sickness
Month 4 - Scans And It's A Girl
Month 6 - Dreaming Of Nutella
Month 8 - Before And After
Month 9 - Water Breaks