BlackBerry announced a loss of nearly $1 billion and layoffs of 4,500 workers on Friday.

Struggling smartphone maker BlackBerry Ltd. said Monday that it has agreed in principle to a deal under which it would be sold to a consortium led by Canadian firm Fairfax Financial Holdings Ltd. for $4.7 billion.

BlackBerry announced that a letter of intent has been signed and its shareholders will receive $9 in cash for each share.

Fairfax head Prem Watsa is a former board member who owns 10 percent of BlackBerry. 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 after the company announced Friday a loss of nearly $1 billion and layoffs of 4,500 workers.

The BlackBerry, in 1999 a pioneering smartphone, was once the dominant choice for on-the-go businesspeople and other consumers before Apple's iPhone debuted in 2007.

Wire services