The U.S. government has asked a court to dismiss a lawsuit relating to its 2008 takeover of American International Group that was filed by a company run by former AIG Chief Executive Maurice Greenberg, court documents showed.

In November, Greenberg's company, Starr International Co, sued the U.S. government for $25 billion, calling the 2008 federal takeover of the insurer unconstitutional.

Starr sued the government in the U.S. Court of Federal Claims in Washington, D.C., which handles lawsuits seeking money from the government. It brought that lawsuit on behalf of itself and other AIG shareholders.

The lawsuit marks an unusual effort to force the government to pay shareholders, who have seen AIG's stock price tumble since the middle of 2007, when the insurer's risky bets on mortgage debt through credit default swaps began to falter.

Greenberg had led AIG for nearly four decades prior to his 2005 ouster. Starr once owned 12 percent of AIG.

In a filing with the U.S. Court of Federal Claims in Washington, D.C., on Thursday, the government said although Starr may disagree with the terms to which AIG agreed, any loss resulting from that agreement should be borne by AIG and its shareholders, and not the public.

Starr demands that the court second guess AIG and rewrite the rescue agreement by making American taxpayers pay an additional $25 billion, based upon a market valuation of AIG after the rescue, the government said in the filing.

The U.S. government argued that AIG had asked and agreed to be rescued, electing to save itself from a failure of its own making.

AIG, which was once the world's largest insurer by market value, was rescued by the U.S. government from the verge of collapse at the height of financial crisis in 2008. AIG's bailouts eventually totaled $182.3 billion.

The $25 billion estimate reflects what Starr called the value of the government's stake on January 14, 2011, when it swapped AIG preferred stock for 562.9 million common shares.

The cases are Starr International Co v. U.S., U.S. Court of Federal Claims, No. 11-00779

(Reporting by Sakthi Prasad; Editing by Mark Potter)