NEW YORK (TheStreet) --Former AIG (AIG) Chief Executive Hank Greenberg has won a landmark lawsuit against the U.S government, but he and his shareholders will not be offered any compensation.

Greenberg claimed that the government overstepped its authority by demanding AIG stock during the company's 2008 bailout. Federal Judge Thomas Wheeler concluded that "The government's unduly harsh treatment of AIG in comparison to other institutions seemingly was misguided and had no legitimate purpose."

But though the government may have over stepped its authority by demanding equity in AIG in return for aid, Wheeler said, shareholders were not legally entitled to any financial compensation as a result of that behavior. If the government hadn't intervened, he noted, AIG would have been left bankrupt and shareholders would have lost everything.

During the financial crisis the U.S. government provided the insurance giant with an $85 billion bailout loan in return for a 79.9% equity stake in the company and repayment at a 14.5% interest rate. The court decreed that the government's actions violated Section 13(3) of the Federal Reserve Act. The government countered with the claim that because the loan was high risk, its demands were reasonable. Following the bailout, AIG swung back into profitability, paying back the loan by 2012 and leaving the government with around $22.7 billion in profit from the AIG deal terms.

Despite many people dismissing Greenberg's case as farcical, the former CEO pushed ahead, demanding around $25 billion in compensation for shareholders.

The eight-week trial included testimony from financial heavyweights including Ben Bernanke and Hank Paulson. The outcome of the trial may affect how the government uses emergency powers during future bailouts or financial crises.

If you liked this article you might like

What's Behind the Hound of Hades' Stock Market Rampage

What's Behind the Hound of Hades' Stock Market Rampage

Dow, S&P 500 and Nasdaq Post New Records as Senate Reaches Deal to End Shutdown

Dow, S&P 500 and Nasdaq Post New Records as Senate Reaches Deal to End Shutdown

Closing Bell: LIVE MARKETS BLOG

Closing Bell: LIVE MARKETS BLOG

Dow, S&P 500 and Nasdaq Shake Off Government Shutdown to Trade Higher

Dow, S&P 500 and Nasdaq Shake Off Government Shutdown to Trade Higher

Investors Are Really Confident These Days: LIVE MARKETS BLOG

Investors Are Really Confident These Days: LIVE MARKETS BLOG