Media playback is unsupported on your device Media caption The BBC's Michelle Fleury says Blackberry "was once a pioneer" in the smart phone field

Blackberry has announced it is planning to cut 4,500 jobs, or 40% of its worldwide workforce, in an attempt to staunch huge losses.

The smartphone maker said it anticipated a loss of as much as $995m (£621m) when it reports its second-quarter earnings next week.

Shares in the firm closed down 17% after briefly being halted following the announcement.

In August, the Canadian company said it was evaluating a possible sale.

In a statement on Friday, Blackberry's chief executive Thorsten Heins said: "We are implementing the difficult, but necessary operational changes announced today to address our position in a maturing and more competitive industry, and to drive the company toward profitability."

"Going forward, we plan to refocus our offering on our end-to-end solution of hardware, software and services for enterprises and the productive, professional end user."

'Off a cliff'

The company said the losses were primarily attributable to disappointing sales of its new Z10 model smartphone.

Released in January to much fanfare after many delays, the phone has failed to enthuse consumers.

In June, Mr Heins said that the company had shipped only 2.7 million Z10 phones out of total shipments of 6.8 million Blackberry phones in the three months to 1 June. Many Blackberry users had instead opted to stick with earlier models.

Over the summer, word trickled out the company had hired a series of advisors to help it explore options.

In August, board member Timothy Dattels was appointed to a committee that would consider different business models, including a potential sale.

"We believe that now is the right time to explore strategic alternatives," said Mr Dattels at the time.

Analysts have long indicated that Blackberry's trove of patents could be attractive to potential buyers, but none of the large technology companies have publicly indicated interest.

"The company has sailed off a cliff," BGC technology analyst Colin Gillis told the BBC.

"This is the quarter where Blackberry as you used to know it is no longer."

Mr Gillis said the job cuts and losses today could dampen the enthusiasm of potential buyers and might indicate the company could not find any interested parties.

This week, the company released a new version of its handset, the Z30, which was praised by observers but was nonetheless overshadowed by Apple's launch of its new smartphone products.

"It's not a bad phone," said Mr Gillis.

"I'm sure they'll sell at least one."