TORONTO (Reuters) - Canada’s BlackBerry Ltd reported stronger-than-expected quarterly profit on Thursday as high-margin software sales hit a record, boosting investor confidence in its turnaround and sending shares up 14 percent.

FILE PHOTO: A man holds the new BlackBerry Key One during his presentation event before the Mobile World Congress in Barcelona, Spain February 25, 2017. REUTERS/Albert Gea/File Photo

Software and services revenue rose 26 percent to $196 million in the second quarter ended Aug. 31 from a year earlier, above the average forecast of $175 million of two analysts polled by Reuters.

The results bolstered hopes that Chief Executive John Chen was succeeding in rebuilding BlackBerry, whose revenue has declined for seven years as its smartphone business collapsed. Chen has discontinued handset manufacturing and focused on selling software to industrial companies, governments and corporations.

“Obviously a very good quarter for the software business, which is a good sign for BlackBerry,” said Nicholas McQuire, an analyst at CCS Insight.

The company reported quarterly profit of 5 cents a share, excluding special items, versus a break-even forecast by analysts.

Quarterly software and services revenue was buoyed by a sharp increase in licensing fees, to $56 million from $16 million a year earlier.

Licensing will eventually contribute about as much revenue as BlackBerry’s larger enterprise software business, Chen said in a call with reporters, according to Bloomberg News.

Chen told BNN television that the company hoped to close another autonomous-vehicle software deal directly with an unnamed carmaker later this year, which would follow a deal inked with Ford Motor Co last October that has started to produce revenue for BlackBerry.

“There’s some exciting growth opportunities,” Morningstar analyst Ali Mogharabi said, citing progress in getting BlackBerry technology into self-driving cars.

The company said on Sept. 20 that it would partner with auto supplier Delphi Automotive Plc on a software operating system for self-driving cars, sending its shares up 9 percent that day.

BlackBerry could earn licensing fees of $5 to $25 per car with advanced self-driving technology, up from the $1.50 to $5 it earns for just providing infotainment systems, Chen said on an analyst call.

Some investors said it was too early to call the turnaround a success.

“The company is at the intersection of some interesting trends ... but it’s still early days for them,” said Lori Keith, a portfolio manager at Parnassus Investments, which does not own BlackBerry shares.

Waterloo, Ontario-based BlackBerry said it expected adjusted full-year revenue of $920 million to $950 million. Analysts on average had forecast $924.4 million, according to Thomson Reuters I/B/E/S. It also forecast meeting its software sales growth target of 10 to 15 percent.

Licensing revenue for its software and brand name include royalties on BlackBerry-branded devices sold by China’s TCL Communication Technology Holdings Ltd and Indonesia’s BB Merah Putih.

BlackBerry also said on Thursday it signed a new deal for a Chinese manufacturer to sell BlackBerry Secure-branded devices starting early next year.

The company posted quarterly net income of $19 million, or 4 cents per share, compared to a loss of $372 million, or 71 cents a share, a year earlier. Total revenue excluding items fell 29 percent to $249 million.

BlackBerry’s Canadian-listed shares were up 12.5 percent at C$12.98 after rising as high as $13.47. Its U.S.-listed stock rose 13.2 percent to $10.45, the highest since June.