BlackBerry Ltd reported stronger-than-expected quarterly results on record sales at its closely watched software unit, sending its shares up sharply on Thursday.

The Canadian company decided last year to stop making its iconic BlackBerry smartphone, license the technology to others and focus on software. This exacerbated declines in revenue following the collapse of its hardware business but helped boost profit margins as it gets revenue from phone sales without incurring heavy manufacturing costs.

BlackBerry’s Canadian-listed shares jumped 8.7 percent to C$12.50, while its U.S.-listed stock was up 9.6 percent at $10.12.

Excluding special items, the Waterloo, Ontario-based company gave a revenue outlook of $920 million to $950 million for the year ending in February, assuming software sales growth of 10 percent to 15 percent.

BlackBerry also said it expected positive fiscal-year earnings and free cash flow.

The company reported a profit of 5 cents a share for the second quarter ended Aug. 31, excluding special items. That beat the analysts’ average estimate of break-even, according to Thomson Reuters I/B/E/S.

Software and services revenue rose 26 percent from a year earlier to $196 million, exceeding forecasts of $174 million from RBC and $176 million from Macquarie.

“It sounds like a good quarter, and obviously a very good quarter for the software business, which is a good sign for BlackBerry,” said Nicholas McQuire, vice president for enterprise research at CCS Insight.

BlackBerry said it had about 3,300 enterprise customer orders in the quarter and that 79 percent of its software and services revenue, excluding patent licensing and professional services, was recurring.

Total revenue excluding items fell 29 percent to $249 million from a year earlier but rose slightly from $244 million in the prior quarter.

The company posted net income of $19 million, or 4 cents per share, compared with a year-earlier loss of $372 million, or 71 cents a share.

Reuters (Reporting by Alastair Sharp; Editing by Jim Finkle and Lisa Von Ahn)