A subsidiary of a major farm and ranch retail company agreed to pay over $5.1 million in civil penalties to resolve allegations of false advertising and selling pesticides without the proper licenses.

Tractor Supply West, LLC, which is owned by Tractor Supply Company, agreed to the stipulated judgement in Sonoma County Superior Court on Wednesday.

The company will pay the penalty to the counties of Sonoma, Santa Cruz, Sacramento, San Diego and San Bernardino, which all joined the suit.

The civil complaint alleged the company charged customers more than the lowest advertised price, sold pesticides without the necessary licenses from the Department of Pesticide Regulation, and mislabeled products as biodegradable.

The district attorneys brought the complaint under the state’s Unfair Competition law.

The Sonoma County District Attorney’s Office said in a statement that the company was cooperative with the investigation and stopped selling the pesticides until after it obtained the needed licenses.

Sonoma County District Attorney Carla Rodriguez said the state’s unfair competition law was designed to make sure businesses did not try to avoid costs that all businesses had to incur to protect public health and the environment.

“Businesses in California that fail to comply with all laws and regulations that have been enacted to protect consumers and the environment, cause injury to our citizens and our environment and also unfairly compete with businesses that incur the costs to comply with these laws,” she said.

A statement from Santa Cruz County District Attorney Jeff Rosell similarly said the state’s laws around environmental labeling are meant to protect consumers by giving them accurate information.

The complaint alleged the practice of mislabeling products as environmentally friendly was a type of “greenwashing” that gives consumers wrong information about what they were buying.

Tractor Supply West, LLC’s parent company Tractor Supply Company operates over 2,400 stores in 49 states that sell “rural lifestyle products” to “recreational farmers, ranchers, homeowners, gardeners, pet enthusiasts,” according to its website.

The Tennessee-based company offers a range of products from animal care to industrial-type property management equipment but does not sell tractors. It says on its website it helps “customers find everything they need to maintain their farms, ranches, homes and animals.”