Prostate cancer is the second most common cancer in men worldwide, with 35,000 new cases and about 10,000 deaths in the UK every year.
Researchers from the Universities of Bristol, Cambridge and Oxford examined the diets and lifestyles of almost 14,000 men aged between 50 and 69, with and without the disease.
In the first work of its kind, they developed a prostate cancer "dietary index", comprising dietary components that have been linked to prostate cancer.
Men with optimal intake of the three components - selenium, calcium and foods rich in lycopene - were found to have a lower risk of developing prostate cancer. Those who consumed more than 10 portions of tomatoes each week - such as tomato juice and baked beans - saw an 18 per cent reduction in risk.
Eating the recommended five or more servings of fruit or vegetables a day was also found to decrease risk by 24 per cent, compared to men who ate two-and-a-half servings or less.
Vanessa Er, from the School of Social and Community Medicine at the University of Bristol and Bristol Nutrition BRU, led the research.
"Even though we found tomatoes and tomato products did have this reduction in risk, we still advise men to have a variety of fruits and vegetables, stay healthy and active and maintain an ideal weight," she said.
The research is published in the medical journal Cancer Epidemiology, Biomarkers and Prevention.