Sirius XM got a reprieve from bankruptcy Tuesday by agreeing to an under-the-gun deal with Liberty Media which will ensure at least three years of continued service. But the respite does not come cheaply: The parent company of DirectTV is taking a 40 percent stake in the once high-flying company and providing an immediate cash fusion at payday loan store rates so it can meet a $172 million obligation that is due today.

For the beleaguered Sirius XM, this deal or something like it was an absolute necessity. It owed $172 million in convertible notes due Tuesday, has another $750 million or so in loans due later this year, and its cash reserves were running low. Last week, the company was revealed to be preparing for bankruptcy, but this deal averts that scenario.

In the first phase of the $530 million deal, Liberty Media will loan Sirius XM $280 million — $250 million of which the satellite radio company receives Tuesday, in order to deal with the immediately-maturing notes. This loan bears a whopping 15 percent interest rate, but Sirius XM won’t have to pay it back until December 2012.

Phase two of the deal will see Liberty loan Sirius XM

subsidiary XM radio another $150 million, and it has also promised to buy up to $100

million of Sirius XM’s existing loans — some of which the satellite radio company owed to the satellite television company Echostar, which had itself expressed interest in acquiring Sirius XM.

After these loans are made, Liberty Media will get 12.5 million shares of preferred stock in Sirius XM, convertible into 40 percent of the general SIRI stock, and will also receive 40 percent of the seats on Sirius XM’s board of directors.

For satellite radio fans, the deal represents at least another three more years of uninterrupted satellite radio service. And Sirius XM CEO Mel Karmazin appears to have dodged a bullet by securing a loan of this magnitude at a time when credit is tight for any company, let alone one that uses expensive satellites to distribute audio programming.

"We are pleased to have come to this agreement with Liberty Media, particularly in light of today’s challenging credit markets," stated Karmazin. "Liberty’s investment is an important validation of what Sirius XM has already achieved and a vote of confidence in what we will achieve. This agreement enables Sirius XM to continue to develop the opportunities first outlined in the merger of Sirius

and XM. By strengthening our capital structure and enhancing our financial flexibility, this investment allows us to continue providing the great content and innovative programming our subscribers know and love."

Sirius XM stock rose sharply on the news:

See Also: