Updated

Network computer maker Sun Microsystems Inc. (SUNW) Thursday posted a narrower quarterly loss as revenue rose year over year for the second consecutive quarter after three years of declines, sending shares slightly higher.

Santa Clara, Calif.-based Sun reported a net loss for its first fiscal quarter ended Sept. 26 of $174 million, or 5 cents per share, compared with a year-ago net loss of $286 million, or 9 cents per share.

Revenue rose 3.6 percent to $2.63 billion from $2.54 billion.

Gross margin excluding items was 42.9 percent, higher both from a year ago and prior quarter, Sun said. Analysts and investors have focused on Sun's gross margin, which has declined in recent years due to higher shipments of lower-cost servers using Intel Corp. (INTC)-compatible chips and price competition from rivals International Business Machines Corp. (MSFT), Dell Inc. (DELL) and Hewlett-Packard Co. (HPQ).

"The margins are definitely a positive thing," said Brent Bracelin, an analyst at Pacific Crest Securities. "The fact that these guys did show break even shows they seem to be serious about keeping costs down."

Excluding items, Sun Microsystems' results were nil per share. On that basis, analysts had forecast a loss of 3 cents per share, on average, within a range of a loss of 6 cents to a profit of 1 cent, according to Reuters Estimates, on revenue of about $2.7 billion.

"The first fiscal quarter is usually our toughest but the management team executed well operationally," said Chairman and Chief Executive Scott McNealy (search) in a statement. "And we are on the offense again as a result of our newly revamped product line, a result of our sometimes controversial but continued commitment to (research and development) investments in the last three years."

In after-hours trade, Sun shares rose to $4.04 on INET. In regular trade on Nasdaq, Sun shares fell 5 cents to close at $3.97.