A judge has ruled that Montgomery County, Maryland, can’t ban the use of pesticides on lawns after all. The law, passed by the county council in 2015, was to take effect in 2018, but was challenged by a lawsuit filed by a group of homeowners and pesticide companies. The ruling deals a major setback to environmental advocates, who contend that the pesticides are too dangerous for humans to be exposed to.

The pesticides in question contain chemicals that some studies say may cause cancer, yet have been deemed safe for use by the federal government. The law exempted agricultural land, gardens and golf courses, and did not prohibit the sale of the pesticides within the county’s boundary lines.

Montgomery County Circuit Court Judge Terrence McGann said that the law would conflict with federal and Maryland state regulations that allow the pesticides’ use. He went on to say that the case was just one example of Maryland counties’ “insatiable appetite to tamper with existing state laws.” The ban had been the first of its kind for a major locality in the region.

He compared it to other instances where counties in the state have also “tried to hijack a portion of the existing field of law” regarding tobacco, guns and the minimum wage. The bill’s chief sponsor, council member George Leventhal, said he was “very disappointed” by the ruling. He added that it “sets a worrisome precedent for the ability of local governments to protect their residents on vital issues of health and safety.”

Among the plaintiffs in the case was the Scotts Company, a major manufacturer of lawn-care products. Timothy Maloney, an attorney for the plaintiffs, called the ruling a “significant victory for consumer safety.”

Maloney contended that if the ban had been upheld, it would have set a legal precedent for all 187 jurisdictions in Maryland to create their own regulatory systems for pesticides. This would have resulted in “total chaos and confusion in the marketplace.”