People following a Mediterranean-style diet may have the best chance of keeping weight off — and doing it without causing negative side effects — according to a study published in the Journal of the American Medical Association.

Researchers led by Cara Ebbeling at Boston Children’s Hospital compared three different diets in people who had already lost weight. Knowing that dieters often struggle to maintain their slimmer bodies, the researchers sought to study the impact of the diets on energy expenditure — that is, which diet helps people burn the most calories a day and would, therefore, help keep them from regaining the weight. The researchers measured the participants’ levels of hormones, enzymes, blood fats and insulin sensitivity, and other markers of heart health and diabetes risk.

The study included 21 overweight and obese adults, aged 18 to 40, who first followed a three-month diet plan (containing 45% of total calories from carbohydrates, 30% from fat and 25% from protein) and lost 10% to 15% of their body weight. A month later, participants were randomly rotated through the three test diets, each for one month at a time:

Low-fat: about 20% of total calories from fat, 60% from carbohydrates and 20% from protein. The diet focuses on whole-grain foods and fruits and vegetables, and reduces intake of fatty meats, oils, nuts and other high-fat products

Low-carb: modeled after the Atkins diet, with 10% of total calories from carbs, 30% from protein and 60% from fat. The diet minimizes intake of carbohydrates, including bread, rice, pasta, potatoes, baked goods and starchy vegetables, while upping consumption of beef, fish, chicken, eggs, cheese and some fruits and veggies

Low-glycemic index: similar to the Mediterranean diet, with 40% of total calories from carbs, 40% from fat and 20% from protein. The diet emphasizes whole grains like oatmeal and brown rice, low-fat meats like fish, fruits and vegetables, beans and healthy fats from olive oil and nuts. It avoids highly processed, sugary carbs and snack foods.

Participants on the low-carb diet burned the most calories — on average 325 calories more a day compared with the low-fat group — but there was a side effect. These dieters also saw increases in the stress hormone cortisol and CRP, a marker of inflammation and a risk factor for heart disease. (In another, unrelated study published in BMJ on Tuesday, researchers confirmed that Swedish women on a low-carbohydrate diet such as Atkins increased their risk of heart disease by 28% compared to women not on such diets.)

People on the low-glycemic index diet burned about 150 calories more each day than the low-fat group, about the equivalent of an hour of moderate exercise, but without the harmful heart effects. The low-fat dieters burned the fewest calories a day, and they also showed increases in triglycerides and lower levels of good cholesterol.

Those surges and crashes may trigger increases in hunger and appetite, by prompting the brain to seek out calories to make up for the loss it senses. If the body thinks it’s not getting enough calories, it also dials down metabolism to conserve energy — and that could lead people to regain lost weight.

What the study suggests is that a calorie isn’t just a calorie. “It says that from a metabolic perspective all calories are not alike,” Ludwig told the Boston Globe. “The quality of the calories going in affects the number of calories going out.”

Ludwig says the low-glycemic index diet represents a good “middle ground” — it doesn’t drastically reduce any major nutrient, and instead focuses on including a wide variety of foods with high-quality nutrients — for maintaining weight loss.

Some nutrition and weight loss researchers commenting on the new study qualified its results. In an interview with USA Today, Marion Nestle, a nutrition professor at New York University and author of Why Calories Count, noted, for example, that longer-term studies of people dieting in the real world (in contrast, the current study gave participants prepared food, much of which they ate at the hospital) showed little difference between different types of diets on weight loss and maintenance. The key is simply to eat less, she said.