The $4.7 billion deal that would have taken BlackBerry Ltd. private has come undone. The Waterloo, Canada-based tech company announced today that Fairfax Financial Holdings, the investment firm that proposed the takeover bid but was unable to raise the necessary funds, will instead invest $1 billion in BlackBerry.

What's more, BlackBerry says its chief executive, Thorsten Heins, will be leaving the company. David Kerr, a managing partner at investment holding company Edper Financial Corporation, will step down from BlackBerry's board of directors -- a role he held since July 2007. Heins was appointed president and chief executive in January 2012.

As part of the new agreement, Fairfax and other investors will invest $1 billion in "convertible debentures" in BlackBerry, with Fairfax contributing $250 million. A convertible debenture is a type of loan that can be converted into common stock if BlackBerry's stock price hits $10 a share.

Related: BlackBerry Inks $4.7 Billion Deal to Go Private

Upon the closing of the transaction, John Chen, the former chairman and chief executive of Sybase, is expected to serve as interim chief executive and board chairman until the company finds a replacement. Prem Watsa, Fairfax's chairman and chief executive, will be appointed lead director and chair of BlackBerry's Compensation, Nomination and Governance Committee.

The agreement is expected to be reached in the next two weeks, pending approval from the Toronto Stock Exchange.

Despite its sudden change of course and failure to go private after months of searching for a buyer, BlackBerry touted today's news as a "significant vote of confidence."

"This financing provides an immediate cash injection on terms favorable to BlackBerry, enhancing our substantial cash position," board chair Barbara Stymiest said. "Some of the most important customers in the world rely on BlackBerry and we are implementing the changes necessary to strengthen the company and ensure we remain a strong and innovative partner for their needs."

But investors apparently are less confident. BlackBerry shares are trading at $6.88, down more than 11 percent.

Related: BlackBerry Says, 'Remain Calm. All is Well.'