A retail chain that allegedly sent hazardous waste to California landfills found itself in a court fight against scores of county officials — including San Diego County’s district attorney — as well as San Diego’s city attorney.

Dollar Tree Stores Inc. agreed to pay $2.72 million to settle an environmental protection lawsuit filed by 45 California district attorneys and two city attorneys, San Diego City Attorney Jan Goldsmith said in a statement issued April 24. Goldsmith and San Diego County District Attorney Bonnie Dumanis took part in the legal action.

Dollar Tree (Nasdaq: DLTR) operates 31 stores in San Diego County. Six are in San Diego city limits.

The business admitted no guilt in settling the complaint and agreeing to pay civil penalties and costs.

The complaint alleged that Dollar Tree illegally disposed of hazardous waste — including ignitable and corrosive liquids, toxic materials, batteries, electronics and other e-waste — at its retail stores and distribution centers by putting it in conventional trash bins. The waste was then transported to local landfills rather than authorized hazardous waste facilities.

The San Diego City Attorney’s Office played a leading role in investigating the case and, as a result, will receive $207,500 of the civil penalties and $54,500 to defray costs, Goldsmith’s office said.

Alameda County District Attorney Nancy O’Malley filed the complaint.

Virginia-based Dollar Tree has more than 480 facilities in California and more than 5,300 stores in the United States and Canada. It reported almost $600 million in net income on revenue of $8.6 billion during the fiscal year that ended Jan. 31. Over the last 52 weeks, Dollar Tree stock has ranged in price from $49.69 to $84.22. Shares closed April 27 at the high end of that range, at $80.42.

Goldsmith’s office said Dollar Tree has adopted new policies and improved procedures to properly manage and dispose of hazardous waste.