NEW YORK — For about 50 years, adding cavity- preventing fluoride to drinking water was a popular public health measure in Yorktown, a leafy town north of New York City.

But in September, the town’s supervisor used his emergency powers to stop the practice.

The reason? A recent federal judge’s decision that ordered U.S. regulators to consider the risk that fluoride in water could cause lower IQ in kids.

“It’s too dangerous to look at and just say ‘Ah, screw it. We’ll keep going on,’ ” said the town supervisor, Ed Lachterman.

Yorktown isn’t alone. The decision to add fluoride to drinking water rests with state and local officials, and fights are cropping up nationwide.

Communities in Florida, Texas, Oregon, Utah, Wyoming and elsewhere have debated the idea in recent months — the total number is in the dozens, with several deciding to stop adding it to drinking water, according to Fluoride Action Network, an advocacy organization against water fluoridation. In Arkansas, legislators filed a bill last week to repeal the state’s fluoridation program.

The debates have been ignited or fueled by three developments:

In August, a federal agency reported “with moderate confidence” that there is a link between high levels of fluoride exposure — more than twice the recommended limit — and lower IQ in kids.

In September, the federal judge ordered the U.S. Environmental Protection Agency to further regulate fluoride in drinking water because high levels could pose a risk to the intellectual development of children.

This month, just days before the election, Robert F. Kennedy Jr. declared that Donald Trump would push to remove fluoride from drinking water on his first day as president. Trump later picked Kennedy to run the Department of Health and Human Services.

In Durango, Colorado, there was an unsuccessful attempt to stop fluoridating the water during Trump’s first term in office. A new push came this year, as Trump saw a surge of political support.

“It’s just kind of the ebb and flow of politics on the national level that ultimately affects us down here,” city spokesman Tom Sluis said.

Fluoride strengthens teeth and reduces cavities by replacing minerals lost during normal wear and tear, according to the U.S. Centers for Disease Control and Prevention. In 1950, federal officials endorsed water fluoridation to prevent tooth decay; the addition of low levels of fluoride to drinking water has long been considered one of the greatest public health achievements of the past century.

Fluoride can come from a number of sources, but drinking water is the main source for Americans, researchers say. Nearly two-thirds of the U.S. population gets fluoridated drinking water, according to CDC data.

There is a recommended fluoridation level, but many communities exceed that, sometimes because fluoride occurs naturally at higher levels in certain water sources.

Opposition is nothing new, although for decades it was considered a fringe opinion. Adherents included conspiracy theorists who said fluoridation was a plot to make people submissive to government power.

Health officials could point to studies showing that cavities were less common in communities with fluoridated water and that dental health worsened in communities without it.

But fluoride isn’t just in water. Through the years it became common in toothpaste, mouthwash and other products. And data began to emerge that there could be too much of a good thing: In 2011, officials reported that 2 out of 5 U.S. adolescents had at least mild tooth streaking or spottiness because of too much fluoride.

In 2015, the CDC recommended that communities revisit how much they were putting in the water. Beginning in 1962, the government recommended a range of 0.7 milligrams per liter for warmer climates where people drink more water to 1.2 milligrams in cooler areas. The new standard became 0.7 everywhere.

Over time, more studies pointed to a different problem: a link between higher levels of fluoride and brain development. The August report by the federal government’s National Toxicology Program — summarizing studies conducted in Canada, China, India, Iran, Pakistan and Mexico — concluded that drinking water containing more than 1.5 milligrams of fluoride per liter was associated with lower IQs in kids.

“There’s no question that fluoride prevents cavities,” said Dr. Tom Frieden, who was director of the CDC when the agency changed the recommended fluoride levels. “There’s also no question we’re getting more fluoride than we were 50 years ago, through toothpaste and other things.”

Frieden said “a legitimate question” has been raised about whether fluoride affects brain development, and studies making that link “need to be looked at carefully.”

Many people in health care strongly embrace water fluoridation. The American Dental Association and the American Academy of Pediatrics reaffirmed their endorsement of current CDC recommendations in the wake of the federal report and the judge’s ruling.

Colorado’s health department, which weighed in during a Nov. 5 Durango City Council meeting, said in a statement that it “seeks to align its public health recommendations with the latest scientific research. The facts of this court ruling are not sufficient” to revise current fluoridation levels.

Durango officials are waiting to see what the EPA does in reaction to the recent court decision, said Sluis, the city spokesman.

“We follow the science,” he said. “It wouldn’t be in the best interest of the city to stop fluoridation based on one judge’s interpretation.”

In Yorktown, Lachterman concluded that the judge’s decision was enough to halt fluoridation. He recalled a community discussion several years ago in which most people in the room clearly favored fluoridation, but recently it seems public comment has reversed.

“It’s like a total 180,” he said.

But not all public pressure these days is against the idea.

In September, Buffalo, New York, announced that it would resume water fluoridation after not having it for nearly a decade. News reports had described an increase in tooth decay and families sued, seeking damages for dental costs.

The Buffalo Sewer Authority’s general manager, Oluwole McFoy, declined to discuss the decision, citing the litigation.

For its part, the EPA “is in the process of reviewing the district court’s decision,” spokesman Jeff Landis said last week.