Ambac Assurance Corp sued Bank of America Corp to recoup hundreds of millions of dollars of losses from insuring roughly $1.68 billion of securities backed at least in part by risky mortgages from the bank’s Countrywide Home Loans unit.

In a complaint filed on Tuesday in a New York state court in Manhattan, Ambac accused Countrywide of lying about how well it underwrote so-called “pay option adjustable-rate mortgage negative amortization” loans that backed the securities.

The securities were issued in eight transactions between 2005 and 2007, Ambac said.

Ambac said it faced potential claims exceeding $600 million as of Oct. 31, and that pools of loans supporting its insured certificates had suffered $3.07 billion of losses by Nov. 30. It also said it would have never guaranteed payments had it known of Countrywide’s deception.

“Countrywide’s fraud is borne out by the transactions’ dismal performance,” said Ambac, which in September 2010 had filed a similar lawsuit against Bank of America. The second-largest U.S. bank acquired Countrywide in July 2008.

“We have resolved our significant legacy mortgage-related exposures, and we will analyze and address these most recent assertions by Ambac,” Bank of America spokesman Lawrence Grayson said on Wednesday.

Ambac Assurance is part of Ambac Financial Group Inc .

The lawsuit shows how Charlotte, North Carolina-based Bank of America might still face legal liability over shoddy mortgage practices predating the 2008 financial crisis, even after agreeing in August with federal and state authorities to pay a record $16.65 billion penalty to settle civil fraud charges.

Chief Executive Brian Moynihan said at a Nov. 12 conference that the bank’s major regulatory and litigation costs tied to the financial crisis, including the purchases of Countrywide and Merrill Lynch & Co, were “largely behind us.”

Ambac filed for Chapter 11 bankruptcy protection in November 2010 and emerged from bankruptcy 2-1/2 years later.

On Dec. 23, the New York-based company said Co-Chairman Nader Tavakoli would become interim chief executive officer on Jan. 1. He will replace Diana Adams, who is resigning “by mutual agreement” with the board after 3-1/2 years as CEO, Ambac said.

The case is Ambac Assurance Corp et al v. Countrywide Home Loans Inc et al, New York State Supreme Court, New York County, No. 653979/2014.