NEW YORK, Sept ,23 (Reuters) - American International Group Inc AIG.N said late on Tuesday it signed a "definitive" agreement for up to $85 billion in borrowings from the U.S. Federal Reserve, the main part of a rescue by the central bank that will see it take a 79.9 percent stake in the giant insurer.

AIG Chief Executive Edward Liddy said in a statement the facility was “the company’s best alternative” in the current market environment.

Under the terms of the agreement, AIG has to pay back the loan from, among other things, asset sales and new debt or share issues. In the statement, AIG made it clear how onerous the terms of the two-year loan will be.

Not only will it pay 8.50 percentage points over 3-month LIBOR, putting the current rate at well over 11 percent, but it will also pay commitment fees.

There will be an initial gross commitment of 2 percent of the total loan facility, and subsequently a fee on undrawn amounts of 8.5 percent a year. The interest and the fees will be added to the balance outstanding, the company said.

“We are pleased to have finalized the terms of the facility, and are already developing a plan to sell assets, repay the facility and emerge as a smaller but profitable company,” Liddy said in the statement.

It wasn’t immediately clear whether the signing of the agreement will derail efforts by a large investor group that is working to thwart a government takeover of the company.

A lawyer for the investors -- which represent more than a third of all AIG stockholders and have the backing of former CEO Maurice “Hank” Greenberg -- said representatives of the group were to be briefed by the company on its financial position. [nN23394100]

The rescue plan was unveiled Sept. 16 amid the most tumultuous week in financial markets in recent memory.