Apple Computer Inc. Wednesday posted a fiscal first-quarter profit, directly in line with expectations and a turnaround from the year-ago loss, despite sluggish sales due to the economic downturn and an aging product lineup.

Apple also said demand for the redesigned iMac desktop computer unveiled last week was outpacing its expectations and said company revenue would rise in the second quarter from the first, while earnings per share would be steady.

Both financial targets were higher than current Wall Street expectations, and Apple shares rose in after hours trade to $21.32 from a close of $20.78 on the Nasdaq.

"Although earnings per share were on target, revenues were light of expectations probably reflecting anticipation of new products in a typically strong seasonal quarter, but the company is guiding expectations up -- for the first time in five quarters," said Bear Stearns analyst Andrew Neff.

Apple posted a net profit of $38 million, or 11 cents per share, in the quarter ended in December compared with a loss of $195 million, or 58 cents per share, in the year-ago period.

Sales were $1.38 billion in the quarter, which gets a boost from holiday sales, compared with $1 billion a year ago and $1.45 billion in the September quarter.

Apple had forecast a profit of at least a 10 cent per share before one-time items and sales of at least $1.4 billion, while analysts polled by Thomson Financial/First Call had expected, on average, earnings before items of 11 cents per share on sales of $1.43 billion.

Chief Financial Officer Fred Anderson said in an interview with Reuters that initial orders for the newly designed iMac were the highest for any product since the initial iMac about three years ago, and he forecast revenue would rise sequentially in the current quarter to $1.5 billion.

Earnings per share would be steady from the December quarter, failing to match the rise in sales as Apple dealt with costs from ramping up a new product and higher component costs for the computers, he said.

Apple had cautioned three months ago that the holidays might not be great, forecasting earnings per share of at least 10 cents per share in the December quarter compared to Wall Street's 18 cent consensus at the time.

Apple has said its new portable music player, the iPod, was selling like hot cakes, but that was not seen as a major boost to sales. The company's product bomb shell, the redesigned iMac -- was unveiled last week -- missing the holiday buying season.

Apple shares gained ground in the fourth quarter, closing on Wednesday at $20.78, off 4 percent for the day but up from a low of $15.49 on Oct. 1. The stock has not recovered from an earnings warning a year and a half ago which cut the share price in half to $25.75 on Sept 29, 2000.

Since Oct. 1, Apple shares have risen 35 percent but underperformed the leading PC maker, Dell Computer Corp ,which rose about 50 percent.

The company has aimed to expand its market share, in part by opening a new chain of company stores in high-profile locations, although it pushed back profit expectations for the stores last quarter, when it said the chain would lose money in fiscal 2002.