Image caption On Friday, Blackberry announced 4,500 jobs cuts in a bid to stem huge financial losses.

Struggling smartphone maker Blackberry has agreed in principle to be bought by a consortium led by Fairfax Financial for $4.7bn (£3bn).

Blackberry said in statement that Fairfax, its largest shareholder with about 10% of the stock, had offered $9 a share in cash to buy the company.

But Blackberry said it would continue to explore other options while negotiations with Fairfax continued.

On Friday, Blackberry announced 4,500 jobs cuts in a bid to stem losses.

The Canadian company said it expected to make a loss of up to $1bn after poor sales of its new handsets. In August, Blackberry said it was evaluating a possible sale.

On Monday, the company announced that it had "signed a letter of intent agreement under which a consortium to be led by Fairfax Financial Holdings Limited has offered to acquire the company subject to due diligence".

It is easy with hindsight to see where things went wrong, much harder to say what Blackberry could have done about it

The statement continued: "Diligence is expected to be complete by November 4, 2013. The parties' intention is to negotiate and execute a definitive transaction agreement by such date."

However, Blackberry said it was not in exclusive talks with Fairfax and would continue to "actively solicit, receive, evaluate and potentially enter into negotiations" with other potential buyers.

Canadian billionaire Prem Watsa, Fairfax's chairman and chief executive, said: "We believe this transaction will open an exciting new private chapter for Blackberry, its customers, carriers and employees.

"We can deliver immediate value to shareholders, while we continue the execution of a long-term strategy in a private company with a focus on delivering superior and secure enterprise solutions to Blackberry customers around the world."

'End game'

Media playback is unsupported on your device Media caption "BlackBerry absolutely failed to read the market" says analyst Carmen Levy

Brian Colello, analyst at Morningstar, said that taking Blackberry private would allow the company to reorganise without being under the glare of Wall Street investors.

He said: "Based on the company's disastrous earnings warning on Friday, I think a deal had to happen and the sooner the better. This is probably the only out for investors and the most likely outcome.

"The benefit to this sort of takeover is the ability for Blackberry and the consortium to reinvent the company without public scrutiny. It appears that the end game is going to be whether Blackberry can emerge as a niche supplier of highly-secured phones to enterprise customers and governments."

Ben Wood, chief of research at CCS Insight, also said that a deal with Fairfax would give Blackberry breathing space to assess its strategic options.

"Early indications suggest a retrenchment to the business market. Wider structural changes such as spinning off Blackberry Messenger and cutting back on hardware are also likely be carefully reviewed."

Blackberry's financial problems came to a head this year following disappointing sales of its new Z10 model smartphone.

Released in January - after many delays - the phone has failed to enthuse consumers.

Blackberry shares, which fell 17% on Friday after its jobs cut announcement, rose just over 1% on Monday.