Two AIG units settled federal charges that they discriminated against black home buyers on fees for mortgages and will pay $7.1 million for restitution and education efforts, the U.S. Justice Department said on Thursday.

The units, AIG Federal Savings Bank and Wilmington Finance Inc, will provide $6.1 million to about 2,500 borrowers in at least 19 major metropolitan cities who were affected by the alleged discrimination, according to the department.

This sort of practice is what I often call discrimination with a smile, because I would predict that many of the victims that we will contact will have no idea that they were victimized, said Thomas Perez, head of the Justice Department's civil rights division.

Blacks were charged fees by mortgage brokers that were on average one-fifth of a percentage point higher than whites for the mortgages, which were all subprime loans, Perez said. The victims will receive on average about $2,300 back.

He also said that there were some 45 lending discrimination cases pending.

The AIG subsidiaries will also provide at least $1 million to organizations that provide credit counseling, financial literacy and other educational programs that target blacks, according to the documents.

American International Group Inc , which received a $182.3 billion government bailout amid the 2008 financial crisis, said in a statement that it denied the government's allegations and that the two units did not condone discriminatory conduct.

We are pleased to have reached an agreement with the government to resolve the issues in the complaint, as well as to avoid the distractions and burdens of protracted litigation over contentious issues, the company said.

Government officials criticized lenders for not adequately monitoring loans for discrimination and warned that other cases were in the offing, such as cases involving discriminating against lending in some areas or charging higher rates there.

Today's settlement should serve as a warning shot, a warning shot to potential fraudsters and those who would discriminate against borrowers, said Robb Adkins, executive director of the government's Financial Fraud Enforcement Task Force.

The charges in the AIG case resulted from examinations in 2006 and 2007 by the Office of Thrift Supervision, which referred concerns about AIG's loan and mortgage broker practices to the Justice Department for enforcement action.

The subprime mortgages at issue date back to July 2003. In cities like Chicago; Memphis, Tennessee; New York, and Las Vegas, black borrowers were charged fees by mortgage brokers that were as much as three-quarters of a percentage point higher than white clients.

The companies, which have ended their wholesale home mortgage lending operations and do not plan to re-enter that line of business, also agreed to monitoring programs, the consent order said.

(Additional reporting by Paritosh Bansal in New York; Editing by Gerald E. McCormick and John Wallace)