Former Federal Reserve Chairman Ben Bernanke took the stand on Thursday to defend the U.S. government’s bailout of American International Group in 2008, in a fourth day of testimony by former top government officials looking to convince a federal judge that the rescue of the insurance company was legal.

On Thursday afternoon Bernanke responded with a terse “yes, sir,” to multiple questions about the extreme conditions in the fall of 2008 that led to an initial $85 billion bailout loan for AIG, including a run on money market funds and a commercial paper market that was in shock.

Former AIG Chief Executive Hank Greenberg, who was also the company’s largest shareholder, sued the government in 2011 over the terms of the bailout’s loan, which included an interest rate of at least 12 percent and a nearly 80 percent stake in the company. The terms amounted to an illegal taking of the company from AIG shareholders, Greenberg charged.

To make their case, Greenberg’s lawyers have pushed officials to confirm that the situation was so dire that the government would have moved to save AIG even if the company had refused the initial offer.

When asked on Thursday by Greenberg’s lawyer, David Boies, if officials had concluded that AIG’s collapse could have catastrophic consequences for the broader financial system, Bernanke responded: “We were very concerned about that possibility, yes.”

Bernanke also testified that he did not know at the time the loan terms were drafted what the exact basis was for the interest rate or other fees added to the loan were.

His testimony is expected to continue later on Thursday.

Earlier on Thursday, former U.S. Treasury Secretary Timothy Geithner wrapped up two and one-half days on the stand, sparring with Boies over whether the loan posed substantial risks to the government.

Boies has sought to portray the New York Federal Reserve bank, which Geithner led at the time, as making AIG a low-risk loan with undeservedly high terms.

Just before wrapping up his questioning of Geithner, Boies asked him about his impression of Greenberg, who had argued that AIG’s insurance businesses were highly valuable and said that he had been refused a seat at the table during the AIG bailout negotiations.

“I found his confidence and optimism, uh, unique,” Geithner said.

AIG finished repaying the full $182.3 billion bailout in December 2012, leaving taxpayers with a nearly $23 billion profit.

The lawsuit, which is being tried in the Court of Federal Claims in Washington, won class action status in May 2013.

The case is Starr International Co v. U.S., U.S. Court of Federal Claims, No. 11-00779 (Reporting by Aruna Viswanatha; Editing by Steve Orlofsky)