Adolescents in states with strict laws regulating the sale of snacks and sugary drinks in public schools gained less weight over a three-year period than those living in states with no such laws, a new study has found.

The study, published Monday in Pediatrics, found a strong association between healthier weight and tough state laws regulating food in vending machines, snack bars and other venues that were not part of the regular school meal programs. Such snacks and drinks are known as competitive foods, because they compete with school breakfasts and lunches.

The conclusions are likely to further stoke the debate over what will help reduce obesity rates, which have been rising drastically in the United States since the 1980s. So far, very little has proved effective and rates have remained stubbornly high. About a fifth of American children are obese, according to the Centers for Disease Control and Prevention.

Public health experts have urged local and state governments to remove competitive foods from schools, and in recent years states have started to pass laws that restrict their sale, either banning them outright or setting limits on the amount of sugar, fat or calories they contain.