Monterey County will share in a $16.57 million settlement the drugstore chain Walgreens was ordered to pay in a lawsuit claiming hundreds of its California stores illegally dumped hazardous waste and confidential medical information.

The settlement of the suit filed in June by prosecutors in 42 counties and two cities was announced Thursday by District Attorney Dean Flippo. He said hazardous waste violations were found at all five Walgreens stores in the county.

The suit came after inspections between May and December 2011 of trash bins at Walgreens stores around the state.

It accused stores of improperly handling various hazardous wastes, including pesticides, bleach, paint, aerosols and solvents.

The suit also alleged stores unlawfully disposed of customer records with confidential medical information. Such violations were found at Walgreens stores in Seaside and Marina, the District Attorney's Office said.

Walgreens didn't acknowledge any wrongdoing, and said it settled the suit to avoid protracted litigation, the Associated Press reported.

In a prepared statement, Flippo said, "Companies that create, maintain and dispose of medical information are required under (California law) to manage such information in a way that preserves its confidentiality. Simply using a shredder ... would go a long way."

Company stores are now handling hazardous waste and medical waste in proper fashion, Flippo said.