NEW YORK — JPMorgan Chase said Wednesday that it had agreed to settle a federal lawsuit accusing the bank of working with mortgage brokers who discriminated against minority borrowers for years by charging them $1,000 more than white customers.

The case was settled for $55 million, according to a person familiar with the settlement who spoke on the condition of anonymity because the details are not yet public.

Between 2006 and 2009, JPMorgan charged at least 53,000 black and Hispanic borrowers more than white borrowers with the same credit and risk profiles, according to a lawsuit filed by U.S. Attorney Preet Bharara in Manhattan. Black borrowers were charged an average of about $1,126 more for a $191,100 mortgage loan, while Hispanic customers were charged about $968 more on an average loan of about $236,800.

These borrowers, the lawsuit alleged, collectively suffered “tens of millions of dollars in damages” in violation of the U.S. Fair Housing Act and the Equal Credit Opportunity Act.

In a statement, JPMorgan denied the allegations, saying: “We’ve agreed to settle these legacy allegations that relate to pricing set by independent brokers. We deny any wrongdoing and remain committed to providing equal access to credit.”

In its response filed in the U.S. District Court in Manhattan, the bank said it had a “robust monitoring program” and that it not responsible “for acts of independent, third party brokers.”

Bharara’s office declined to comment on the settlement, which has not been approved by a judge.

JPMorgan, the largest bank in the country by assets, is also one of the largest mortgage lenders. Through the third quarter of 2016, JPMorgan originated about $75 billion in mortgage loans, putting it second in the market to Wells Fargo, according to the trade publication Mortgage Daily.

For years, JPMorgan used a network of mortgage brokers throughout the country, according to the federal lawsuit. Those brokers were given leeway on what interest rates and fees they charged customers. When brokers secured higher interest rates, the lawsuit claims, they were rewarded with a bonus.

The bank did not require the mortgage brokers to explain why they were charging some customers more than others, according to the lawsuit. But JPMorgan should have known that minority borrowers were routinely being discriminated against through its “wholesale” lending program. (JPMorgan ended the program in 2009.)

JPMorgan’s pattern “of discrimination has been intentional and willful, and has been implemented with reckless disregard of the rights of African-American and Hispanic borrowers,” the lawsuit says.

U.S. officials have reached similar settlements with other large banks, including Wells Fargo, for mortgage practices dating to the housing boom and the financial crisis that followed. The Obama administration has also been working to complete several unrelated cases against large companies, including Volkswagen and the airbag manufacturer Takata, before President-elect Donald Trump takes office this week.

The settlement amount is small, especially for a bank as big as JPMorgan, said Carl Tobias, a professor at the University of Richmond School of Law. “JP Morgan and the U.S. government may have wanted to settle this matter before the new administration comes in because of uncertainty about what might happen,” he said. “One question is whether the case and the settlement will [deter] other instances of alleged mortgage discrimination.”

Also Wednesday, the Labor Department filed an administrative complaint against JPMorgan, accusing the bank of paying some female employees less than their male counterparts. Since at least May 15, 2012, JPMorgan discriminated against 93 female employees who held various technology-related positions, such as “Application Developer Lead II, Application Developer Lead V, Project Manager and Technology Directors,” according to the complaint.

The pay disparities, which were not detailed in the complaint, violate a 2012 executive order for government contractors, according to the Labor Department’s Office of Federal Contract Compliance Programs. JPMorgan was alerted to the problem in 2015, the complaint claims.

“The company continues to fall short of its obligations, compensating a group of female employees significantly less than their male counterparts and thereby failing to eliminate sex discrimination from its compensation process,” the complaint alleges.

In a statement, JPMorgan denied the allegations and said it was committed to corporate diversity. “We tried to work with the [Labor Department] regarding this matter and resolve any concerns,” the statement said. “We are disappointed that the OFCCP chose to file a complaint, but look forward to presenting our evidence to a neutral decision maker.”