FILE PHOTO: The logo of Home Depot is seen in Encinitas, California April 4, 2016. REUTERS/Mike Blake/File Photo

(Reuters) - Home Depot Inc agreed to pay $27.84 million to settle charges by California’s attorney general that it illegally disposed of hazardous waste in that state and threw out customer records without first rendering personal information unreadable.

The attorney general, Xavier Becerra, on Thursday said the largest U.S. home improvement retailer will pay $16.64 million in civil penalties, $9.35 million toward environmental protection and compliance, and $1.85 million to cover costs.

California said Home Depot stores and facilities failed to properly manage the disposal of aerosol cans, batteries, electronics, paint and other items, as well as customer information.

It said this gave Home Depot an unfair advantage over rivals that complied with state hazardous waste control and unfair competition laws.

Becerra said the accord followed 2-1/2 years of inspections of Home Depot trash dumpsters, which uncovered the violations.

Home Depot also agreed to a permanent injunction against similar violations. The $27.84 million payment represents a little over one day of profit for the Atlanta-based retailer.

“We’re pleased to have settled this and we remain committed to the responsible disposal of waste,” Home Depot said in a statement. “We’ll continue to work with California officials to that end.”