The Waterloo, Ont.,-based technology company, which reports in U.S. dollars, said after markets closed Thursday that its quarterly loss was US$235 million or 45 cents per diluted share compared with a profit of $329 million or 63 cents per share a year ago.
RIM's adjusted loss was $142 million or 27 cents per share.
While large, the loss was still much better than the 47 cents per share loss expected by analysts polled by to Bloomberg.
In pre-market trading on the Nasdaq, RIM shares were up $1.23, or 17.23 per cent, at US$8.37 after having closed up 14 cents at US$7.14 Thursday before the company's earnings were released.
On the Toronto Stock Exchange, RIM shares finished the day Thursday up eight cents at $6.96.
Much of the optimism came from adjusted earnings per share, which filter out one-time costs like expenses related to job reductions and cost cuts.
But despite impressing investors, RIM still has many challenges ahead. Its revenues were notably weaker, down 31 per cent to $2.87 billion from $4.17 billion a year ago.
RIM said it shipped about 7.4 million BlackBerrys during the quarter, down from 7.8 million in the first quarter, showing that interest in its existing models is starting to wane.
Jeffries analyst Peter Misek said he was surprised that RIM managed to keep so many customers interested.
"Management sold more BlackBerries than we thought," he noted in an e-mailed response.
RIM also shipped more PlayBook tablets to stores in the quarter, at 260,000 units compared with 130,000 in the first quarter.
The results show that RIM is making some progress as it moves towards to its next generation of BlackBerry smartphones and completes its cost reduction plan, said chief executive Thorsten Heins.
RIM has been struggling with numerous obstacles including the delay of its new smartphones and BlackBerry 10 operating system and massive layoffs.
"While this transition is challenging and the competitive environment tough, we have made steady progress in these areas in this quarter," Heins said in a conference call.