The reason the Mediterranean diet is so heart-healthy has long been chalked up to olive oil. But the reason for the oil's good effects has not been so clear.

The benefits of HDL — “good” — cholesterol appear to depend on how well your HDL works, a new study suggests, and the Mediterranean diet may make it work a lot better, especially if you are one of those at high risk for a heart attack.

Having high HDL levels is good, and making HDL function more effectively is even better.

High levels of LDL (“bad” cholesterol) and triglycerides (fats in your blood) increase the risk of developing cardiovascular diseases. HDL helps to lower the risk by traveling through the bloodstream and removing harmful LDL from places it doesn’t belong.

But not all HDL cholesterol works equally well to keep sticky LDL cholesterol from clumping and forming plaques in your blood vessels. In people at high risk for heart attacks, strokes and other cardiovascular diseases, HDL doesn't work as well as it does in others. “[T]he functional ability of HDL matters as much as its quantity,” according to study author, Montserrat Fitó.

According to Fito, small studies have shown that eating foods rich in antioxidants, like virgin olive oil, tomatoes and berries, improves how well HDL functions, but a larger, controlled study was needed.

Nearly 300 people, average age 66, who were considered at high risk for developing cardiovascular disease participated in the study. They were randomly assigned to eat one of three diets for a year: a traditional Mediterranean diet with added virgin olive oil every day (about four tablespoons); a traditional Mediterranean diet with extra nuts (about a handful); or a healthy (control) diet that limited red meat, processed food, high-fat dairy foods and sweets. Both Mediterranean diets emphasized fruit, vegetables, legumes and whole grains, and included moderate portions of poultry and fish.

All the diets were pretty healthy, but after a year, the results showed that the two Mediterranean diets did the best job of improving the function of HDL, especially among those who had ate the diet with added virgin olive oil.

None of the diets increased HDL to any extent, and only the control diet decreased both total and LDL cholesterol levels.

The Mediterranean diet with added virgin olive oil helped improve HDL functioning in three ways. It assisted in the process by which HDL removes bad cholesterol from plaque in the arteries and takes it to the liver where it is either used to make hormones or is removed from the body. It also improved the anti-inflammatory properties of HDL that prevent LDL from contributing to the buildup of plaque in the arteries, and it helped with HDL’s ability to relax blood vessels and keep blood flowing.

Though the control diet provided plenty of fruits and vegetables, to the surprise of researchers it also reduced HDL’s anti-inflammatory ability, while the Mediterranean diet, whether it was enriched with virgin olive oil or nuts, did not.

So, once again the Mediterranean diet is a winner. Having high HDL levels is good, and making HDL function more effectively is even better; and that’s where the Mediterranean diet scores, especially with more liberal use of virgin olive oil.

The study is published in the American Heart Association journal, Circulation.