Shares of EchoStar (SATS 5.50%) have rallied a whopping 92.9% this week as of 10:48 a.m. ET Friday, according to data from S&P Global Market Intelligence.

The threat of bankruptcy loomed over EchoStar earlier this year when the company skipped interest payments as the government called into question its right to use wireless spectrum it had purchased years earlier.

But this week, a compromise solution emerged, as EchoStar was able to sell its spectrum to a third party rather than having it seized, while also being able to "rent" that spectrum for the wireless network it's building. Not only that, but it was able to sell the spectrum for a huge sum that pretty much wipes out its debt.

$23 billion from AT&T

On Tuesday, EchoStar stock jumped over 70% when the company announced it had reached an agreement to sell some of its wireless spectrum to AT&T (T 0.93%) for $23 billion. As part of the deal, EchoStar's Boost mobile prepaid wireless service will be able to use AT&T's towers and will have access to T-Mobile's (TMUS 0.94%) network in what appears to be a sale-and-lease type of arrangement.

Earlier this year, the Federal Communications Commission (FCC) sent a letter to EchoStar suggesting it could force a sale or even seize EchoStar's wireless spectrum because EchoStar hadn't deployed a 5G wireless network to the extent or by the time the FCC thought it should. Others in the industry, including Elon Musk, had complained that EchoStar was "hoarding" valuable wireless spectrum that could be used by others, such as Musk's SpaceX and Starlink businesses.

After the FCC launched a review of the spectrum case, EchoStar skipped interest payments when they were due, triggering a 30-day grace period and increasing the prospect of a default. That sent the stock down to distressed levels.

However, this week's $23 billion sale alleviated the problem while also showing the market that EchoStar's spectrum assets were incredibly valuable. In fact, that $23 billion is enough to pay down almost all of EchoStar's debt in one shot.

Moreover, the spectrum sold to AT&T wasn't even the whole of EchoStar's spectrum assets. Following the sale, there were reports that both T-Mobile and Starlink are interested in the spectrum AT&T didn't buy.

Graphic showing communications over a lit-up globe.

Image source: Getty Images.

EchoStar is now derisked

Following the sale, EchoStar's net debt should go to about zero. In the first half of the year, the company made about $680 million in operating income before depreciation and amortization (OIBDA). EchoStar's market cap, even after the sale, is just $16.4 billion. With a $1.3 billion OIBDA figure, that amounts to an enterprise value-to-OIBDA ratio of about 12.6.

For a debt-free company, that's actually very cheap. The issue is that EchoStar's revenue and profits have been declining. Its satellite TV and broadband businesses appear to be in a secular decline, while its emerging wireless business is growing on the top line but also enduring growing losses.

Still, with net debt paid off, EchoStar's floor has been lifted, so there's further upside if management can execute on the Boost Wireless business.