Whether a diet works might depend on which bacteria are in your gut.

Using feces samples, Danish researchers analyzed the ratio of two gut bacteria, Prevotella and Bacteroides, in 62 overweight people. For 26 weeks, they randomly assigned them to a low-fat diet high in fiber, fruits, vegetables and whole grains or a diet comparable to that of the average Dane.

Those on the high-fiber diet with a high Prevotella to Bacteroides ratio lost an average of 10.9 pounds of body fat, three and a half pounds more than those on the diet with a low ratio. Those on the regular diet with a high Prevotella ratio lost four pounds, compared with five and a half pounds for those with a low Prevotella ratio, a statistically insignificant difference.

The study is in The International Journal of Obesity.

The lead author, Mads F. Hjorth, an assistant professor at the University of Copenhagen, said that losing fat, and not muscle mass, is what is most meaningful to improved health.

Dr. Hjorth said that there has been a lot of promise in studying the microbiome, but little in the way of practical results.