A recent study has found that lifestyle does, in fact, matter in preventing heart disease. The effects of gene variant, 9p21, one of the strongest predictors for heart disease, can be mitigated by a diet high in raw fruits and vegetables.

We found that in people with this high-risk gene who consumed a diet rich in vegetables and fruits, their risk came down to that of people who don't have that gene, said Dr. Sonia Anand, a lead author and professor of medicine and epidemiology at the Michael G. DeGroote School of Medicine at McMaster University.

In general, around 20 percent of people carry at least one copy of the bad gene, Anand told WebMD.

Researchers analyzed diets of more than 27,000 people from Europe, South Asia, China, Latin America, and the Middle East.

Two separate studies, Interheart and Finrisk, provided the data for researchers. In the Interheart study, researchers compared 3,820 patients who had had heart attacks and 4,294 who had not. Finrisk, a Finnish study, included 19,129 people, of which 1,014 had heart disease.

People with the genetic variant, 9p21, but who consumed diets rich in fruits, raw vegetables, and nuts seemed to end up on average with a heart attack risk close to those who do not have the gene. However, people with the 9p21 trait who did not change their diet had as much as twice the chance of a heart attack.  

Despite having a high genetic risk for heart disease, a healthy lifestyle can actually turn off the gene, said Anand. However, she is not yet sure how exactly diet affects the gene.  

Study participants who lowered their risks ate at least two servings of fruits and vegetables a day, reported ABC News. Raw fruits and vegetables seemed to have an even greater effect.  

Researchers say this evidence is interesting because it shows the possibility of gene-environment interaction in heart disease and other genetic dispositions.  

This may be true for other issues. There may be genetic factors that make a patient more sensitive to salt and develop hypertension, whereas another person can eat large amounts of salt and maintain normal pressure, said Dr. Carl Chip Lavie, medical director of Cardiac Rehabilitation and Prevention at the John Ochsner Heart and Vascular Institute at Ochsner Health System in New Orleans.

We often think of genetic factors as being unmodifiable factors, said Anand. But lifestyle factors can actually change the genes.

The promising study gives hope to people who may be at a genetic risk for heart disease.