Women are more likely to give birth to boys if they have a high-calorie diet in the run-up to becoming pregnant, according to a team of scientists. The finding is the first clear evidence that a mother's eating habits around the time of conception can influence the sex of her baby.

The discovery points to a natural way for women to boost, if only slightly, their chances of having a boy or a girl, depending on whether they consume large amounts of foods such as bananas and cereals, or have a more restricted diet.

Scientists at Oxford and Exeter universities asked 740 women, who had become pregnant for the first time, about their eating patterns in the year before they conceived. They then divided the women into high, medium and low calorie groups.

They found that 56% of women in the high calorie group gave birth to boys, compared with 45% in the lower calorie group. None of the women was obese or aware of the gender of her baby throughout her pregnancy.

"For the first time, we've shown there is a clear association between a mother's diet and the gender of her infant," said Fiona Mathews, a specialist in mammalian biology at Exeter University, who led the research.

"The mother seems to be able to influence the survival of either the sperm or the fertilised egg in its very early stages, probably before it has even implanted in the womb."

When the researchers looked more closely at the women's diets, they found that certain nutrients were key to the effect, she said.

"We were able to confirm the old wives' tale that eating bananas and so having a high potassium intake was associated with having a boy, as was a high sodium intake. But the old tale about drinking a lot of milk to have a girl doesn't seem to hold up. In fact, more calcium meant they were again more likely to have a boy.

"It does not seem to matter whether you get most of your energy from carbs or fat, it's about the total amount of calories consumed," she said.

The study, which appears today in the Proceedings of the Royal Society B, showed that 59% of women who ate breakfast cereal every day had boys, compared with only 43% of women who rarely or never ate cereal.

Nutritional data was collected for three time periods: usual intake before conception (preconception); intake at around 16 weeks' gestation (early pregnancy) and usual intake between 16 and 28 weeks' gestation (later pregnancy).

While it might be possible for a woman to boost the effect by substantially changing her diet, scientists warned that consuming high levels of salt or dramatically altering levels of other nutrients could be harmful.

"If you're looking for a boy, then eating breakfast cereal every day and within safe limits, having a reasonable intake of sodium, potassium and calcium, plus a good intake of protein looks like a sensible option. It's the converse of that if you're hoping for a girl, but again, only within safe limits," Mathews said.

The finding makes evolutionary sense and mirrors a similar effect seen in other animals. Females are more likely to be born when food is scarce, since they are more likely to produce at least some babies. Males are more of a gamble though, with some having lots of offspring and others having none.

"If times are good, it can make a lot of sense to invest in boys because you might produce a strapping great warrior, who could go on to produce far more grandchildren than a daughter would," said Mathews.

Professor Stuart West, of Edinburgh University, said women should be extremely cautious about using diet to influence the sex of their offspring.

He pointed out that similar studies in animals showed huge variations in the effect and warned that changing diet could have other health implications for mothers and children.