Beleaguered gadgetmaker BlackBerry said on Monday that it’s signed a tentative agreement to be purchased by a group led by Canadian holding company Fairfax Financial in a $4.7 billion deal. The transaction, in which BlackBerry would become a private company, represents a turning point for a once high-flying tech giant that played a key role in the mobile-device revolution only to be eclipsed by Apple and Google.

Fairfax, which already owns 10% of BlackBerry, will pay $9 per share for the company, about 3% more than its closing price on Friday. BlackBerry still has the flexibility to accept a better offer in a maneuver known as a “go-shop” process, but it’s hard to imagine that a sweeter overture will be forthcoming.

On Friday, BlackBerry announced that it would cut 4,500 jobs as it prepares to absorb nearly $1 billion in losses related to unsold-device inventory, sending its stock price plunging by 20%. Since last month, BlackBerry’s “special committee” has been evaluating strategic alternatives (like a sale) for the company. BlackBerry and Fairfax are expected to complete their due diligence by Nov. 4. By going private, BlackBerry (until recently known as Research in Motion) can continue to attempt a turnaround without the Wall Street pressure that accompanies public companies.

“The special committee is seeking the best available outcome for the company’s constituents, including for shareholders,” Barbara Stymiest, chair of BlackBerry’s board of directors, said in a statement. “Importantly, the go-shop process provides an opportunity to determine if there are alternatives superior to the present proposal from the Fairfax consortium.”

Prem Watsa, chairman and CEO of Fairfax, is often referred to as Canada’s Warren Buffett, the famed investor who runs the Omaha-based Berkshire Hathaway conglomerate. “We believe this transaction will open an exciting new private chapter for BlackBerry, its customers, carriers and employees,” Watsa said in a statement. “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.”

It may seem like a distant memory now, but just a few years ago BlackBerry was the premier mobile gadget on the market. The device was so ubiquitous on Wall Street and Capitol Hill that it earned the nickname CrackBerry. As recently as 2009, BlackBerry was named by Fortune magazine as the fastest growing company in the world, with earnings exploding by 84% a year. Times have changed. Since 2009, BlackBerry’s stock price has collapsed by a vertigo-inducing 90% to under $7 at its low point last summer.

Today, BlackBerry has fallen to the back of the smartphone pack — with a minuscule 3% of the market — as Apple’s iPhone and Google’s Android operating system have come to dominate the market. BlackBerry’s decline has become a case study about what happens when a tech giant fails to innovate in a consumer-technology market evolving at breakneck speed. In a sign of the times, Apple said on Monday it sold a record 9 million units of its latest iPhone devices during the first weekend they were on sale.

BlackBerry’s failure to keep up with Apple and Google was a consequence of errors in its strategy and vision. First, after growing to dominate the corporate market, BlackBerry failed to anticipate that consumers — not business customers — would drive the smartphone revolution. Second, BlackBerry was blindsided by the emergence of the “app economy,” which drove massive adoption of iPhone and Android-based devices. Third, BlackBerry failed to realize that smartphones would evolve beyond mere communication devices to become full-fledged mobile entertainment hubs.

BlackBerry insisted on producing phones with full keyboards, even after it became clear that many users preferred touchscreens, which allowed for better video viewing and touchscreen navigation. When BlackBerry finally did launch a touchscreen device, it was seen as a poor imitation of the iPhone. BlackBerry saw its devices as fancy, e-mail-enabled mobile phones. Apple and Google envisioned powerful mobile computers and worked to make sending e-mail and browsing the Web as consumer-friendly as possible.

Founded in 1984 as a consulting business called Research in Motion in Waterloo, a suburb of Toronto, the company introduced its first BlackBerry device in 1999. For e-mail-obsessed Wall Streeters and other corporate users, it was a godsend. BlackBerry pioneered “push e-mail,” meaning that users simply received their messages when they were sent, instead of having to constantly check for new e-mails. BlackBerry’s QWERTY keyboard was like an epiphany: no more pecking at a numeric keypad to eke out messages. In the years that followed, the BlackBerry keyboard spawned a whole generation of dual-thumb e-mail warriors.

As the BlackBerry exploded in popularity, especially among business customers, the company became Canada’s most valuable firm, leading some to dub Waterloo Canada’s Silicon Valley. But while BlackBerry was resting on its laurels atop the corporate mobile market, Apple and Google were laser-focused on the consumer market, which they correctly predicted would drive smartphone adoption. In January 2012, BlackBerry announced that its co-CEOs Jim Balsillie and Mike Lazaridis would step down and be replaced by Thorsten Heins, a German-born executive who joined the company in 2007. Nearly two years later, Heins has not yet been able to execute a turnaround.