But a new study, published Tuesday in JAMA, may turn that advice on its head.

It found that people who cut back on added sugar, refined grains and highly processed foods while concentrating on eating plenty of vegetables and whole foods — without worrying about counting calories or limiting portion sizes — lost significant amounts of weight over the course of a year.

The strategy worked for people whether they followed diets that were mostly low in fat or mostly low in carbohydrates. And their success did not appear to be influenced by their genetics or their insulin-response to carbohydrates, a finding that casts doubt on the increasingly popular idea that different diets should be recommended to people based on their DNA makeup or on their tolerance for carbs or fat.

The research lends strong support to the notion that diet quality, not quantity, is what helps people lose and manage their weight most easily in the long run. It also suggests that health authorities should shift away from telling the public to obsess over calories and instead encourage Americans to avoid processed foods that are made with refined starches and added sugar, like bagels, white bread, refined flour and sugary snacks and beverages, said Dr. Dariush Mozaffarian, a cardiologist and dean of the Friedman School of Nutrition Science and Policy at Tufts University.

“This is the road map to reducing the obesity epidemic in the United States,” said Mozaffarian, who was not involved in the new study.

The new research was published in JAMA and led by Christopher D. Gardner, the director of nutrition studies at the Stanford Prevention Research Center. It was a large and expensive trial, carried out on more than 600 people with $8 million in funding.

The study stands apart from many previous weight-loss trials because it did not set extremely restrictive carbohydrate, fat or caloric limits on people and emphasized that they focus on eating whole or “real” foods — as much as they needed to avoid feeling hungry.

This article originally appeared in The New York Times.

ANAHAD O'CONNOR © 2018 The New York Times