JPMorgan Chase says it has reached a settlement with federal authorities over charges it discriminated against minority home buyers by charging them higher rates.

Preet Bharara, U.S. attorney in the Southern District of New York, filed suit Wednesday alleging that the nation's largest bank charged higher mortgage rates and fees to more than 100,000 black and Hispanic home buyers between 2006 and 2009. The loans in question were originated by independent mortgage brokers who were not employed by the bank.

Related: Jamie Dimon is hopeful about Donald Trump

"In thousands of instances, an African-American borrower with the same credit and risk profile as a white borrower, entering into the same type of Chase...mortgage, paid higher loan rates and larger fees," the suit charges. It says that the same thing happened with Hispanic borrowers.

But JPMorgan Chase (JPM) says it did nothing wrong, and the rates were set by the mortgage brokers.

"We've agreed to settle these legacy allegations that relate to pricing set by independent brokers," said the bank's statement. "We deny any wrongdoing and remain committed to providing equal access to credit."

A person familiar with the settlement said JPMorgan Chase agreed to pay $55 million under terms of the deal.

A spokesperson for Bharara was not immediately available for comment.

Bharara has been asked to stay on in the Trump administration. JPMorgan Chase CEO Jamie Dimon is one of a group of top business executives tapped to advise Trump once he takes office.