Roughly a month after saying it would explore its strategic options, BlackBerry Ltd. announced Monday it has agreed to sell itself to a consortium led by its largest investor, Canadian insurance company Fairfax Financial Holdings, in a deal worth $4.7 billion.

The proposed deal is for the 90 percent of the company that Fairfax Financial—which is being represented by Shearman & Sterling and Canadian firm McCarthy Tétrault—does not already own.

The Am Law Daily reported last month that Waterloo, Ontario–based BlackBerry was bringing in legal advisers from Skadden, Arps, Slate, Meagher & Flom and Canadian firm Torys to advise a special committee of the company’s board tasked with considering everything from possible strategic alliances to a sale. The move came as BlackBerry—which dropped the Research in Motion name in July in favor of its primary product’s moniker—grappled with sharp declines in profits and subscribers and fell further behind smartphone-sector rivals like Apple and makers of devices based on Google’s Android operating system.

BlackBerry’s outlook has continued to sour since the special committee’s formation. The company said last week that it will lay off 4,500 employees—roughly 40 percent of its workforce—by the end of this year—an announcement that coincided with a dismal quarterly earnings report that sent BlackBerry’s stock plummeting.

While BlackBerry’s phones have long been popular with many Am Law 200 lawyers and staffers, at least some large firms began to shift their technology preferences to the company’s competitors after a computer glitch two years ago caused a major BlackBerry service interruption. Don Jaycox, DLA Piper’s chief information officer for the Americas, told The Am Law Daily last month that his firm had already followed through on plans to reduce the percentage of its roughly 3,500 smartphone users with BlackBerry devices from about 80 percent to nearly “a 50/50 mix.” (Several firms—including Akin Gump Strauss Hauer & Feld, Clifford Chance, and Torys—bought a large number of BlackBerry’s new Z10 models, but the company was later forced to drop the price of that smartphone in an attempt to boost sales further.)

Under the deal announced Monday, Toronto–based Fairfax Financial is leading an investor group that has signed a letter of intent agreement to pay $9 in cash for each BlackBerry share, a price that represents only a 3.2 percent premium over the target’s Friday closing price. (While BlackBerry’s stock price climbed above $12 per share at points after the special committee’s creation in August, the share price dropped roughly 20 percent following the release of the company’s disappointing financial results last week.) If completed, the transaction would make BlackBerry a private company for the first time since predecessor company RIM launched its initial public offering in Toronto in 1997.

Though the sale is subject to due diligence, and the two sides must still negotiate a definitive agreement and obtain regulatory approval, it is expected to be completed by November 4. Between now and then, BlackBerry will actively solicit alternative proposals while the investor group works with Bank of America Merrill Lynch and BMO Capital Markets to arrange financing. Should BlackBerry agree to an alternative deal before November 4, it will pay the Fairfax Financial–led group a break-up fee of $0.30 per BlackBerry share. The break-up fee would rise to $0.50 per share if an alternative deal is made after a definitive agreement is signed with the Fairfax consortium.

The Shearman team advising Fairfax Financial includes New York–based M&A partner Scott Petepiece as well as capital markets partner Jason Lehner, who splits his time between the firm’s New York and Toronto offices. Toronto-based M&A counsel Sean Skiffington is also working on the matter. Shearman advised Fairfax Financial in May on its purchase of pet insurance provider Hartville Group for an undisclosed amount. Last year, the firm worked on the insurance company’s $150 million purchase of a majority stake in the Indian operations of travel agency Thomas Cook Group.

McCarthy Tétrault, meanwhile, is advising Fairfax Financial with a team of attorneys led by Toronto-based M&A partner Garth Girvan and capital markets partner David Tennant.

Skadden and Torys continue to advise BlackBerry’s special committee with respect to the prospective takeover, according to the company’s deal announcement. Neither a Skadden spokeswoman nor a Torys spokesman responded to The Am Law Daily‘s requests for the names of lawyers from their respective firms currently working on the matter. Both firms have a history of advising the smartphone maker, with Skadden representing RIM on its 2010 acquisition of QNS Software Systems and helping the company fend off claims that it misled investors in a securities fraud class action that was dismissed in April.

According to our prior reporting, BlackBerry’s in-house legal chief is Steven Zipperstein, a former general counsel of Verizon Wireless whom BlackBerry brought out of retirement in July 2012.

Davis Polk & Wardwell corporate partner Phillip Mills is representing J.P. Morgan in its role as one of BlackBerry’s financial advisers on the deal.