WASHINGTON (Reuters) - The U.S. Supreme Court on Monday handed a defeat to former American International Group Inc AIG.N CEO Maurice "Hank" Greenberg, refusing to hear an appeal he led arguing that the federal government illegally bailed out the insurer during the 2008 financial crisis at the expense of shareholders.

FILE PHOTO - Maurice "Hank" Greenberg, former chairman of American International Group Inc., (AIG) arrives at the New York State Supreme Courthouse in Manhattan, New York City, U.S., September 29, 2016. REUTERS/Brendan McDermid

The justices left in place a 2017 ruling by a federal appeals court in Washington that Greenberg’s Starr International Co had no legal right to challenge the bailout because that right belonged to AIG, which chose not to sue.

Greenberg, 92, led AIG for nearly four decades before being ousted in March 2005. The New York-based insurance powerhouse was rescued by the U.S. government in September 2008 to stave off bankruptcy after the company ran up huge losses from insurance on shoddy mortgage securities.

Starr’s attorney David Boies expressed disappointment in the Supreme Court’s action.

“Starr established that the disproportionate and unfair treatment of AIG’s shareholders in 2008 was not authorized by the applicable statutes and that the government had exceeded its authority by taking control of AIG and using it to bail out other financial institutions, which were found to have engaged in more risky practices,” Boies said in a statement.

Starr, an insurance and investment business that had been one of AIG’s largest shareholders, sued in 2011 on behalf of itself and other shareholders alleging the government illegally took a 79.9 percent stake in the company in exchange for a $85 billion loan from the Federal Reserve Bank of New York.

The shareholders’ rights were diminished in violation of the U.S. Constitution’s guarantee of due process under the law, Starr claimed, seeking more than $40 billion in damages.

A lower court ruled in Starr’s favor, but declined to award damages since the shareholders’ stock would have been worthless without the government loan. The bailout actually helped the plaintiff, that court said.

The U.S. Court of Appeals for the Federal Circuit threw out that ruling, finding that only AIG, and not Starr as a shareholder, had legal standing to bring claims that the bailout was unlawful. AIG’s board of directors decided not to file such a suit.

AIG’s bailout eventually totaled $182.3 billion but was repaid, leaving taxpayers with nearly $23 billion in profit.

Starr appealed to the Supreme Court. President Donald Trump’s administration urged the justices not to take up the appeal.