The Federal Reserve on Wednesday agreed to provide insurance giant American International Group Inc. with a loan of up to $37.8 billion, on top of one made to the troubled company last month.

Under the new program, the Federal Reserve Bank of New York will borrow up to $37.8 billion in investment-grade, fixed income securities from AIG in return for cash collateral. These securities were previously lent by AIG's insurance company subsidiaries to third parties.

The arrangement will help AIG secure funds on an as-needed basis, the New York-based insurer said in a statement.

As of Monday, about $37.2 billion of securities were available for loans under AIG's securities lending program.

On the brink of failure last month, AIG was bailed out when the government offered it an $85 billion loan during the ongoing credit crisis that saw Lehman Brothers Holdings Inc. file for bankruptcy protection and the sale of Merrill Lynch & Co. to Bank of America Corp. In return for the two-year loan, the government received warrants to purchase up to 79.9 percent of AIG.

As of Sept. 30, AIG had drawn $61 billion on the credit facility, of which about $54 billion has gone toward its securities lending and AIG's financial products area. The rest of the money has been for other liquidity needs amid an "unprecedented" freezing of credit markets, Chief Executive Edward Liddy said last week.

Last week, AIG said it would sell off a number of business units to pay off its massive government loan. The company didn't specifically disclose all the assets it would sell or the expected prices from the sales. However, the New York-based insurer said it plans to retain its U.S. property and casualty and foreign general insurance businesses, and also plans to retain an ownership interest in its foreign life insurance operations.

Shares of AIG closed down 32 cents, or 9.1 percent, to $3.19 in trading Wednesday.