Researchers have long known that the so-called Mediterranean diet of fish, fruits, vegetables and olive oil is good for you.

But now they’ve found out it’s nearly magical: It can reduce the risk of developing diabetes even among people who neither cut back on calories nor increase their exercise.

In other words, people who don’t lose weight or get any fitter can still ward off diabetes simply by eating the right foods.

The conclusion of Spanish researchers was announced in the Annals of Internal Medicine today.

Cutting back on calories and increasing exercise has proven to be more effective at avoiding diabetes than any medicine, the researchers said. But they were curious if a change in dietary choices could make a difference as well.

Spanish researchers took 3,451 older men and women who were at risk for cardiovascular disease and divided them into three groups: People who ate the Mediterranean diet plus extra olive oil; people who ate the Mediterranean diet plus mixed nuts, and those who were assigned a low-fat diet.

The Mediterranean diet typically consists of fish, fruits, vegetables and whole grains, along with avoidance of meat, dairy products, and starches.

Wine was recommended with moderation only for habitual drinkers. Participants were supposed to reduce their consumption of other forms of alcohol.

They were monitored for four years.

Overall, 273 of them developed diabetes. Those on the low-fat diet accounted for more cases than those on the two versions of the Mediterranean diets.

The magic elixir seems to be olive oil: Research subjects who stuck to the Mediterranean diet supplemented by an additional three tablespoons of olive oil a day had the best chance of avoiding diabetes.

Those who supplemented their diet with a combination of walnuts, almonds and hazelnuts had the second-best outcome in preventing diabetes.

Part of the explanation may be that the Mediterranean diet is not only good for you, but easy to stick with. Adherence to both the olive oil and nuts diets was better than that of the low-fat diet.