(Adds comment from analysts, investor; updates share move)
TORONTO, Dec 20 (Reuters) - BlackBerry Ltd , after giving up on a plan to sell itself last month, reported a massive $4.4 billion quarterly loss on Friday as sales of its smartphones shriveled and it booked a huge inventory writedown.
Even so, its shares surged 16 percent to $7.26 in morning trading as investors welcomed a move by the Canadian company that could ease the risk of more writedowns for unsold phones.
BlackBerry said it has entered a five-year partnership with Foxconn Technology Co Ltd to develop and manufacture handsets, starting with a low-end device built for Indonesia and other emerging markets. The deal means that BlackBerry will no longer pay upfront for components for devices produced by Foxconn on its behalf.
Investors viewed the arrangement as an exit from handsets in all but name for BlackBerry, helping push its stock up despite the dismal operating numbers.
"It's almost like BlackBerry is disposing of its consumer handset business without actually disposing of it," said Jefferies analyst Peter Misek, who likened the deal to what computer makers Hewlett-Packard Co and Dell have done with laptops.
Chief Executive John Chen, who took the helm last month, said he expected the deal to help BlackBerry's handset business turn cash-flow positive, and for the company as a whole to turn a profit in fiscal 2016, which begins in early 2015.
"Just jettisoning all the stuff and driving on with the part of the business that makes money makes a heck of a lot of sense to me and that is very clearly where Chen is going," said Ross Healy, a portfolio manager at Macnicol & Associates who owns a small number of BlackBerry shares.
Chen has said he is counting on strong growth in its service business, which manages smartphone traffic on the internal networks of corporate and government clients.
"While our enterprise services, messaging and QNX embedded businesses are already well-positioned ... the most immediate challenge for the company is how to transition the devices operations to a more profitable business model," Chen said.
The Waterloo, Ontario-based company pioneered the concept of on-the-go email, and for years its pagers and phones were must-have devices for political and business leaders. But in recent years it has lost its once-dominant market share to Apple Inc's iPhone and a slew of smartphones powered by Google Inc's Android operating system.
As of Thursday's close, the stock had fallen roughly 47 percent this year.
In his presentation to analysts after the release of the company's results, Chen mixed an upbeat tone with a heavy dose of realism, which helped soothe nervous investors who had sharply lowered their expectations for BlackBerry after a string of disappointing news.
"It's clear that he's not the old guard, he's not there trying to do what Lazaridis and Thorsten were up to. He's actually been taking some concrete steps," said Mark McKechnie, an analyst at Evercore Partners, referring to BlackBerry's founder Mike Lazaridis and Thorsten Heins, Chen's predecessor as CEO.
BlackBerry sold about 4.3 million handsets in the third quarter ended Nov. 30, with older BlackBerry 7 models accounting for about 3.2 million of that number.
The company recognized hardware revenue on 1.9 million devices, down from 3.7 million in the previous quarter.
On a brighter note, its cash pile grew to $3.2 billion from $2.6 billion a quarter earlier, but that included $1 billion raised by issuing convertible notes to a group of investors last month after calling off a months-long search for a buyer.
Service revenue slipped 13 percent as fewer people paid to use BlackBerry's secure network, and the company said that level of decline could be expected to continue.
Its new line of devices running on BlackBerry 10 software has failed to gain traction, with unsold BlackBerry 10 devices leading it to write down another $1.6 billion of inventory and supply commitments, after already writing off $934 million for unsold Z10 phones last quarter.
The company also slashed by $2.7 billion the carrying value of some long-lived assets, mostly licensing agreements reached when the company was far larger.
The company reported a third-quarter net loss of $4.4 billion, or $8.37 a share, compared with year-earlier net income of $9 million, or 2 cents a share.
Excluding the inventory writedowns and impairment charges, the loss was $354 million, or 67 cents a share.
Analysts on average had expected a loss of 44 cents a share, according to Thomson Reuters I/B/E/S.
Revenue fell to $1.19 billion from $2.73 billion as increased uncertainty about the company's fate led to further sales erosion. Wall Street had forecast $1.6 billion.
Morningstar analyst Brian Colello said BlackBerry's turnaround strategy was more important than its latest operating results.
"I don't think it's a surprise that the revenue, operating margin and the business continues to decline. I think the bigger question is, what is the turnaround story at this point?" he said. "They have a lot of different assets that could point the company in different directions."
(Editing by Frank McGurty, Lisa Von Ahn and Peter Galloway)