American International Group Inc., the world's largest insurer by assets, announced plans to raise $12.5 billion in capital as it posted its second straight big quarterly loss.

AIG had a record net loss of $7.81 billion, or $3.09 a share, versus net income of $4.13 billion, or $1.58 a share, a year earlier, the insurer said. The adjusted net loss in the latest quarter was $3.56 billion, or $1.41 a share. AIG was expected to lose 76 cents a share, according to the average estimate of 15 analysts in a Thomson Reuters survey.

The weak U.S. housing market, the disruption in the credit markets, as well as equity market volatility, had a substantial adverse effect on results, the New York-based company said in a statement.

AIG shares fell more than 5 percent in after-hours trading and the company hasn't had two consecutive quarterly losses since its initial public offering in 1969. Shares fell 93 cents, or 2.1 percent, to $44.15 in New York Stock Exchange composite trading at 4 p.m.

While we anticipated a difficult trading environment, the severity of the unrealized valuation losses and decline in value of our investments were beyond our expectations, Chief Executive Officer Martin Sullivan said.

The company guaranteed more than $500 billion of assets for fixed- income investors at the end of 2007, including $61.4 billion in securities tied to subprime mortgages.

AIG also recorded capital losses of $6.09 billion, mainly from impairment charges in its investment portfolio. The financial products business also said it expected to raise $7.5 billion of the total capital through a common stock and equity-lined offering.

Looking forward, the company said it is confident that, although present economic conditions are difficult, AIG's unmatched competitive advantages, strong brand, and unmatched global franchise position it extremely well for the future.

AIG's losses, which is partly driven by unrealized market value adjustments, have put pressure on Chief Executive Martin Sullivan, who took over from Maurice Hank Greenberg in 2005 after an accounting scandal.