(Adds details on results, analyst comments, share price move)
TORONTO, Sept 27 (Reuters) - Research In Motion Ltd , the struggling BlackBerry maker, reported a narrower-than-expected loss on Thursday and said it increased its cash pile, a hopeful sign for the launch of its make-or-break line of revamped smartphones next year.
Shares of RIM rose more than 15 percent in after-hours trade, boosted by indications the company will have sufficient cash to push ahead with a robust marketing campaign of its next-generation BB10 devices, due out in early 2013.
In another rare ray of optimism for the embattled company, RIM posted a loss that was smaller than expected and its revenue topped forecasts.
"It's still bad, but it's a much smaller disaster than expected," said Sterne Agee analyst Shaw Wu. "These stocks all trade on expectations. Expectations were really low, and they were able to beat that."
The company has staked its future on BB10. A one-time smartphone pioneer, RIM has failed to keep pace with innovations by rivals such as Apple Inc and Samsung Electronics Co . RIM's share price has tumbled about 70 percent over the past year as BlackBerry's market share has tumbled.
The Waterloo, Ontario-based company reported a net loss of $235 million, or 45 cents a share, in its fiscal second quarter, ended Sept 1. That compared with a profit of $329 million, or 63 cents a share, in the same period a year earlier.
Excluding one-time restructuring-related items, the loss came in at $142 million, or 27 cents a share.
Revenue rose to $2.9 billion, up 2 percent from the fiscal first quarter, but down about 30 percent from the same period a year earlier.
Analysts, on average, had expected RIM to report a loss of 46 cents a share, on revenues of $2.5 billion, according to Thomson Reuters I/B/E/S.
RIM increased its cash to about $2.3 billion from $2.2 billion in the fiscal first quarter.
"They also lost a lot less money than expected, and the cash balance, even though they lost money, they were able to grow it slightly," said Wu.
Having sufficient cash on hand is seen as crucial to a successful launch of RIM's line of revamped smartphones that will run on its new BB10 operating system.
RIM's U.S.-listed shares surged more than 15 percent to $8.22 in trade after the closing bell on Thursday. (Reporting by Euan Rocha, Alastair Sharp, Allison Martell and Cameron French; Editing by Frank McGurty and Leslie Adler)