The federal government has agreed to accept $25 billion of preferred stock in two American International Group Inc businesses as partial repayment of debt, the company said on Thursday.

The agreement will reduce AIG's debt of about $40 billion under a Federal Reserve Bank of New York credit facility, but it will still be a while before taxpayers get any cash back for their bailout of the insurer.

Since its near-collapse last September, U.S. taxpayers have committed up to about $180 billion to rescue AIG, including the loan under the credit facility and a $40 billion equity injection.

AIG also said the agreement positions the two businesses, American International Assurance Co Ltd (AIA) and American Life Insurance Co (Alico), for initial public offerings, depending on market conditions.

AIG has already begun the process for an IPO of AIA early next year, selecting Morgan Stanley and Deutsche Bank AG as global coordinators for the offering.

The pact on AIA and Alico follows an agreement AIG reached with the government in March. At that time, the company said the preferred stock in the two units would reduce its balance under the credit facility by up to $26 billion.

The embattled insurer said on Thursday it will put the equity of the units into special purpose vehicles, and the New York Fed will receive preferred stakes of $16 billion in AIA and $9 billion in Alico.

Edward Liddy, AIG's chief executive, said the agreement represents a major step toward repaying taxpayers and preserving the value of AIA and Alico.

The New York Fed, in a separate statement, said the agreement will help AIG repay taxpayers and restructure. The AIA and Alico transactions are expected to close in the second half of 2009, pending regulatory approvals.

Alico operates in more than 50 countries but generates more than half its revenue in Japan.

Once the world's largest insurer by market value, AIG nearly collapsed last year because of soaring losses from credit default swaps, as customers who bought debt protection from the company's financial products unit boosted their demands for collateral.

AIG lost more than $99 billion in 2008 and has received a series of government bailouts.

The company has found it more difficult to sell assets for good prices because prospective buyers know it needs to dismantle itself to help repay taxpayers.

Last year AIG tried to sell AIA privately for as much to $20 billion but failed to find a buyer.

Liddy, a former chief executive at Allstate Corp , last month announced plans to step down as AIG CEO, saying he had planned for his stay to be temporary. He said at the time it might take several years for AIG to repay taxpayers.

AIG shares were unchanged at $1.42 in morning trading on the New York Stock Exchange.

(Reporting by Jonathan Stempel and Paritosh Bansal in New York and Sweta Singh in Bangalore; Editing by Dinesh Nair and John Wallace)