Kmart Corp. has agreed to pay $32.3 million to settle a whistleblower lawsuit alleging its pharmacies overcharged federal health care programs and some private insurers for generic prescription drugs, federal officials announced Friday.

The big box department store chain, which is owned by Sears Holdings Corp., withheld certain information from Medicare Part D, Medicaid and Tricare, the health insurance provider for members of the military and their families, the Department of Justice said.

Shoppers wait for a Kmart to open on Thanksgiving night Nov. 22, 2012 in Griffith, Indiana. Tasos Katopodis / Getty Images file

"Pharmacies that are not fully transparent about drug pricing can cause federal health programs to overpay for prescription drugs," Chad Readler, the acting assistant attorney general of the department's Civil Division, said in a statement. "This settlement should put pharmacies on notice that there will be consequences if they attempt to improperly increase payments from taxpayer-funded health programs by masking the true prices that they charge the general public for the same drugs."

Related: Want cheaper prescription drugs? You better shop around

The lawsuit stems from 2008 and was brought via the whistleblower provision in the False Claims Act, a federal law that makes it illegal for a person or organization to make a false filing in any federal health care program.

The complaint was filed on behalf of former Kmart pharmacist James Garbe. According to the suit, in one case, Kmart had sold a 30-day supply of a generic version of a prescription drug for $5 to customers of its discount program, but then filed for reimbursement from the government for $152 for that same drug for its Medicare customers.

Garbe will receive a whistleblower award of $9.3 million, which amounts to 29 percent of the federal government's recovery, his attorneys said. The case was heard in the U.S. District Court in the Southern District of Illinois.

"This was a hard-fought victory for our client and for taxpayers," said Larry Zoglin, an attorney at Washington, D.C.-based Phillips & Cohen, which represented Garbe. "It is wrong for a pharmacy to charge government healthcare programs more than it charges cash-paying customers for the same prescription."

Sears Holdings did not immediately respond to a request for comment Saturday.