Most of us assume a plant-based diet is the key to good health, and it is in many ways. But as with any other diet, even a largely vegetarian diet is only as healthy as the foods you include in it. Some plant-based diets can actually raise your risk of heart disease.

The recommendations to eat more plant foods to reduce your risk of heart disease and other health conditions assume that your diet will be built around whole grains, unsaturated fats, and plenty of fruits and vegetables, but that isn’t always the case.

Even though sugary beverages, refined grains, potatoes and sweets can technically be considered part of a plant-based diet, that type of diet increases the risk of heart disease.

Much of the information on plant-based or vegetarian diets is based on studies which only required that the diets exclude some or all animal foods. All plant foods were treated equally, including refined grains and sugary drinks, which are now seen as increasing the risk of heart disease.

To see how different types of largely vegetarian diets affected the risk of heart disease researchers used data from three large studies that included over 166,000 women and 43,000 men. They looked at three types of plant-based diets: one which emphasized eating plant foods along with a reduced amount of animal food; a healthy version that focused on eating whole grains, fruits and vegetables; and a version that emphasized eating plant foods, but included unhealthy foods like refined grains and sweets.

People in the study answered follow-up questionnaires every two years for 20 years on their lifestyle, health behaviors and medical history. More than 8,600 people developed heart disease during the follow-up period.

The information gathered from the participants was analyzed to see which of the three versions of plant-based diets each person followed. Those who ate a plant-based diet had a lower risk of heart disease overall, but the more healthy plant foods they ate, such as whole grains, fruits and vegetables, the lower their risk of heart disease. Even though sugary beverages, refined grains, potatoes and sweets can technically be considered part of a plant-based diet, that type of diet increased the risk of heart disease.

“It's apparent that there is a wide variation in the nutritional quality of plant-based foods, making it crucial to take into consideration the quality of foods in a plant-based diet,” lead author, Ambika Satija, of the Harvard T.H. Chan School of Public Health, said in a statement.

This study adds to the evidence that a diet primarily focused on plant foods reduces the risk of heart disease, but it also shows that not all plant-based diets are created equally. Fruits, vegetables, whole grains and unsaturated fats deserve much more emphasis in dietary recommendations.

It is published in the Journal of the American College of Cardiology.