The trial in Ambac Financial Group Inc's $2.7 billion case against Bank of America is expected to begin in New York state court on Wednesday, 12 years after the bond insurer sued over troubled mortgage-backed securities issued before the 2008 financial crisis.Starting in 2004, Ambac insured securities backed by 375,000 home loans from the bank's Countrywide unit. The insurer claims 80% of the loans were the product of poor underwriting standards or had other deficiencies that violated insurance agreements, and that Bank of America failed to repurchase the loans as required.

Ambac seeks $2.7 billion in damages and interest for what it paid investors under the policies. New York Supreme Court Justice Robert Reed will oversee the trial, which is expected to last multiple weeks.

Bank of America has said in court filings that Ambac accepted the risks of insuring the mortgage bonds to reap multi-million dollar premiums. The bank also argues that Ambac's losses are not due to loan underwriting but the decline in home prices after the 2008 financial crisis.

The bank also said in filings that Ambac cannot rely on statistical sampling and must prove it breached the agreements on a loan-by-loan basis.

At its peak, Ambac was the second-largest bond insurer in the world, having guaranteed the timely payment of interest and principal on more than $550 billion of debt.

The case is the largest of several lawsuits Ambac has pursued against issuers of residential mortgage-backed securities. The company filed for bankruptcy in 2010, after the housing market crashed, and emerged in 2013.

Bank of America spent years cleaning up the mess from the 2008 crisis. It repaid a $45 billion bailout by taxpayers and was slapped with more than $76 billion in fines in the decade after the housing crash.