Six Montgomery County lawn care companies and a D.C. trade association have gone to court to challenge the county’s ban of cosmetic pesticides on private lawns.

They allege that the county overstepped its authority because the state and Environmental Protection Agency already test, regulate and license pesticides.

The Montgomery County Council voted 6 to 3 in October 2015 to bar the chemicals, effective in 2018. The legislation had strong support from residents who contended that state and federal regulators have failed to protect them from cancer-causing toxins in some lawn-care products. It made Montgomery the nation’s first major locality to impose such a ban.

The measure exempts agricultural land, gardens golf courses and athletic playing fields.

The lawsuit, filed Monday in Montgomery County Circuit Court, noted that the Maryland Attorney General’s Office advised the council that the ban is probably preempted by state law.

Council member George L. Leventhal (D-At Large), who sponsored the bill, said members were advised by their counsel that they were acting within their power.

“We had this discussion and proceeded with the legislation because we believe we are not preempted,” Leventhal said.

Seven county residents joined the lawsuit as plaintiffs. Among the companies in the lawsuit are Complete Lawn Care of Laytonsville, Integrated Plant Care of Rockville and Newsom Seed of Gaithersburg.

The trade association, RISE (Responsible Industry for a Sound Environment), represents the pesticide industry.