BROOKLINE, Mass. (AP) — A Massachusetts town that adopted an unusual ordinance banning the sale of tobacco to anyone born in the 21st century is being looked at as a possible model for other cities and towns hoping to further clamp down on cigarettes and tobacco products.

The bylaw — the first of its kind in the country — was adopted by Brookline in 2020 and last week was upheld by the state’s highest court, opening the door for other communities to adopt similar bans that will, decades from now, eventually bar all future generations from buying tobacco.

The rule, which bans the sale of tobacco to anyone born on or after Jan. 1, 2000, went into effect in 2021 in the town of about 60,000 next to Boston.

Under a Massachusetts law signed by former Republican Gov. Charlie Baker in 2018, anyone under the age of 21 is already barred from purchasing any tobacco product — including cigarettes, cigars and e-cigarettes — in the state.

Supporters of the Brookline measure point out that state law acknowledges the authority of local communities to enact their own measures to limit the sale of harmful products.

Critics of the Brookline law, including convenience store owners who rely on the sales of tobacco products for a significant portion of their income, disagreed however, arguing that the Brookline law conflicts with the 2018 state law which allows those over the age of 21 to purchase tobacco products — and would establish two sets of adults, one that could buy cigarettes and one that couldn't.

The Massachusetts Supreme Judicial Court sided with Brookline, noting that cities and towns “have a lengthy history of regulating tobacco products to curb the well-known, adverse health effects of tobacco use.”

“Importantly, state laws and local ordinances and bylaws can and often do exist side by side,” the court added. “This is particularly true of local ordinances and bylaws regulating public health, the importance of which we have long acknowledged.”

Peter Brennan, executive director of the New England Convenience Store and Energy Marketers Association, said the group is looking into possibly appealing the decision to the U.S. Supreme Court.

He noted that while the law targets tobacco, the rules for marijuana remain the same.

“It’s a question of how else can we demonize this product,” Brennan said. “It’s about trying to be a trendsetter, tying to be first in the nation.”

Jon Hurst, president of the Retailers of Massachusetts Association, also criticized the ruling, saying it could lead to a hodgepodge of rules,

“351 different rules doesn’t make sense for interstate commerce. Local gov should focus on schools, public safety, trash services, etc.,” Hurst wrote on X, formerly known as Twitter.

Brookline’s approach only targets the next generation of would-be tobacco users, not current purchasers, according to Mark Gottlieb, executive director of the Public Health Advocacy Institute at Northeastern University’s School of Law, which represented Brookline.

“Friday’s ruling makes it absolutely clear that any city or town in Massachusetts can start the clock on ending the sale of tobacco products by following Brookline’s example without fear of a legal challenge,” Gottlieb said.

Other governments have considered similar measures.

In 2022, New Zealand passed a similar law intended to impose a lifetime ban on young people buying cigarettes by mandating that tobacco can’t ever be sold to anybody born on or after Jan. 1, 2009. The country's new prime minister has said he plans to repeal the law.

U.K. Prime Minister Rishi Sunak last year proposed raising the legal age that people in England can buy cigarettes by one year, every year until it is eventually illegal for the whole population.

A handful of Massachusetts towns have weighed similar bans, including proposals that would ban the sale of tobacco or e-cigarette products to anyone born on or after Jan. 1, 2004.

Massachusetts in recent decades has taken a number of steps to curbs smoking in the state, including raising taxes on cigarettes.

In 2022, 10.4% of adults in Massachusetts reported current cigarette smoking.

The court pointed to an earlier ruling in the case of a company that was licensed to operate cigarette vending machines in Provincetown. The group argued that a state law only banning vending machine sales of cigarettes to minors preempted a local ordinance banning all vending machine cigarette sales.

The court sided with the town, arguing that the state and local laws were not inconsistent because both banned the vending machine sale of cigarettes to minors.