Capping an extraordinary day in financial markets, U.S. authorities pieced together an emergency $85 billion rescue of insurance company American International Group Inc (AIG.N) to stave off a bankruptcy that could have thrown world markets into deeper turmoil.

AIG''s rescue calls for the U.S. Federal Reserve to lend up to $85 billion to AIG for two years in exchange for a 79.9 percent equity stake. It comes just two days after U.S. authorities refused to bail out investment bank Lehman Brothers Holdings Inc (LEH.N), forcing it into bankruptcy court despite pleas from Wall Street''s chiefs.

AIG will pay interest at a steep 8.5 percentage points above the three-month London Interbank Offered Rate, making the current rate equal to about 11.4 percent. That gives AIG a big incentive to embark on a massive asset sale program to pay back the loan quickly.

"Thank God," exclaimed Daniel Fuss, an influential bond manager who oversees more than $100 billion at Loomis, Sayles & Co in Boston. "AIG is interwoven with so many people and touches many companies around the world. This is a huge relief to many parts of the financial markets."

Around the time the AIG deal was announced, British bank Barclays Plc (BARC.L) gave Wall Street another boost: It agreed to buy several parts of Lehman, the Wall Street investment bank that went bankrupt on Monday, for $1.75 billion.