The Trump administration suffered a significant defeat Thursday when a federal court ordered the government to ban a controversial pesticide linked to health problems in children, a move that the administration had previously rejected after successful lobbying from the manufacturer and agriculture industry.

The decision by the 9th Circuit Court of Appeals requires the Environmental Protection Agency to ban chlorpyrifos, a widely used pesticide sprayed on an array of crops including fruit, nuts, and vegetables. The court ruling, which the EPA has 60 days to implement, deals a blow to President Donald Trump's ongoing efforts to slash government regulation and prioritize business interests over other concerns about the environment and public safety.

Chlorpyrifos was first developed as a nerve gas during World War II and then approved as a pesticide in 1965. But the chemical has been shown to have negative health effects on humans, particularly children and pregnant women, said Marisa Ordonia, an attorney with advocacy group Earthjustice, which worked on the case. The pesticide has also been linked to health problems in farm workers.

"In the past dozen or so years there have been all of these studies showing that at very low doses there have been all of these effects to the developing brains of children," she added.

In large doses, chlorpyrifos can cause nausea, dizziness, confusion, and at very high exposures, can be potentially life-threatening. The Environmental Protection Agency has had a decades-long debate about the pesticide, restricting its use over the years but not banning it altogether. In 2001, it was banned from residential use.

Data from the US Geological Survey shows that in recent years, the use of chlorpyrifos was widespread across the entire United States. Corn growers are the largest users of the chemical, but it is also applied to soybeans, rice, apples, wheat, and a host of other foods.

The Obama administration proposed a ban on chlorpyrifos in 2015. But after Trump took office, his (now-ousted) EPA administrator Scott Pruitt rejected that plan and allowed growers to continue using the pesticide.

Pruitt's decision, which came after heavy lobbying by the chemical company DowDuPont and others in the agriculture industry, followed a pattern under Trump in which regulators have repeatedly looked to loosen or slash regulations in ways that would benefit private businesses — even at the expense of the broader public. Earlier this week, Trump ordered officials in California to prioritize the state's water for firefighting. Experts noted that such an order was not needed and was likely meant to benefit farmers who want more water for crops.

Trump has proposed dramatically expanding offshore oil drilling, despite health and safety-related objections from coastal states, and has reduced protected land in the West, which critics argue was done to benefit mining and ranching companies.

Thursday's ruling is the rare case in which such anti-regulatory efforts have been abruptly halted.

"There was no justification for the EPA’s decision in its 2017 order to maintain a tolerance for chlorpyrifos in the face of scientific evidence that its residue on food causes neurodevelopmental damage to children," the order states.

Damian Dovarganes / AP

A foreman watches workers pick fruit in an orchard in Arvin, California, in 2004.

Gregg Schmidt, a spokesperson for DowDuPont, said in a statement to BuzzFeed News that "chlorpyrifos is a critical pest management tool used by growers around the world to manage a large number of pests, and regulatory bodies in 79 countries have looked at the science, carefully evaluated the product and its significant benefits, and continued to approve its use."

The EPA could potentially appeal the ruling to the US Supreme Court, and Schmidt said that DowDuPont expects "that all appellate options to challenge" the decision will be considered.

The EPA told BuzzFeed News in an email that it was "reviewing the decision."

While chlorpyrifos is one of the most widely used pesticides on the market today, it was believed that it would be banned during the Obama administration. As a result, its use has been declining, and Ordonia, who praised the court ruling, said she does not expect significant disruption to agricultural operations.

"Finally the EPA is going to have to act to protect children and farm workers," she said.

The Natural Resources Defense Council, which has been pushing for a chlorpyrifos ban for years, called the ruling a "victory" and "long overdue."

"This is a victory for parents everywhere," NRDC senior director Erik Olson said in a statement, "who want to feed their kids fruits and veggies without fear it’s harming their brains or poisoning communities."

Jim Dalrymple is a reporter for BuzzFeed News and is based in Los Angeles.