BlackBerry will change its CEO and accept a $1 billion loan from a consortium involving shareholder Fairfax Financial Holdings as it struggles with inventory and strategy problems. The company has abandoned plans to sell itself.

CEO Thorsten Heins will resign when the deal is complete, with former Sybase CEO John S Chen joining the company as chairman and interim CEO, BlackBerry announced today.

The $1 billion loan takes the form of convertible debentures, exchangeable for shares at a price of $10, a 28.7% premium over Friday's closing price, the company said. Fairfax has agreed to acquire $250 million of the debentures, with other institutional investors agreeing to take the rest. If all the debentures were converted, they would amount to around 16% of outstanding shares, BlackBerry said. In addition, the investors could purchase another $250 million of debentures, potentially raising their combined stake to 19.2%.

In September, Fairfax made a conditional offer of around $9 per share, valuing BlackBerry at around $4.7 billion, although it had not obtained financing for the deal at that time. The new arrangement puts a higher value on the company, but means Fairfax has to find less money to finance the deal.

BlackBerry thanked Heins for establishing a more efficient cost structure and overseeing delivery and adoption of the BlackBerry 10 platform and BlackBerry Enterprise Server (BES) 10.