AIG announced Thursday that it had come to an agreement in principle with the U.S. Treasury, the Federal Reserve Bank of New York and the AIG Credit Facility Trust to repay outstanding obligations from its 2008 bailout.

“We are very pleased that this agreement vastly simplifies current government support of AIG, sets forth a clear path for AIG to repay the FRBNY in full, and sets in motion the steps for the U.S. Treasury to exit its ownership of AIG over time,” Robert Benmosche, president and CEO of AIG, said in a press release.

“As our results this year underscore, AIG’s core businesses are financially strong, well-managed enterprises that are well-positioned to deliver long-term value to all of our stakeholders,” he added.

According to a press release from AIG there are three phases to the agreement. First, AIG will pay off the remaining $20 billion it owes the Federal Reserve. The firm will use proceeds from the public offering of American International Assurance Company Ltd., its Asian life insurance business, and American Life Insurance Company, which MetLife in March agreed to purchase for approximately $15.5 billion.

Second, “AIG will draw down up to $22 billion of undrawn Series F funds available to the company under the Troubled Asset Relief Program (TARP) to purchase an equal amount of the FRBNY’s preferred interests in the [special purpose vehicles].” Those preferred interests will then be transferred to the U.S. Treasury.

Additionally, AIG will use proceeds from upcoming sales of its Star Life Insurance Co. and Edison Life Insurance to pay off the remainder of the Federal Reserve’s special purpose vehicle interests, which total approximately $26 billion.

Finally, the firm will exchange 1.655 billion shares of common stock for $49.1 billion TARP Series E and Series F preferred shares, as well as the Series C preferred shares held by the AIG trust. Furthermore, existing common shareholders will be issued up to 75 million warrants with a strike price of $45 per share. This exchange will not occur until the Federal Reserve credit is paid off. On its completion, the U.S. Treasury will own more than 92% of AIG’s common stock, and is expected to sell its stake in the open market.

According to the press release, AIG expects to complete the agreement before the end of the first quarter of 2011.