Having a higher genetic risk of type 2 diabetes does not necessarily mean healthy eating matters less.

In a long-running German study, researchers found no evidence that inherited genetic risk changed the relationship between diet quality and the chances of developing type 2 diabetes. They did find an early sign that other biological changes shaped by age, lifestyle and past exposures might influence how strongly diet is linked to risk.

The findings, published in Cardiovascular Diabetology, come from the EPIC-Potsdam study, which has followed adults in Germany since the 1990s.

Researchers looked at several ways of measuring diet quality. In general, the healthier eating patterns favored foods such as fruits, vegetables, whole grains, fish, legumes and nuts while limiting foods such as red and processed meats and sugar-sweetened beverages.

One of those measures, the Alternative Healthy Eating Index, showed a clear difference: People with the highest scores had a lower risk of developing type 2 diabetes than those with the lowest scores. Other diet measures generally pointed in the same direction, although not all of those results were statistically significant.

The researchers then asked whether inherited risk changed that picture.

They used genetic information to estimate each participant’s susceptibility to type 2 diabetes. But they found no clear evidence that healthier eating was linked to diabetes risk differently in people with higher versus lower genetic risk.

That is an encouraging finding. Genetics can influence someone’s chances of developing type 2 diabetes, but this study did not suggest that healthy eating becomes less relevant simply because inherited risk is high.

Researchers also looked at another type of biological difference known as epigenetic change.

Unlike the genetic code people are born with, epigenetic patterns can change over time. They can reflect influences such as age, diet, physical activity, body weight and other aspects of a person’s life and health.

The researchers found some evidence that these patterns might affect how strongly diet quality is connected with future diabetes risk.

But the results were far from definitive.

Several diet measures initially appeared to behave differently depending on participants’ epigenetic profiles. After researchers ran additional analyses, however, only one of those relationships remained consistent.

Even then, the researchers could not clearly identify a group that benefited more or less from healthy eating.

People with lower or middle epigenetic risk tended to show a stronger link between healthier eating and lower diabetes risk, but those individual comparisons were not statistically clear. The authors said the findings need to be confirmed in other populations before they could be used to personalize diet advice.

That distinction matters. The study does not show that healthy eating works for some people and not for others.

It is also possible that the epigenetic score reflects years of accumulated health influences rather than one specific biological difference. Past diet, activity, body weight and aging can all contribute to those patterns.

“We view our findings as an important indication of which biological factors might be relevant for future precision prevention,” study author Matthias Schulze said in a news release. “The next step is to verify these associations in independent studies.”

The study also has limitations. It was observational, so it cannot prove that healthier eating caused the lower diabetes risk. Diet was measured at the beginning of the study, and participants may have changed how they ate over time. The study population was also of European ancestry, so the findings may not apply equally to everyone.

For now, the genetic finding is the clearest part of the story.

People with higher inherited risk did not appear to lose the potential advantage associated with healthier eating.

The epigenetic findings are more preliminary. They raise the possibility that a person’s health history and biology could one day help explain why people respond differently to the same diet, but the science is not yet ready to turn that idea into personalized recommendations.

The EPIC-Potsdam study and this analysis received support from German and European public research agencies, including the German Federal Ministry of Education and Research, the German Center for Diabetes Research, German Cancer Aid, the European Community and the State of Brandenburg.