WASHINGTON (AP) — The Supreme Court delivered a setback Monday to Montana homeowners who are seeking additional cleanup of arsenic left over from years of copper smelting.

The court said the homeowners cannot proceed with efforts to decontaminate their own property near the shuttered Anaconda smelter without the permission of the Environmental Protection Agency. But it did not order an end to the state court lawsuit that was under review.

The smelter, near the town of Opportunity, Montana, belongs to BP-owned Atlantic Richfield Co. and sits at the center of a 300-square-mile Superfund site. The company says it has spent $470 million to clean the site.

Homeowners who are dissatisfied with the EPA-ordered cleanup want Atlantic Richfield to pay for the removal of more arsenic-tainted soil from their properties. And the Montana Supreme Court ruled in 2017 that their claims could proceed in state court.

But Chief Justice John Roberts wrote for the high court that federal environmental law requires the homeowners to seek EPA approval for additional cleanup. “That approval process, if pursued, could ameliorate any conflict between the landowners’ restoration plan and EPA’s Superfund cleanup, just as Congress envisioned,” Roberts wrote.

Justice Neil Gorsuch wrote in a dissent that Justice Clarence Thomas joined that the court’s reading of the Superfund law “strips away ancient common law rights from innocent landowners and forces them to suffer toxic waste in their backyards, playgrounds, and farms. Respectfully, that is not what the law was written to do; that is what it was written to prevent.”

An EPA spokesperson said the agency is reviewing the decision. The EPA backed Atlantic Richfield in the Supreme Court, urging several ways in which the justices could rule against the homeowners.