Both diets improved cholesterol in a two-year study that included intensive group counseling. But those on the low-carbohydrate diet got a bigger boost in their so-called good cholesterol, nearly twice as much as those on low-fat.

In previous studies, low-carb diets have done better at weight loss at six months, but longer-term results have been mixed. And there’s been a suggestion of better cholesterol from low-carb eating.

The latest test is one of the longest to compare the approaches. At the end of two years, average weight loss was the same for both — about 15 pounds or 7 percent.

The key difference was in HDL, or good cholesterol: a 23 percent increase from low-carb dieting compared to a 12 percent improvement from low-fat, said Gary Foster, director of Temple University’s Center for Obesity Research and Education, who led the federally funded study.

He said the low-carb boost is the kind one might get from medicines that improve HDL.

“For a diet, that’s pretty impressive,” Foster said.

The findings, published in Tuesday’s Annals of Internal Medicine, are based on a study of 307 adults, two-thirds of them women. Participants were obese but didn’t have cholesterol problems or diabetes.

Half followed a low-carb diet modeled after the Atkins’ plan and half went on a low-calorie, low-fat diet. All attended group sessions to help them change bad eating habits, get more active and stick to their diets.

The volunteers had periodic checks of their weight, blood, bone density and body composition. After two years, there was no major differences between diet groups, except in good cholesterol. Why the low-carb diet had a bigger effect on good cholesterol isn’t known, the researchers said.

As low-carb plans became popular, experts feared the diet would drive up the risk of heart disease because it allows more fat. The latest results suggest those concerns are unfounded, Foster said. In the low-carb group, there was an early rise in “bad” cholesterol, the kind that builds up in arteries. But after two years, both groups ended up with similar improvements to bad cholesterol.

The study’s strengths include its size, length and its multiple locations — Denver, Philadelphia and St. Louis, said Dr. William Yancy, of the Durham VA Medical Center in North Carolina.

“These are results we should have a lot of confidence in,” said Yancy, who has done similar diet research but was not involved in the study.

Foster, the study leader, said dieters should be less concerned about which diet to use, and focus on finding the support or technique — like writing down what they eat — that keeps them on track.

“It doesn’t make a difference for weight loss how you get there,” he said.

With the current obesity epidemic, more than one way is needed to attack the problem, Yancy said.