(Bloomberg) -- Bank of America Corp. agreed to pay $1.84 billion to settle claims by bond insurer Ambac Financial Group regarding residential mortgage-backed securities, clearing away the bank’s last major legal hangover stemming from the 2008 financial crisis.

The settlement will result in a pretax expense of about $354 million for the third quarter, Charlotte, North Carolina-based Bank of America said in a regulatory filing Friday. The expense translates into about 3 cents a share, according to the filing. The firm previously set aside money to cover the rest of the amount. 

Ambac had been seeking to recover billions of dollars in claims it paid out on bonds originally underwritten by Countrywide Financial, which Bank of America acquired after the mortgage firm’s collapse during the financial crisis. BofA has already paid more than $50 billion to resolve regulatory probes and litigation stemming from its $4 billion purchase of Countrywide. 

A trial was underway before Manhattan Supreme Court Justice Robert Reed and was expected to last months. The eventual final payment from Bank of America will resolve all legal matters, according to the filing.

Shares of Bank of America dropped 1.8% to $30.88 at 9:40 a.m. in New York. Ambac, which said it expects a gain of about $390 million from the settlement, surged 10%, the most in almost two months, to $14.08.

The bond insurer had claimed Countrywide violated contracts governing nearly two dozen securitizations of home loans between 2004 and 2006 by flouting underwriting guidelines and passing on risks to the insurer. 

Ambac also alleged that Countrywide’s leadership, including Chief Executive Officer Angelo Mozilo, knew the majority of its mortgages were questionable but pushed employees to approve them as part of a goal to originate one out of every three home loans in the US. 

Payment Risk

Lawyers for Countrywide said that Ambac performed its own risk analysis when it agreed to insure the bonds and should have known the “securitizations had significant payment risks.”

A representative for Bank of America declined to comment on the settlement. Ambac Chief Executive Officer Claude LeBlanc said in a statement that the New York-based company “is very pleased to have reached this settlement.”

The agreement is the latest in a string of penalties Bank of America has paid this year. Last month, a probe by US regulators into the use of unauthorized messaging apps resulted in a $225 million hit for Bank of America, the largest fine among the banks. The firm was also fined $225 million in another probe by regulators for unfair and deceptive practices related to a prepaid card program to distribute unemployment insurance and other public-benefit payments during the pandemic.

(Updates with share prices in fifth paragraph.)

©2022 Bloomberg L.P.