The Second Circuit Court of Appeals ruled in favor of American International Group, holding that the insurer’s $10 billion suit against Bank of America over mortgage losses belongs in state court, not federal court. 

The appeals court threw out a lower court order denying AIG’s bid to move the case to a New York state court, according to the lawsuit.

AIG’s lawsuit was filed in August 2011, but has been on hold due to jurisdictional disputes.

AIG (AIG) accused Bank of America’s (BAC) Countrywide and Merrill Lynch units of allegedly making fraudulent misrepresentations in connection with $28 billion of residential mortgage-backed securities in 349 trusts bought by AIG, which caused large losses. 

The appeal involved interpreting the Edge Act, a 1919 law adopted to support foreign trade, which lets federal courts hear civil lawsuits against companies over banking transactions that are international or in a U.S. territory.

AIG claimed that of the 1.7 mortgages underlying the trust, only 27 involved property in U.S. territories, according to the case.

As a result, the company believes that wasn’t enough to make federal jurisdiction appropriate.

Writing for the appeal courts, Circuit Judge Pierre Leval believes that although the statute was ungrammatical, Bank of America’s interpretation "not only violates grammatical rules, but also would result in an arbitrary and illogical meaning."