Several Bay Area counties will receive millions of dollars in a lawsuit against the Walgreens drugstore corporation for allegedly selling expired items and charging customers more than listed prices.

The counties of Contra Costa, Santa Cruz, Alameda, Santa Clara and San Mateo were among nine counties in the state that brought the lawsuit.

Without admitting wrongdoing, Walgreens agreed to pay $6 million that will be divided among the counties.

“California law provides protections for consumers to ensure that the price they pay at the register is not greater than the advertised price, and to protect from being sold expired products,” San Mateo County District Attorney Stephen Wagstaffe said in a statement.

“Customers should have confidence that companies that sell food and formula to infants and children are doing so by being scrupulous about the safety of the products in their stores.” Diana Becton, Contra Costa County District Attorney

The suit accused Walgreens of charging customers more than the lowest advertised prices of items. The corporation also allegedly sold expired items such as infant formula, baby food, aspirin, sunscreen, hand sanitizer, and other over-the-counter products.

“Customers should have confidence that companies that sell food and formula to infants and children are doing so by being scrupulous about the safety of the products in their stores,” Contra Costa County District Attorney Diana Becton said in a statement. “The same goes for medications that are sold beyond their expiration dates.”

Each county will get around $600,000 of the civil settlement in addition to several thousand dollars to cover litigation costs.

The judgment also requires Walgreens to implement a program to avoid future violations.

“I am pleased with the outcome of this consumer action as this corporation was held appropriately accountable for its continued violation of consumer protection laws,” Santa Cruz County District Attorney Jeffrey Rosell said in a statement.

Alise is a general assignment reporter with a focus on covering government, elections, housing, crime, courts and entertainment in San Francisco and on the Peninsula. Alise is a Bay Area native from San Carlos. She studied history at University of California, Santa Cruz and first started journalism at Skyline College’s school newspaper in San Bruno. She has interned for Bay City News and for Eesti Rahvusringhääling, or Estonian Public Broadcasting. She has covered everything from the removal of former San Mateo County Sheriff Christina Corpus to the divisive battle over the Great Highway on San Francisco’s west side. Please send her any tips.