The Mexican state of Oaxaca has banned the sale of junk food and sugary drinks to children in an attempt to reduce high obesity and diabetes levels.
Oaxaca is the first state to take the measure in Mexico, which has one of the world's highest rates of childhood obesity.
People breaking the law can be fined and have their businesses closed. Re-offenders face jail terms.
The move comes as Mexico's number of deaths linked to Covid-19 nears 50,000.
Mexico's death toll is the third-highest in the world after the US and Brazil. Experts say being obese or overweight puts you at greater risk of serious illness or death from the virus.
About 73% of the Mexican population is overweight, compared to one-fifth of the population in 1996, according to a study by the Organisation for Economic Co-operation and Development.
Mexicans consume more carbonated drinks per person than any other nation.
Oaxaca is the Mexican state with the highest child obesity rate and the second-highest rate in adults, according to Oaxaca state health data.
The passing of the law was greeted with applause from lawmakers inside the state Congress, but outside shop owners and street sellers were protesting against it.
The law forbids the sale, distribution and promotion of sugary drinks and junk food to those under age. It will also apply to vending machines in schools.
The lawmaker who introduced the bill, Magaly López Domínguez, said the idea was not to harm shop owners and street sellers. She argued that they could continue selling sugary drinks and junk food, just not to children.
Mexico's deputy health minister and the country's coronavirus czar, Hugo López-Gatell, welcomed the move. Mr López-Gatell last month called sugary drinks "bottled poison" and urged people not to drink them.
Christian Skoog, the Unicef representative in Mexico, also tweeted his approval (in Spanish), saying that such measures protected children's rights to quality and nutritious food.
In 2014, Mexico introduced a tax on sugary drinks and junk food but it had so far stopped short of banning the sale of such items to children.