Scientists say a series of detailed 4D scans of babies' facial expressions up to 16 weeks before they were born show them practising expressing their emotions so they are ready to bond with their parents at birth.
The scans captured frame-by-frame pictures of foetuses while scientists monitored mouth movements and compared it to the development of the different parts of their brains.
The right side of the human brain is related to emotional skills and controls the left-sided mouth movements, whereas the left side of the brain is linked to language skills, and controls the right-hand side of the mouth.
The researchers found that the mouth movements they tracked were significantly biased towards emotional left-sided movements.
They concluded that foetuses practise making the mouth movements they will need after birth to convey emotions culminating in smiling within a few weeks of their birth to bond with their parents.
The research, led by psychologists at Durham University, monitored the development of the unborn infants' emotional and language abilities.
They took ultrasound scans of 15 healthy foetuses at regular intervals between 24 and 36 weeks of pregnancy. Their findings suggest that babies refine the neurological ability to show emotion very early in their development.
The study was published in the journal Physiology and Behaviour.
Lead author Dr Nadja Reissland, of Durham University's department of psychology, said: "As the left hemisphere of the brain is larger in foetuses from 22 weeks you would expect to see that the right side of the child's face is more expressive, but we found the opposite.
"What our research shows is that while both right and left mouth openings increased as the foetus grew, there was a consistent bias towards left-sided mouth openings.
"This suggests that babies are more neurologically prepared to use the emotionally expressive side of their face and that the neurological preparedness to use language develops later when it is needed."
Dr Reissland's previous research has shown that the range of a baby's facial expressions increase significantly during pregnancy.
They progress from simple actions such as the widening of the lips, to more complex expressions in which up to five movements come together.
Expressions include crying and smiling as well as signs of pain, identified by simultaneously furrowing the brow, wrinkling the nose and raising the lip. Another yawning movement is thought to stimulate the brain area to begin experimenting further with movement.
However, it isn't clear whether an unborn children actively feel the emotions they express, or whether they are simply practising using the facial movements to get ready for life after birth.
More on Parentdish: Our pregnancy week by week guide
More:Pregnancy Week By Week
Suggested For You
Get top stories and blog posts emailed to me each day. Newsletters may offer personalized content or advertisements. Learn more