The largest bank in the US, JPMorgan Chase, will pay 614 million dollars (£376 million) and improve mortgage lending procedures under a deal announced yesterday.
The agreement is to settle claims it approved thousands of unqualified home mortgage loans for government insurance and refinancing since 2002, costing the government millions of dollars when the loans defaulted.
US district judge J Paul Oetken in Manhattan approved the deal, which calls for JPMorgan to pay the money within a month.
The firm must also install an improved quality control programme to review loans it underwrites using a federally maintained software application that determines if a loan qualifies for government insurance.
JPMorgan said that its deal with prosecutors, the federal housing administration, the US department of housing and urban development and the US department of veterans affairs "represents another significant step in the firm's efforts to put historical mortgage-related issues behind it".
The New York-based company said it had already reserved the money for the settlement and any financial impact from exposure to future claims was not expected to be significant.
US Attorney Preet Bharara said the company had for years participated in state subsidised programmes meant to make homes more affordable for millions of Americans.
"Yet, for more than a decade, it abused that privilege," he said.
"JPMorgan Chase put profits ahead of responsibility by recklessly churning out thousands of defective mortgage loans, failing to inform the government of known problems with those loans and leaving the government to cover the losses when the loans defaulted."
The prosecutor acknowledged, however, that the company had accepted responsibility and promised to reform the flawed practices.
The government said the bank approved thousands of loans for government insurance or refinancing that did not meet the requirements of federal programmes and failed to self-report hundreds of loans it identified as having been affected by fraud or other deficiencies.
It also regularly submitted loan data that lacked integrity because it was not based on documents or other information it possessed when employees submitted the data, the government said.
Associate attorney general Tony West said the deal "recovers wrongfully claimed funds for vital government programmes that give millions of Americans the opportunity to own a home and sends a clear message that we will take appropriately aggressive action against financial institutions that knowingly engage in improper mortgage lending practices".
In November, JPMorgan agreed to pay 13 billion dollars (£8 billion) to settle a civil inquiry into its sales of low-quality mortgage-backed securities that collapsed in value in the 2008 financial crisis.
It also announced it had reached a 4.5 billion dollar (£2.7 billion) settlement with 21 major institutional investors over mortgage-backed securities issued by it and Bear Stearns between 2005 and 2008.
Last month, it agreed to pay more than 2.5 billion dollars (£1.53 billion) for ignoring obvious warning signs of Bernard Madoff's massive Ponzi scheme.
Madoff, who is serving a 150-year prison sentence after admitting the fraud, squandered nearly 20 billion dollars (£12.2 billion) from thousands of investors over several decades.
JPMorgan set aside 23 billion dollars (£14 billion) last year to cover the settlements and other costs related to its legal troubles.