Bank of America has signed an agreement with the US government enterprise Fannie Mae to pay $11.6bn (£7.2bn) for the settlement of mortgage claims.
The $11.6bn fine includes a $10.3bn to settle claims relating to the loans and $1.3bn to resolve loan servicing compensatory fee obligations.
Fannie Mae, which provides mortgage credit in the US, alleged that Bank of America was responsible for the losses it incurred.
In addition, 10 mortgage providers have agreed to pay $8.5bn compensation for irregularities in repossessing homes. The banks including Bank of America, Citigroup, JP Morgan and Wells Fargo will pay $3.3bn directly to homeowners and $5.2bn for loan assistance and write-offs.
As part of the deal, Bank of America will pay $3.55bn to Fannie Mae and will repurchase about 30,000 loans by paying approximately $6.75bn, subject to certain adjustments.
Fannie Mae and Freddie Mac lost more than $30bn by investing in the subprime mortgages. However, the US agencies were provided with financial bail out by the US government.
Bill Brown from Duke University, law professor and expert in financial services, told the BBC's World Service that this latest settlement with Fannie Mae was drawing a line under the whole subprime mortgage-backed securities saga.
“About a year or two ago there were many people worried that this line would not even start to be drawn. Right now we're 90 per cent of the way to finishing the line,” Brown said.
“A favourable resolution of this long-standing dispute between Fannie Mae and Bank of America is in the best interest of taxpayers,” said Bradley Lerman at Fannie Mae.
Lerman added that the loans "did not meet our standards at the time of origination, and we are pleased to have reached an appropriate agreement to collect on these repurchase requests."
The bank, in a statement, said that the settlements were “a significant step in resolving our remaining legacy mortgage issues”.
In October 2012, the US government sued JP Morgan and Wells Fargo for mortgage fraud.