The electric carmaker agreed to pay $1.5M to settle a case brought against it by California prosecutors, who say that the company improperly stored and discarded hazardous waste during manufacturing, this week.

The district attorneys from 25 counties around the state, including eight Bay Area ones — Alameda, Contra Costa, Marin, San Francisco, San Mateo, Santa Clara, Solano, and Sonoma — jointly filed the lawsuit Tuesday in San Joaquin County Superior Court, per the Chronicle. The lawsuit claimed that Tesla violated many state regulations about the proper storage, disposal and management of hazardous waste.

The suit singled out Tesla’s Fremont factory for generating hazardous painting byproducts, using contaminated materials, and potentially toxic spatter from welding car panels, as Silicon Valley News reported. It also alleged that dozens of Tesla service centers in Bay Area cities including San Jose, Gilroy, Santa Clara, Sunnyvale, Palo Alto, Berkeley, Dublin, Fremont, Burlingame, San Francisco and San Rafael, produced toxic waste.

This lawsuit was the result of years of investigations into Tesla’s waste management, according to the Chronicle. The San Francisco District Attorney’s Office’s Environmental Division apparently started looking into it in 2018 and conducted undercover inspections of  trash containers at Tesla car service centers.

Tesla pretty quickly agreed to settle, SF DA Brooke Jenkins said in a statement released Thursday. Jenkins said that Tesla agreed to proactively screen waste for hazardous material before disposal, adequately train employees on hazardous waste management, and enlist a third-party entity for annual compliance audits over the next five years. It also will pay $1.3 million in civil penalties, along with an additional $200,000 to cover investigation costs.

Meanwhile, Tesla is still fighting lawsuits about the alleged racism and sexual harassment within the company.

Feature image via Unsplash/Paul Steuber.