The study involved 100 pregnant women in the United Kingdom, and the foetuses were between 32 and 36 weeks gestation.
Then, researchers gave 35 of the participating women capsules of powdered carrot, and 34 got capsules of powdered kale. Thirty women didn't consume either vegetable as a control.
The team chose to administer powdered vegetables to ensure that the flavours weren't diluted during digestion - and because many pregnant women couldn't handle the taste of kale juice, Nadja Reissland, a co-author of the study, told CNN.
The conclusion suggested that during the last three months of pregnancy, foetuses are mature enough to distinguish between different tastes of foods consumed by the mother, lead researcher Beyza Ustun told CNN.
"While the findings cannot prove that foetuses prefer carrots to leafy greens, the findings add to growing evidence that suggests babies begin developing their senses of taste and smell in utero, particularly in the third trimester," she said.
A follow-up study of the same babies post-birth is already underway, intending to determine whether prenatal exposure affects taste preferences later on, according to a press release from the University of Durham.
"We think 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," said Utsun, a postgraduate researcher in the Foetal and Neonatal Research Lab at Durham.
Scientists believe that developing foetuses experience flavour by inhaling and swallowing amniotic fluid, which surrounds and nourishes them in the womb.
Past studies have documented how newborns respond to flavours introduced before birth in amniotic fluid or shortly after birth in breast milk. But while prior research has considered flavour preferences post-birth, the latest study is the first to capture how foetuses react to foods ingested by the mother while they are in the womb.