Experts found that women on such a diet, also rich in oils, whole grain bread and poultry, were less likely to give birth before 37 weeks.
Those who followed a more "traditional" diet of foods such as potatoes, cooked vegetables and fish, could also cut their risk.
Writing online in the British Medical Journal (BMJ), experts studied data for 66,000 pregnant women, of which 3505 (5.3%) delivered their babies early.
They found that women who followed the diet rich in fibre, fruit and vegetables had around a 12% reduced risk of premature delivery, especially if they were having their first baby. Risks were also cut by around 9% for those who favoured the more "traditional" diet.
There was no link found between premature birth and women eating a diet of salty and sweet snacks, white bread, desserts and processed meats.
The authors, from hospitals and public health organisations in Sweden, Norway and Iceland, said: "Although these findings cannot establish causality, they support dietary advice to pregnant women to eat a balanced diet including vegetables, fruit, whole grains, and fish and to drink water. Our results indicate that increasing the intake of foods associated with a prudent dietary pattern is more important than totally excluding processed food, fast food, junk food, and snacks."