Research showed that eating greater amounts of Mediterranean foods was more important than avoiding junk food such as refined grains, sweets, desserts, sugared drinks and deep-fried food.
Typically, a Mediterranean diet is rich in fruit, vegetables, fish and unrefined foods.
"The research suggests we should place more emphasis on encouraging people with heart disease to eat more healthy foods, and perhaps focus less on avoiding unhealthy foods," said co-author Professor Ralph Stewart, from University of Auckland in New Zealand.
The study showed that for every 100 people eating the highest proportion of healthy "Mediterranean" foods, there were three fewer heart attacks, strokes or deaths compared to those eating the least amount of healthy foods.
The researchers asked 15,482 people with stable coronary artery disease and an average age of 67 to complete a lifestyle questionnaire.
The questionnaire included simple questions on diet, such as how many times a week participants consumed servings from the following food groups: meat, fish, dairy foods, whole grains or refined grains, vegetables (excluding potatoes), fruit, desserts, sweets, sugary drinks, deep-fried foods and alcohol.
Depending on their answers, participants were given a "Mediterranean diet score" (MDS), which assigned more points for increased consumption of healthy foods.
They were also given a "Western diet score" (WDS), which assigned points for increased consumption of unhealthy foods.
After almost four years of follow-up, a total of 1,588 people had experienced either heart attack, stroke or death.
This occurred in 7.3% of the 2,885 people who had a high Mediterranean diet score.
It occurred in 10.5% of 4,018 people given an MDS of 13-14 and 10.8% of 8,579 people with an MDS of 12 or lower.
Professor Ralph Stewart, from Auckland City Hospital, University of Auckland, said: "After adjusting for other factors that might affect the results, we found that every one unit increase in the Mediterranean Diet Score was associated with a seven percent reduction In the risk of heart attacks, strokes or death from cardiovascular or other causes in patients with existing heart disease.
"In contrast, greater consumption of foods thought be less healthy and more typical of Western diets, was not associated with an increase in these adverse events, which we had not expected."
He continued: "The research suggests we should place more emphasis on encouraging people with heart disease to eat more healthy foods, and perhaps focus less on avoiding unhealthy foods."
Professor Stewart did warn, however, that this does not mean people should actively eat unhealthily.
"The main message is that some foods - and particularly fruit and vegetables - seem to lower the risk of heart attacks and strokes, and this benefit is not explained by traditional risk factors such as good and bad cholesterol or blood pressure.
"If you eat more of these foods in preference to others, you may lower your risk."
The study found no evidence of harm from modest consumption of foods such as refined carbohydrates, deep fried foods, sugars and deserts.
Professor Stewart did note, however, that the study had its limitations, as it didn't assess the total intake of calories, which "is a major determinant of obesity-related health problems", and didn't assess good fats and bad fats, so could not comment on their importance to health.
It also did not specify portion sizes in the questionnaire.
"We did not specify what a serving meant because we needed to make the questionnaire very simple and intuitive, so that it would be easy and quick to complete," said Professor Stewart.
"This is a limitation because the estimates of foods eaten are relatively crude and imprecise, but also a strength because we were able to show that even though diet is very complex, a few simple questions can identify a dietary pattern associated with a lower risk of recurrent heart attacks or strokes."
Also on HuffPost
Suggested For You
Get top stories and blog posts emailed to me each day. Newsletters may offer personalized content or advertisements. Learn more