BlackBerry reported better-than-expected adjusted earnings for the sixth straight quarter, as the smartphone pioneer's shift to the higher-margin software business paid off, sending shares soaring more than 15 percent.
The Canadian firm also said on Friday it expects to be profitable on an adjusted basis for the second year in a row, and generate positive free cash flow in the year ending February 2018.
Waterloo, Ontario-based BlackBerry has focused on building a robust software business after scrapping production of its once-iconic smartphones, which lost favor with the arrival of sleek and fully-touchscreen handsets.
The company outsourced the development of its smartphones last year, signing a deal with Indonesia's BB Merah Putih to make and distribute new BlackBerry-branded devices. It has also signed similar deals with China's TCL and India-based Optiemus Infracom.
Adjusted revenue from the software and services unit, which includes mobile device management products and the QNX industrial operating system, rose 12.2 percent to $193 million in the fourth quarter ended Feb. 28, from the preceding quarter.
QNX is crucial to BlackBerry's efforts in the self-driving vehicle industry. The company already has a partnership with Ford Motor to develop autonomous driving software, and CEO John Chen hopes to forge such deals with carmakers around the world.
Gross margin jumped to 60.1 percent in the quarter from 43.3 percent last year.
BlackBerry received more than 3,500 enterprise customer orders in the quarter, an increase of 16 percent from the last quarter.
"Looking ahead to fiscal 2018, we expect to grow at or above the overall market in our software business," Chen said in a statement.
The company's net loss narrowed to $47 million or 10 cents per share in the fourth quarter, from $238 million or 45 cents per share, a year earlier.
The prior-year quarter included a loss of $127 million related to the sale of certain assets.
Excluding one-time items, the company earned 4 cents per share. Analysts on average had expected the company to break even, according to Thomson Reuters I/B/E/S.
Operating expenses nearly halved to $229 million.
Revenue fell about 38 percent to $286 million. On an adjusted basis, revenue was $297 million, beating analysts' average expectation of $289.3 million.
BlackBerry's shares were up 16 percent at $8.06 on the Nasdaq in morning trading. The company's Toronto-listed stock was up 15.4 percent at C$10.70.