The gender of the children born to a woman may be influenced by how much food she has to eat, say researchers working in Ethiopia.
By Richard Black
BBC science correspondent
The scientists found that when food is scarce, well-nourished women are more than twice as likely to have a boy as those eating less well.
Boy foetuses are more likely to perish in the womb or suffer obstetric complications
Writing in the journal Proceedings of the Royal Society, the team from University College London, UK, describes the phenomenon as a natural defence mechanism against famine.
However, the researchers confess it is not yet understood how the reproductive system is programmed to work in this way.
Dr Ruth Mace told BBC News Online: "We don't know what the mechanism for this is - it could be connected with the implantation stage soon after conception, when embryos need to implant themselves in the lining of the mother's womb."
This study builds on previous work that has pointed to a relationship between food and the gender of offspring in humans; and it has long been known in many animals.
The theory goes like this: bearing boys takes a greater toll on the mother than bearing girls, and malnourished baby boys are more likely than malnourished baby girls to die young.
So there are two reasons why, from an evolutionary point of view, it makes sense for malnourished women to carry female embryos.
"People have been looking for this for a long time because it ought to exist from an evolutionary standpoint," said Dr Mace, who works in UCL's department of anthropology.
"Male foetuses cost the mother more in terms of energy, so when food is scarce it makes more sense, in terms of evolution, to have a girl."
Three years ago, southern Ethiopia saw serious food shortages. During this period, the researchers measured the amount of arm muscle in women from the rural Oromo community.
The results were striking: those women in the upper 25th percentile of arm muscle area were more than twice as likely to have had a recent male birth as those women in the lowest 25th percentile.
The phenomenon cannot simply be explained by nutrition, as otherwise every woman in the food-rich West would have only boys.
The researchers suggest that it comes into play only as communities are entering periods of food shortage and people are feeling new levels of hunger.
And it probably operates after conception, with the malnourished mother's body somehow selecting female foetuses and rejecting male ones.