This story was originally published by The Blog of Legal Times, an American Lawyer affiliate.

Wells Fargo Bank agreed to pay at least $175 million to settle Justice Department charges that it discriminated against more than 34,000 qualified African American and Hispanic mortgage applicants, steering them into subprime loans or charging them higher fees.

It’s the second-biggest fair lending settlement ever reached by the government, and will result in compensation to borrowers who were victims of lending discrimination.

“An applicant’s creditworthiness, and not the color of his or her skin, should determine what loans a borrower qualifies for,” said Deputy Attorney General James Cole at a press conference today. “With today’s settlement, the federal government will ensure that African-American and Hispanic borrowers who were discriminated against will be entitled to compensation and borrowers in communities hit hard by this housing crisis will have an opportunity to access homeownership.”

Wells Fargo, which was represented by Bart Williams of Munger, Tolles & Olson, denied the charges, stating in a news release that the bank “is settling this matter solely for the purpose of avoiding contested litigation with the DOJ, and to instead devote its resources to continuing to provide fair credit services and choices to eligible consumers, and important and meaningful assistance to borrowers in distressed U.S. real estate markets.”

While the penalty against Well Fargo is hefty, it’s only a little more than half of the amount paid by Bank of America Corp. in December 2011, when it shelled out $335 million to resolve fair lending charges against its Countrywide Financial unit.

Since 2008, Wells Fargo has been the largest home mortgage originator in the United States, responsible for one in four new mortgages.

According to the DOJ complaint, which was filed today along with the settlement agreement in U.S. District Court for the District of Columbia, Wells Fargo between 2004 and 2008 discriminated by steering approximately 4,000 African-American and Hispanic wholesale borrowers into subprime loans. Non-Hispanic white borrowers with similar credit profiles were far more likely to receive prime loans. The subprime loans included adverse conditions like higher interest rates, excessive fees and pre-payment penalties.

Also, between 2004 and 2009, the complaint alleges that about 30,000 African American and Hispanic borrowers were charged higher fees than white applicants.

According to DOJ, Wells Fargo allowed its loan officers and mortgage brokers to “vary a loan’s interest rate and other fees from the price it set based on the borrower’s objective credit-related factors. This subjective and unguided pricing discretion resulted in African-American and Hispanic borrowers paying more.”

The case began in 2009, when both the Office of the Comptroller of the Currency and DOJ launched parallel investigations into Wells Fargo loans. The OCC referred the matter to DOJ in 2010.

Comptroller of the Currency Thomas Curry in a statement called the case “an example of interagency cooperation that represents government at its best–multiple agencies working together for the benefit of the citizens we serve.”

As part of the settlement, Wells Fargo also agreed to conduct an internal review of its retail mortgage lending and compensate African-American and Hispanic retail borrowers who were wrongly placed into subprime loans.

The settlement also resolves pending litigation filed in 2009 by the State of Illinois on behalf of borrowers there, and resolves an investigative complaint filed in 2010 by the Pennsylvania Human Relations Commission.

While not part of the DOJ settlement, Wells Fargo also announced today that as of July 13, it will “discontinue funding mortgages that are originated, priced and sold by independent mortgage brokers….Wells Fargo cannot set loan prices for independent mortgage brokers nor control the combined effect of the negotiations that thousands of these independent mortgage brokers conduct with their customers.”