SANTA CRUZ, Calif. -

The corporate parent of O'Reilly Auto Parts has agreed to pay more than $1.5 million in penalties, restitution and costs to settle claims they were overcharging customers.

A joint complaint was filed by district attorneys in San Bernardino, Santa Clara and Santa Cruz counties and the San Diego City Attorney’s Office.

Prosecutors claimed that in many instances, the company was not applying sale prices and discounts at checkout. The suit also accused the company of failing to comply with the terms of another overcharging case against it six years ago.

"Pricing accuracy is expected by consumers, in fact it’s the law,” said Santa Clara County Deputy District Attorney Tiyen Lin said. “And it’s good for business.”

The settlement follows a three-year investigation by Weights and Measures departments in several counties, including Santa Clara County, into alleged pricing violations.

CSK AUTO, a Delaware corporation that operates automotive parts stores -- including more than 480 O’Reilly Auto Parts stores in California -- cooperated with the investigation. Inspectors reported hundreds of violations, including overcharges for anti-freeze and motor oil.

Under the terms of the settlement, O’Reilly has agreed to maintain a “$5 Off or Get It Free” Program to protect consumers against overcharges. Any customer who discovers an overcharge can obtain $5 off the price of the item; or, if the item price is less than $5, O’Reilly has agreed to give the item to the customer for free. O’Reilly has also agreed to post a large sign in each California store notifying consumers of the program. The settlement does not include any admission of wrongdoing.