LOS ANGELES — The nation’s most productive agricultural state will ban a widely used pesticide blamed for harming brain development in babies, California officials said Wednesday.

The move cheered by environmental groups would outlaw chlorpyrifos (klohr-PY’-rih-fohs) after scientists deemed it a toxic air contaminant and discovered it to be more dangerous than previously thought. State Environmental Secretary Jared Blumenfeld said it’s the first time the state has sought to ban a pesticide and the move was overdue.

“This pesticide is a neurotoxin and it was first put on the market in 1965,” Blumenfeld said. “So it’s been on the shelf a long time and it’s past its sell-by date.”

READ MORE: Safety concerns mount over neonicotinoid pesticides in unexpected places

The decision comes after regulators in several states have taken steps in recent years to restrict the pesticide currently used on about 60 different crops in California, including grapes, almonds and oranges.

Hawaii banned it last year and New York lawmakers recently sent a bill to the governor outlawing use of the pesticide.

DowDuPont, which produces the pesticide, said it was disappointed with the decision and that it would hurt farmers who rely on it to control insects.

Blumenfeld said the state took action in part because the federal government allowed the pesticide to be used after the Obama Administration tried to phase it out.

The U.S. Environmental Protection Agency under President Donald Trump reversed that effort after re-evaluating the science. Environmental groups and farmworkers challenged that decision and a federal appeals court last month ordered the EPA to decide by July whether to ban the pesticide.

The pesticide is in a class of organophosphates chemically similar to a nerve gas developed by Nazi Germany before World War II.

“This is a historic victory for California’s agricultural communities and for children nationwide,” said Miriam Rotkin-Ellman, of the Natural Resources Defense Council. “The science clearly shows that chlorpyrifos is too dangerous to use in our fields. Since California uses more chlorpyrifos than any other state, this ban will not only protect kids who live here, but kids who eat the fruits and veggies grown here.”

The pesticide is in a class of organophosphates chemically similar to a nerve gas developed by Nazi Germany before World War II. Its heavy use has often left traces in drinking water sources. A University of California at Berkeley study in 2012 found that 87% of umbilical-cord blood samples tested from newborn babies contained detectable levels of the pesticide.

Dr. Gina Solomon, a medical professor at the University of California, San Francisco, and former deputy secretary of Cal-EPA, said chlorpyrifos is unusual in that it’s one of the best understood pesticides because it’s been so extensively studied.

“We know a lot about what it does to developing children and that science is the bedrock of the action that Cal-EPA is announcing,” she said. “Many pesticides have been studied well in lab rats but in this case we actually know what it does to people.”

Studies in cities where the pesticide was once used to kill cockroaches before it was banned for indoor use in 2000 and in rural farmworker communities showed it harmed brain development in fetuses and affected reading ability, IQ and led to hyperactivity in children, Solomon said. Even head sizes were smaller in children whose mothers were exposed to the pesticide.

While the ban — technically known as a cancellation — could take up to two years to take effect, the state Department of Pesticide Regulation has recommended that county agriculture commissioners adopt stricter rules on where and how the chemical can be applied, including larger buffer zones.

Use of the pesticide has been reduced by more than half in California since 2005 to just under 1 million pounds (450,000 kilograms) used on crops in 2016, according to the state.

READ MORE: Jury decides Roundup weed killer was major factor in man’s cancer

To help farmers make the transition away from chlorpyrifos, the state is adding a $5.7 million to fund development of safer alternatives.

While most environmental groups applauded the announcement, Earthjustice said it would continue pushing legislation to ban the chemical because it questions whether the Department of Pesticide Regulation will follow through.

“It’s been like pulling teeth to force DPR to begin the cancellation process for chlorpyrifos,” said Greg Loarie, Earthjustice attorney. “Until we know that chlorpyrifos is gone for good, we are going to keep pushing as hard as we can in as many places as we can.”