BlackBerry has agreed to sell to a group led by largest shareholder, Fairfax, for $4.7 billion.
BlackBerry said a letter of intent has been signed and its shareholders will receive 9 dollars in cash for each share.
Fairfax head Prem Watsa is a former board member who owns 10% of BlackBerry. Mr Watsa stepped down when BlackBerry announced it was considering a sale last month. The billionaire is one of Canada's best-known value investors.
Trading of the company's stock was halted ahead of the news. BlackBerry shares plunged on Friday after the company announced a loss of nearly a billion dollars and layoffs of 4,500 workers.
Mr Watsa has been compared to Warren Buffett because of his investing approach. BlackBerry founder Mike Lazaridis recruited him to join the company's board when Mr Lazaridis and Jim Balsillie stepped aside as co-chief executive in January last year.
BlackBerry said its board of directors approved the terms of the letter of intent. The statement said BlackBerry and Fairfax will negotiate and execute a definitive transaction agreement by November 4.
Mr Watsa said in April that he was a "big supporter" of current chief executive Thorsten Heins and called his promotion the right decision in 2012. He also said he was excited about the company's new BlackBerry 10 operating system.
This year's launch of BlackBerry 10, its revamped operating system, and fancier devices - the touchscreen Z10 and Q10 for keyboard loyalists - was supposed to rejuvenate the brand and lure customers. But the much-delayed phones have failed to turn the company around. At their peak in autumn 2009, BlackBerry's smartphones enjoyed global market share of over 20%, said Mike Walkley, an analyst with Canaccord Genuity. Their piece of the pie has since evaporated to just 1.5%.
BlackBerry said last week it will lay off 4,500 employees, or 40% of its global workforce, as it tries to slash costs by 50% and shift its focus back to competing mainly for business customers. BlackBerry said cutting its global headcount to 7,000 total employees is necessary. The company let 5,000 people go last year.
The company also said it plans to focus on offering only two high-end devices and two entry-level handsets, with emphasis on the business market.