There is a great deal of evidence showing that a Mediterranean-style diet can reduce your risk of diabetes and cardiovascular disease. It can also cut your chances of having the most common type of stroke. A Harvard University study found that a plant-based diet can reduce your risk of ischemic stroke by as much as 10 percent.

But there’s a catch. The quality of your plant-based diet also matters. “Many patients think they are vegetarians, but they are really ‘pastatarians,’ and that is not a very healthy eating pattern. It is high in carbs and low in fiber,” Kathryn Rexrode, a co-author on the study, told TheDoctor.

It will be interesting to see if the processed imitation meats and veggie burgers people, particularly vegans, are choosing today provide the same health benefits vegetables do.

The study used data on over 200,000 men and women enrolled in the Nurses Health Study, Nurses Health Study II, and the Health Professionals Follow-Up Study. None of the people whose data was included in the current study had cardiovascular disease or cancer when they enrolled.

Participants were followed for more than 25 years. Every two to four years, they filled out a questionnaire about how often they had eaten about 110 different foods over the previous year. People were divided into five groups, based on the quality of their diet, which was determined by the amount — and kinds — of plant-based foods a person consumed, without excluding meat and cheese.

People who ate the highest quality plant-based diet consumed an average of 12 servings per day of leafy greens, beans, vegetable oils such as olive oil, fruits and whole grains. Those who ate the lowest quality plant-based diet ate about seven servings of these foods each day.

People with a high-quality diet only had about three servings per day of less healthy plant-based foods — those featuring refined flour and sugar, and starchy vegetables with a high glycemic index, such as potatoes and corn. Those with the low-quality diet ate about six-and-a-half servings of these foods every day.

Those in the group with the highest quality diet ate three servings of meat and dairy per day, while the group with the lowest quality diet had six servings of meat and dairy a day.

Of the roughly 6,300 people who had strokes during the study, those who ate more and better quality healthy plant-based foods had an eight percent lower risk of ischemic stroke. The risk of hemorrhagic stroke was not affected by diet quality.

You want to focus on eating whole foods and fewer processed foods. “The easy take-home message is that our study is very consistent with decades of research showing fruits and vegetables and whole grains and fiber are associated with better health outcomes,” Rexrode, chief of the Division of Women’s Health at Brigham and Women’s Hospital and an associate professor of medicine at Harvard Medical School, said.

“I am very supportive of people eating a plant-based diet, but they should think about how to keep the dietary quality high.” She and her team hope their findings will inform future public health policies because dietary recommendations to reduce stroke risk should consider the quality of plant-based foods.

The plant-based diets people, particularly vegans, are following today include some foods that are highly processed — such as imitation meats and veggie burgers. “We don’t have 20 years of follow-up with them [yet],” Rexrode said, adding that it will be interesting to see if this type of plant-based diet offers the same health benefits as a diet featuring unprocessed plant foods.

The study is published in Neurology.