The transactions came to light when scrutiny of questionable accounting had intensified after sweeping frauds emerged at Enron and WorldCom. They were highlighted when A.I.G. itself settled accounting fraud charges brought by the Securities and Exchange Commission in 2006. Mr. Greenberg and Mr. Smith paid a total of $16.5 million to settle S.E.C. failure-to-supervise charges for the same transactions.

Along the way, the state dropped several accusations in its original complaint, and in 2013 it shifted the remedy it sought from restitution and damages to forfeiture of past pay and a ban on the defendants’ working in the securities industry or as officers of any public company.

The remedy shift took place soon after Mr. Greenberg and Mr. Smith participated in a $115 million settlement of a class-action suit over the accounting brought by former A.I.G. shareholders, which threatened to pre-empt the state’s demand for restitution. But it became a crucial element in the latest defense appeal, which argues in part that without a valid remedy the state has no case.

Mr. Boies, who also represented IBM in the antitrust case, said this has been the second longest out of some 85 significant court cases he has litigated.

“The IBM case went on for even longer, but there you were talking about the future of the entire computer industry,” he said. Describing other long-running cases, he said his wife, Mary, had been involved in a 15-year price-fixing case involving the sale of drugs to retail pharmacies.

In the Greenberg accounting case, the first two defense appeals concerned two rulings by Justice Ramos, in 2006 and 2008, that narrowed or blocked access to A.I.G. legal documents. The defense won the first appeal but lost the second. In a statement, a spokeswoman for Mr. Boies said these disputes delayed the case for two and a half years.

The third defense appeal successfully nullified a 2010 order by Justice Ramos that granted summary judgment for the state on one of the transactions but failed to gain the summary judgment it sought to dismiss all claims. The fourth, in 2012, unsuccessfully sought a summary judgment by a higher appeals court.