Unborn babies have been found to smile when their mothers eat carrots and grimace when they eat greens such as kale.
Scientists recorded babies' facial expressions for the first time to find evidence that they react differently to various smells and tastes while in the womb.
Experts from Durham University took 4D ultrasound scans of 100 pregnant women to study how their unborn babies responded after being exposed to flavours from foods eaten by their mothers.
They looked at how the foetuses reacted to either carrot or kale flavours a short time after they had been eaten.
Foetuses exposed to carrot showed more "laughter-face" responses while those exposed to kale showed more "cry-face" responses.
5 ways to stay fit during pregnancy - in pictures
Their findings could further understanding of how human taste and smell receptors develop, the university’s foetal and neonatal research laboratory members said.
They also believe that what mothers eat during pregnancy could influence babies’ taste preferences after birth and might have implications for establishing healthy eating habits.
It is thought foetuses experience flavour by inhaling and swallowing amniotic fluid in the womb.
“A number of studies have suggested that babies can taste and smell in the womb, but they are based on post-birth outcomes, while our study is the first to see these reactions prior to birth," said postgraduate student Beyza Ustun, who led the research.
“As a result, we think that this repeated exposure to flavours before birth could help to establish food preferences post-birth, which could be important when thinking about messaging around healthy eating and the potential for avoiding ‘food-fussiness’ when weaning.
“It was really amazing to see unborn babies’ reaction to kale or carrot flavours during the scans and share those moments with their parents.”
Celebrity couples who have had babies through surrogacy - in pictures
Mothers were scanned at 32 and 36 weeks of pregnancy to see foetal facial reactions to the kale and carrot.
They were given a single capsule containing 400 milligrams of carrot or 400mg of kale powder about 20 minutes before each scan, and did not eat anything else for an hour before.
Facial reactions seen in both flavour groups, compared with those in a control group who were not exposed to either flavour, showed that exposure to just a small amount of carrot or kale flavour was enough to stimulate a reaction.
Co-author Prof Nadja Reissland, who leads the lab, has previously studied 4D scans to show the impact of smoking during pregnancy.
“This latest study could have important implications for understanding the earliest evidence for foetal abilities to sense and discriminate different flavours and smells from the foods ingested by their mothers,” she said.
research co-author Prof Jackie Blissett, of Aston University, said: “It could be argued that repeated prenatal flavour exposures may lead to preferences for those flavours experienced postnatally.
“In other words, exposing the foetus to less ‘liked’ flavours, such as kale, might mean they get used to those flavours in utero.
“The next step is to examine whether foetuses show less ‘negative’ responses to these flavours over time, resulting in greater acceptance of those flavours when babies first taste them outside of the womb.”
The study is published in the journal Psychological Science.