(Reuters) - Alcoa Inc. (NYSE: AA) posted a second-quarter loss as a slump in aluminum prices to near two-year lows offset growing demand in the aerospace and automobile markets.

Excluding items, however, Alcoa earned $61 million from continuing operations, or 6 cents per share, which beat Wall Street estimates of 5 cents per share. The company's shares rose slightly in after-hours trade.

The loss from continuing operations was $2 million, or nil cents per share, compared with a profit of $322 million, or 28 cents per share, in the same quarter last year.

Revenue fell 9 percent to $6 billion, as aluminum prices dropped 18 percent from last year, Pittsburgh-based Alcoa said on Monday.

Analysts had lowered their expectations for Alcoa because of low aluminum prices.

With an overhang of high inventories and a 20 percent drop in prices since March, many aluminum producers are losing money. Benchmark three-month London Metal Exchange aluminum stood at $1,915 a tonne on Monday, hovering above the $1,880 low of June 2010.

Alcoa stock was up 6 cents at $8.78 in after-market trading on the New York Stock Exchange.