Updated from 5:18 p.m. EST

Research In Motion

(RIMM)

, provider of BlackBerry devices and software, saw its loss widen due to legal expenses.

The company cheered investors, though, by posting a sales increase from last year and slightly upping its revenue guidance above Wall Street expectations, saying it has seen broad-based demand amid product launches in North America and Europe.

Shares popped up 69 cents or 4.8% to $15.15 in after-hours trading.

The Canadian company lost $12.6 million, or 16 cents a share based on generally accepted accounting principles for its fourth quarter of fiscal year 2003 ended March 1.

Revenue totaled $87.5 million, slightly above expectations for $83.8 million.

In the same period in 2002, the company saw a GAAP loss of 11 cents a share on revenue of $66 million.

Pro forma EPS of 7 cents a share was better than Wall Street expectations for a loss of 12 cents.

The pro forma number excluded a charge of $6.9 million for patent litigation with NTP. RIM now estimates it will spend $39.5 million on legal fees related to the NTP legal fight in its fiscal year 2003.

RIM also said that to account for any future compensatory damages from its legal battle with NTP (which won a jury verdict of $23 million in November), it will set aside an amount equal to 5.7% of the sales of any products that the court has decided infringe on NTP's patents. The amount is expected to total $3 million to $4 million per quarter and will be recorded as a separate line item in its financial statements. The sum in escrow will be refunded if its legal appeal is successful.

On the product front, RIM said the number of BlackBerry subscribers grew 71,000 during the quarter to 534,000. The number of organizations that use its enterprise server grew to about 10,000 from 8,500 in the prior quarter.

"We achieved record net subscriber growth in the fourth quarter while continuing to control expenses and while maintaining a flat cash position with healthy reserves," said co-CEO Jim Balsillie in a statement.

For the quarter now underway, the first quarter of fiscal year 2004, RIM expects revenues of $90 million to $100 million, while adding 70,000 to 80,000 net subscribers.

That's an improvement over the consensus estimate of $87 million.

For the second quarter of 2004, RIM is gearing for sales of $95 million to $105 million, also a little above the consensus expectation for $92 million.

Previously RIM had outlined a guidance range of 8 cents to 13 cents earnings per share for the first quarter, but today the company said it expects a smaller loss of 5 cents to 10 cents per share. Wall Street analysts had been looking for an EPS loss of 11 cents a share.