WASHINGTON — It could be an awkward reunion.

Three top former government leaders who devised the 2008 financial bailouts – Henry Paulson, Timothy Geithner and Ben Bernanke – are set to testify this week in a lawsuit over the government’s rescue of the insurance giant AIG.

Six years ago, their rescue plan revived AIG, protected its far-flung financial partners and helped save the financial system. Yet AIG’s former CEO, 89-year-old Maurice Greenberg, argues that the government’s bailout was illegitimate and is demanding roughly $40 billion in damages for shareholders.

This despite the fact that Greenberg orchestrated a 2010 deal in which he unloaded $278 million in AIG shares that his holding company owned – a windfall that might have been impossible without the government’s intervention.

The lawsuit alleges that the bailout violated the Constitution’s Fifth Amendment by taking control of AIG without “just compensation.” Greenberg objects to the government’s takeover of a company approaching bankruptcy in exchange for what would eventually become $180 billion-plus in taxpayer-backed loans.

Many legal experts deem the lawsuit a long shot. But the trial serves as a reminder that few were satisfied by the government’s response to the crisis – even those who, like Greenberg, fared far better than the millions who lost homes and jobs.

For Greenberg, the case represents a chance to make the former Federal Reserve chairman (Bernanke) and two past Treasury secretaries (Paulson and Geithner) defend a landmark action made at the most perilous moment for the U.S. financial system since the Great Depression.

All three, of course, have well-honed and oft-repeated arguments in defense of the AIG bailout. Geithner released his memoirs this year, while Paulson appeared in a Netflix documentary film about his experiences last year. The tight-lipped Bernanke is now writing his own book.

During the height of the crisis, no private company was willing to provide loans to AIG. The insurer “faced severe liquidity pressures that threatened to force it imminently into bankruptcy,” Bernanke told the House Financial Services Committee in 2009.

An AIG collapse “would have posed unacceptable risks for the global financial system and for our economy,” Bernanke said. The viability of state and local governments, banks and 401(k) plans was at risk, he warned.

Greenberg’s lawyer, David Boies, is famed for fighting for gay marriage and arguing before the Supreme Court on behalf of Al Gore in the 2000 presidential election. But in congressional hearings and news conferences, the three witnesses he intends to grill before the U.S. Court of Federal Claims have learned to measure their words carefully.

The challenge is whether Boies can use the multitude of their past comments about AIG to trap them in an inconsistency, said Hester Peirce, a senior research fellow at George Mason University and former Senate Banking Committee staffer.

“They are in a pretty difficult position because they might have to contradict what they previously said,” Peirce said.

For Americans who yearn to see reckless bankers held accountable in court, it’s somewhat surreal to have a lawsuit based on the premise that the government’s rescue unfairly punished a company whose collapse would have threatened the global financial system.

How so? AIG was overexposed to subprime mortgages back in 2008. That’s because of a financial instrument known as a credit default swap. It obligated AIG to pay out if the mortgages defaulted.

Its stock and credit ratings had nosedived. The company largely built by Greenberg appeared to be free-falling into bankruptcy, possibly dragging down several major investment banks with it.

So the government provided an initial $85 billion loan – ultimately $182 billion – in return for an 80 percent stake in AIG.

That 80 percent stake angered Greenberg. He remained the company’s most vocal shareholder after being ousted as CEO and chairman in 2005 amid a New York state investigation into suspicious financial transactions under his watch. Greenberg contends that AIG shareholders were singled out for retribution, while the government chose to extend loans on far more generous terms to banks such as Citigroup.