John Chen, who took the reins at BlackBerry seven months ago, has worked rapidly to trim costs, giving the Waterloo, Ontario-based company more time to stabilize its struggling handset business and earn more money from services and software.

BlackBerry shares surged more than 10 percent after the company said it spent less cash than many expected in its fiscal first quarter, ended May 31, and its gross profit margin rose.

"The short trade is over in this name, for now," said BGC analyst Colin Gillis. "They've got enough liquidity, and they've given us clear profitability targets."

BlackBerry said its low-cost Z3 smartphone was selling well in Indonesia and that its services business, which manages its own and rival mobile devices on the internal networks of large organizations, had won back some customers from rivals.

BlackBerry has more than halved its workforce over the last two years as part of a do-or-die push to turn its business around after losing ground to Apple Inc's iPhone and Samsung Electronics Co devices that run on Google Inc's Android system.

Chen wants BlackBerry to remain a competitor in the smartphone segment, but he is focused on its services business, which made up 54 percent of revenue in the quarter, up from 26 percent only a year earlier. The company works with hundreds of large companies and government agencies to securely manage their networks.

As the company rolls out new phones later this year, its revenue growth is likely to be driven more by its smartphones, but the services business is likely to drive higher margins, Chen told reporters.

There are early signs of recovery in BlackBerry's hard-hit hardware business. On a call with analysts, Chen was upbeat on the Z3, which was launched in Indonesia earlier this year. He said demand was strong and inventory has run low at some points.

The Z3 was built under a partnership forged last year with FIH Mobile, the Hong Kong-listed unit of Taiwanese electronics company Foxconn Technology Co Ltd, to help design, manufacture and sell devices.

As part of the deal, BlackBerry no longer pays the full upfront costs for parts used in its devices. Instead, Foxconn, the trading name of Hon Hai Precision Industry, takes a share of profits on each device in return for taking on the risk of inventory management.

Chen, who showed off BlackBerry's soon-to-be-launched Classic and Passport devices at its annual shareholder meeting in Waterloo on Thursday, said he expects the popular BlackBerry Messenger, or BBM, chat service to begin to generate $100 million in revenue in the next fiscal year.

QUARTERLY NUMBERS

Excluding special items, the company drew down $255 million in cash in its first quarter, much less than the $784 million it used in the fiscal fourth quarter. Cash rose to $3.1 billion from $2.7 billion on a sequential basis, helped by the sale of real estate and a tax refund. BlackBerry's Nasdaq-listed shares closed 9.7 percent higher at $9.09 on Thursday.

"We're encouraged by the stabilization and are increasinglycomfortable BlackBerry will successfully emerge from this massive reclamation project," Oppenheimer & Co analyst Ittai Kidron wrote in a note.

BlackBerry's gross profit margin rose to 46.7 percent in the quarter from 33.9 percent a year earlier, and it reported net income of $23 million, or 4 cents a share, compared with a loss of $84 million, or 16 cents, a year earlier.

Excluding a one-time noncash accounting gain and certain restructuring charges, the loss was $60 million, or 11 cents a share. Analysts, on average, had expected a loss of 25 cents a share, according to Thomson Reuters I/B/E/S.

Quarterly revenue dropped to $966 million from $3.07 billion a year earlier.

(Writing by Allison Martell; Editing by Franklin Paul, Sofina Mirza-Reid, Jeffrey Hodgson and Peter Galloway)

By Euan Rocha and Alastair Sharp