Bank of America has agreed to pay a record $US16.7 billion to United States authorities for misleading investors about the quality of loans it sold.
The loans were sold by Countrywide Financial and Merrill Lynch before Bank of America bought them in 2008, at the height of the financial crisis.
The associate attorney general said "no institution is either too big or too powerful to escape" punishment.
The settlement will cut the bank's third-quarter profits by $5.3 billion.
Bank of America will pay a total of $9.65 billion in cash and provide consumer relief worth about $7 billion, much of which will go towards homeowners struggling with their mortgages.
The cash component consists of a $5 billion civil penalty and $4.63 billion in compensation payments.
The case centred on Countrywide Financial, the biggest lender at the time of the crisis, and Merrill Lynch selling mortgage loans to investors but not explaining the full extent of the risk involved.
Tony West, the associate attorney general, explained: "It's kind of like going to your neighbourhood grocery store to buy milk advertised as fresh, only to discover that store employees knew the milk you were buying had been left out on the loading dock, unrefrigerated, the entire day before, yet they never told you.
"And just like you might be in for an unpleasant surprise when you got home and poured yourself that glass of milk, investors - such as public pension funds and federally-insured financial institutions - were unpleasantly met with billions of dollars in losses when those securities investments soured."
Brian Moynihan, chief executive of the bank, said: "We believe this settlement, which resolves significant remaining mortgage-related exposures, is in the best interests of our shareholders, and allows us to continue to focus on the future."
On Wall Street, shares in Bank of America opened 1.5% higher following the settlement.
The Bank of America fine is the latest in a line of penalties imposed by the US on banks since the 2008 financial crisis.
In March this year Bank of America agreed to pay $9.5 billion to settle charges that it misled US mortgage lenders Fannie Mae and Freddie Mac over mortgage securities.