Anyone who has ever been on a diet knows that the standard prescription for weight loss is to reduce the amount of calories you consume.

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.