"We have been aware that certain diets seem to reduce the risk of allergy in infants," said Dr. Magnus Wickman, a professor at the Karolinska Institute in Stockholm, Sweden, who was not involved in the study.
"The mechanism behind that is that we think that different kinds of fatty acids and antioxidants, different kinds of vitamins and essential minerals are good for your health and also prevent allergy," he said.
Researchers estimate that up to 8% of children have a food allergy.
Parents are sometimes advised to avoid certain foods as a means of preventing food allergies from starting. But Kate Grimshaw, lead author of the new study and a researcher at the University of Southampton in the UK, said she has been concerned that parents are reducing the nutritional diversity of their infants' diet without there being a great deal of evidence to back it up.
To see how parents are feeding their infants, and whether that appears to have any influence on food allergies, Grimshaw and her colleagues collected food diaries from the parents of 1,140 babies.
The parents typically maintained the diet log for the first year of life, Grimshaw and her colleagues report in The Journal of Allergy and Clinical Immunology.
During that time, 41 children were diagnosed with a food allergy, and Grimshaw's group compared these infants to 82 similar babies without an allergy.
The researchers scored the babies' diets based on the combination of different foods they ate.
They found that babies without food allergies scored higher than babies with allergies on a diet that was rich in healthy, often homemade, foods -- including fruits, vegetables, poultry and fish -- and scant on processed foods such as pre-made meals, potato chips, cook-in sauces and bacon.
"The analysis showed that the infants who were having more fruits and vegetables and less commercially produced baby foods and also less adult foods were the ones who were less likely to develop an allergy by the time they were two," Grimshaw said.
"It's not that they didn't have commercially-made baby foods, it's just that they did not have them predominantly in their diet," she added.
The study could not determine why the fresher type of diet seemed to protect against food allergies, and the results do not prove that the dietary patterns caused the differences in allergy rates.
Wickman said that studies on diet and allergy are extremely difficult, and that it is a challenge for researchers to account for other factors that might influence what a child eats and his risk for developing a food allergy.
Still, it is possible that the foods themselves are responsible.
"We know that there are nutrients in the diet that educate the immune system. And one could argue that if they're not there in adequate amounts when the child's immune system is developing, that may be one way that this is working," Grimshaw said.
Wickman said that there is no evidence that avoiding allergenic foods, such as nuts, fish and eggs is beneficial in preventing food allergies.
She added, there is very little risk in recommending that parents focus on fresh fruits and vegetables.
"Healthy food has so many good things, and maybe it also can reduce the risk of food allergy in the child," Wickman opined.
Doctors and health officials already recommend that children get plenty of fruits and vegetables and avoid junk foods.
Grimshaw said the results are just another reason for parents to feed their children fruits and vegetables and to try to serve home-made meals.