U.S. Federal Reserve Chairman Ben Bernanke leaves his office for the last time before his retirement, at the U.S. Federal Reserve in Washington, Jan. 31 2014. Bernanke is testifying in Washington this week in the AIG bailout trial. Reuters

Former U.S. Federal Reserve Chairman Ben Bernanke said American International Group Inc. was on the brink of failure when the federal government approved a $85 billion rescue loan at the height of the 2008 financial crisis. Bernanke said during court testimony Friday that at the time he wasn't passing judgment on whether the insurance giant had been mismanaged or not.

Bernanke's remarks came during his second day of testimony in a federal trial to determine whether the U.S. illegally imposed fees and other allegedly damaging terms during the bailout of AIG. Maurice “Hank” Greenberg, former chief executive of AIG, is seeking at least $25 billion in damages in the case. He claims the government illegally demanded an initial 79.9 percent equity stake and combined 14 percent interest rate in return for its bailout loan in September 2008. The class-action lawsuit is being heard without a jury by U.S. Court of Federal Claims Judge Thomas Wheeler, according to Bloomberg.

"I did not make any personal judgments at the time about the quality of management at AIG, but I did know of course that AIG was having difficulty making contractual payments,” Bernanke said during questioning in the trial at the U.S. Court of Federal Claims in Washington. “The company was on the brink of failure.”

Bernanke's statement differs from earlier testimony from former Treasury Secretary Timothy Geithner, who wrote during the bailout that the government forced losses on AIG shareholders proportional to mistakes of the company.

Emails submitted as evidence earlier this week showed Bernanke used the alias Edward Quince “to make sure he didn’t get extraneous emails,” according to testimony by Fed general counsel Scott Alvarez.

Bernanke resigned in January as chairman of the Federal Reserve. He was succeeded by Janet L. Yellen.