By David B. Wilkerson

CHICAGO (Dow Jones) - Shares of Sirius XM Satellite Radio as much as doubled Tuesday morning on news that John Malone's Liberty Media has agreed to invest a total of $530 million in the the beleaguered radio company, allowing it to avoid a Chapter 11 bankruptcy filing.

Sirius XM (SIRI) shares were up 7 cents, or 71%, at 18 cents, in mid-morning trading.

For Malone, who is expected to take a seat on Sirius XM's board of directors, the deal has the added benefit of slamming the door on the plans of rival Charlie Ergen, chairman of EchoStar (SATSV) and Dish Network (DISH), who had also been in negotiations with the satellite radio provider. Malone and Ergen have been butting heads for many years, going back to the 1990s when Malone ran Tele-Communications Inc.; TCI was the biggest U.S. cable provider at the time.

Under the first phase of the transaction, Liberty (LCAPA)(LMDIA) will loan Sirius XM $280 million -- $250 million of which will be funded on Tuesday. Sirius XM will use some of the proceeds of that loan to pay $171.6 million of the $175 million in 2 1/2% convertible notes that are due at the end of business Tuesday.

Liberty's loan to Sirius XM will bear interest at a rate of 15%, and will be due in December 2012. It will be secured by the assets that secure Sirius XM's existing credit agreement.

In the second phase of the deal, Liberty will loan another $150 million to XM Satellite Radio, Sirius XM's wholly-owned subsidiary. Liberty has also agreed to offer to buy up to $100 million of the loans outstanding under XM's existing debt agreements.

Once both phases are completed, Sirius XM will issue Liberty 12.5 million shares of preferred stock, which Liberty can convert into 40% of the company's common stock. Liberty Chairman John Malone and Chief Executive John Maffei would then join Sirius XM's board of directors.

The companies said the loan agreements do not constitute a change in the control of Sirius XM, and are not subject to the approval of the Federal Communications Commission.

Standard and Poor's Equity analyst Tuna Amobi maintained his hold rating on Sirius XM shares in the wake of the news Tuesday, saying that the company must still figure out what to do about a payment of $350 million due in May, and another $228 million in notes that mature in December.

Mel Karmazin, Sirius XM's chief executive, said the deal enables his company to "develop the opportunities first outlined in the merger of Sirius and XM." He added, in a statement, that the transaction strengthens Sirius XM's capital structure and enhances its financial flexibility.

Liberty Chief Executive Greg Maffei said Liberty has been "impressed" with Sirius XM, and that its "ability to grow subscribers and revenue in a difficult financial and auto market is indicative of how listeners view this as a 'must have' service."

In February 2007, satellite-radio providers Sirius and XM, both of which had been losing millions of dollars per quarter for several years, announced that Sirius would acquire XM in a $13.6 billion deal. After a protracted regulatory review that frustrated the companies and their stockholders considerably, the transaction was completed last July.

To facilitate the acquisition of XM, Sirius took on a massive amount of debt.

Weighed down by $2.8 billion in long-term debt as of Sept. 30, Sirius XM had been considering a Chapter 11 bankruptcy filing if it could not pay off a $175 million tranche of debt due on Tuesday.

Ergen had made an offer for the company not long ago, but Sirius XM turned him down.

The decline of U.S. auto sales, exacerbated by the financial crisis of recent months, has hurt many media outlets that depended on the big ad budgets of automakers. For Sirius XM, fewer car sales have meant fewer activations of satellite-radio service.