Judge Thomas Wheeler of the Court of Federal Claims in Washington, D.C. on Monday sided with Greenberg on a key legal claim, but refused Starr International's request for up to $50 billion in damages on behalf of Starr and about 270,000 other shareholders.

Starr, which was AIG's largest shareholder at the time of the bailout with a 12 percent stake, said in a statement it will ask an appeals court to "confirm that the government is not entitled to keep billions of dollars of citizens' money in its pocket."

Greenberg sued the U.S. government in 2011 arguing federal officials acted illegally in the initial $85 billion loan package to the stricken company, which included an interest rate of 14 percent and taking a nearly 80 percent stake.

But Judge Wheeler wrote in his decision that no compensation was owed as without the government's intervention, AIG would have filed for bankruptcy.

Greenberg, who was ousted from AIG in 2005 after almost four decades at the helm, is due shortly to face trial in a separate lawsuit brought against him by New York state, which accuses him and Howard Smith, a former AIG financial officer, of accounting fraud at AIG from 2000 to 2005.

(Reporting by Lindsay Dunsmuir; Editing by Alan Crosby)