Bailed-out insurer AIG said on Tuesday it had closed a pact with the New York Federal Reserve that slashes its debt under a credit facility by more than half, to $17 billion.

The deal is a big step in American International Group Inc's efforts to repay loans from a massive taxpayer bailout, and also moves it closer to spinning off two big life insurance units, which could bolster its financial position further.

AIG said that as of Dec. 1, the outstanding principal balance owed to the New York Fed, from loans received as part of the 2008 bailout, had been reduced to $17 billion. That compares with an outstanding balance of about $45 billion last week, including interest and fees.

AIG shares rose more than 11 percent to $31.72, partly reversing a steep fall in the stock on Monday after investors were spooked by concerns over a possible shortfall in reserves for non-life insurance claims.

The debt reduction is the result of a deal first announced last March to give the New York Fed a preferred stake in two of AIG's biggest life insurance units, American Life Insurance Co (Alico) and American International Assurance (AIA), effectively swapping debt for equity.

AIG continues to make good on its commitment to pay the American people back, Chief Executive Robert Benmosche said in a statement. However, he warned the company's results could continue to be marked by volatility, and said that even after AIG pays back all its debts, the federal government will continue to be the insurer's majority owner.

AIG will take a charge of about $5.2 billion in the fourth quarter related to the New York Fed transaction, as earlier disclosed. The company reversed a six-quarter losing streak by posting profits in the two latest quarters.

Besides the $17 billion balance on the New York Fed credit facility, AIG also has outstanding borrowings under a separate loan from the U.S. Treasury of about $44 billion.

The government stepped in to rescue AIG after it ran short of funds to meet collateral demands from global banks that had bought credit protection from an AIG financial products unit. The government saw the company's possible collapse as a systemic risk. American taxpayers now hold nearly 80 percent ownership of AIG.

Under Tuesday's agreement, AIG's ability to borrow under the New York Fed credit facility has been reduced to $35 billion from $60 billion.

AIG said it was moving ahead with pursuing initial public offerings or third party sales for AIA and Alico, and in a separate statement said it was moving forward with the separation of Alico.

AIG retains the common interests in the two units, and will benefit should the market valuation of the two units be in excess of $25 billion.

(Reporting by Lilla Zuill in New York, Deepti Govind in Bangalore and Alex Chambers in London; editing by Karen Foster and John Wallace)