Washington (CNN) A federal court on Thursday ordered the Environmental Protection Agency to ban a pesticide used widely in farming.

The 2-1 ruling on a lawsuit brought by public health groups and state attorneys general ordered the agency "to revoke all tolerances and cancel all registrations for chlorpyrifos within 60 days."

Concerns that the insecticide can harm the brain and nervous system led to the EPA banning the household use of chlorpyrifos in 2000. But the agency had allowed the chemical to continue to be used in commercial agriculture, where, some scientists say, it can be used in safe quantities.

"EPA is reviewing the decision," spokesman Michael Abboud said in a statement on Thursday. He wrote that the data behind a Columbia University scientific study considered by the Obama administration and the court during their reviews of the pesticide "remains inaccessible" to the agency.

The EPA and the courts have considered an outright ban on the chemical since 2007, when public health groups petitioned the agency, and in August 2015, the 9th US Circuit Court of Appeals ordered the EPA to make a decision.

Read More