Bank of America agreed to two settlements this week in connection with the home mortgage meltdown and Bank of America’s ill-fated acquisition of now-defunct mortgage lender Countrywide. In doing so, the bank took substantial, if costly, steps to shed itself of the Countrywide albatross.

The first settlement, between Bank of America and Fannie Mae, is valued at $11.6 billion and seeks to resolve claims resulting from mortgage-backed derivative investments. The value of these investments precipitously fell as some borrowers were unable to repay home loans, while others with “underwater” mortgages – in which the outstanding balance on mortgages exceeded appraised home values – simply opted to stop making regular payments. Under the terms of the settlement, Bank of America has agreed to repurchase some of the $6.75 billion in loans that Countrywide had sold to Fannie Mae, and also make a direct cash payment of $3.6 billion in cash to Fannie Mae. An additional $1.3 billion will be paid as effectively a punitive assessment for Bank of America’s delayed response to foreclosures.

The second settlement arises from a suit brought by the federal government against Bank of America and a host of other mortgage lenders. This settlement is valued at $8.5 billion and is intended to benefit individual consumers. While substantial, the settlement is only expected to yield payments to about ten percent of the 4 million consumers who were subject to foreclosure.

Bank of America’s common stock declined in value by only 8 cents per share in trading following the announcement of the more than $20 billion in settlements, suggesting that the prospect of settlements of this magnitude was already largely reflected in the share price.

Bank of America’s Countrywide acquisition was inauspiciously finalized in the summer of 2008, just weeks before the demise of Lehman Brothers set off the events underlying the “Great Recession.” Countrywide was not Bank of America’s only problematic acquisition, as last fall, Bank of America agreed to pay $2.43 billion to settle a class action related to its similarly troubled $20 million Merrill Lynch acquisition.