"At times, patients don't think they need to follow a healthy diet since their medications have already lowered their blood pressure and cholesterol -- that is wrong," study researcher Mahshid Dehghan, Ph.D., a nutritionist at the Population Health Research Institute at McMaster University, said in a statement. "Dietary modification has benefits in addition to those seen with aspirin, angiotensin modulators, lipid-lowering agents and beta blockers."

The study included 31,546 people, with an average age of 66.5, who had a history of heart disease or end organ damage as a result of diabetes. They were asked about the foods included in their diets over the last year -- like whether they drank milk, ate produce, meat, fish or poultry, etc. -- as well as about their lifestyle habits -- like whether they smoked, drank alcohol and exercised.

Researchers considered people who ate a "heart healthy diet" as those who frequently consumed fruits and vegetables, and who ate more fish than red meat, eggs or poultry. They found that eating a heart-healthy diet is associated with a 35 percent lower risk of dying from heart-related reasons, a 14 percent lower risk of a new heart attack, a 28 percent lower risk of congestive heart failure and a 19 percent lower risk of stroke.

"These associations were observed in people receiving proven drug therapies for secondary prevention, suggesting that dietary modification may have benefits in addition to those seen with aspirin, angiotensin modulators, lipid-lowering agents, and beat-blockers," researchers wrote in the study.

The positive effects of a fruit-and-veggie-heavy diet on the heart are hardly surprising. Past studies have also shown links between eating lots of produce and decreased risks of heart conditions.

Last year, a study conducted by University of Oxford researchers showed that eating at least eight servings of fruits and vegetables on a daily basis is linked with a 22 percent decreased risk of dying from heart disease, than if you were to just eat three or fewer servings, ABC News reported.

And a study conducted also by McMaster University researchers showed that people whose genes put them at higher risk of heart disease might be able to counteract this predisposition by eating produce, MyHealthNewsDaily reported.

"It's exciting to observe that, potentially, we can turn off a high-risk gene by a dietary change," study researcher Sonia Anand, of McMaster University, told MyHealthNewsDaily.