Nokia is entering its death spiral. It’s running out of cash, it’s running out of time, and it’s running out of options. A year ago, incoming CEO Stephen Elop made a brave decision to break with the past. He ditched Nokia’s Symbian operating system and decided to focus all of the company’s high-end development on Microsoft’s Windows Phone platform. At the time, it looked like a risky but potentially high-yielding bet.

If Nokia had gone with Android, the best that it might have achieved was to become an also-ran—another in an endless stream of me-too commodity smartphone makers. Windows Phone, on the other hand, offered Nokia an outside shot at restoring its former glory. Here was a gorgeous OS in need of beautiful hardware. If Nokia could deliver wonderful devices for the platform, it might be able stand out in the marketplace as offering something unique: A coherent line-up of attractive, user-friendly phones at all price levels.

Elop, who had just come from Microsoft, must have known that choosing Windows was always going to be a gamble, even a moonshot. But in the tech business, if you’re not aiming for the moon, what’s the point?

But the moonshot missed its target. Now Nokia is crashing into the sea. The company’s line of Lumia phones—gorgeous though they are—aren’t selling. Last quarter Nokia shipped just 2 million of them. That ranks as strong for Nokia—and it’s heartening that the U.S., which has historically been a tough market for the company, was one of the better regions for Lumia—but it is nowhere near the blockbuster Nokia needed.

Now, for the second time this year, Nokia has reduced its earnings guidance, citing “competitive industry dynamics.” That’s code for, We’re getting whipped. The company announced that it is laying of 10,000 employees across the globe, shutting down factories, and divesting itself of Vertu, its luxury mobile phone business. That firm garishly outfitted Nokia’s devices in diamonds and pearls and then sold them at a high-markup. Nowadays, however you tart them up, people just don’t want Nokia’s phones anymore.

Nokia’s immediate problem is cash. Though it is significantly reducing its expenses—it aims to cut its run rate in its devices business to 3 billion euros by the end of next year—it will need to spend a lot of money to do it. The new cuts will cost the company a billion euros to implement, and that’s in addition to other restructuring expenses that Nokia has already committed to. Taking it all together, Nokia will have about 2.7 billion euros in net cash by the end of 2012, according to Morgan Stanley analyst Francois Meurnier. Moody’s, S&P and Fitch have all downgraded Nokia’s credit rating to junk status. If its business deteriorates further—which seems likely—the company’s position becomes extremely precarious. Nokia, which was founded in 1865, could go belly up by 2014.

When it dies, the primary causes of Nokia’s demise will be well known. It will be the same force that killed RIM, the same force that’s ravaging Sony. It’s the all-powerful software platform. Nokia, like RIM, always thought of itself as being in the device business. It made hardware, and it only cared about software to the extent that it needed code to run on those devices.

At its peak in the early and mid 2000s, the company fell victim to its own hubris. It began thinking of itself as an unassailable winner of the future, as a mature company that didn’t need to invest in the next big thing. Rather than spend its resources on building a next-generation software ecosystem—an OS that depended on novel interfaces and sensors, that allowed for outside development, that offered a brilliant user experience—the company “managed down” its cash by paying huge dividends and buying back its shares. Between 2003 and 2008, while Apple launched the iPhone and Google perfected its Android strategy, Nokia spent 27 billion euros just on dividends and repurchases. (And that was back when the euro was worth real money!)

When he took over late in 2010, Elop saw the writing on the wall. The famous memo he sent to the company before he adopted Windows—the justifiably alarmist “Burning Platform” memo—is one of the most clear-eyed internal diagnoses of corporate catastrophe that I’ve ever read. Elop pointed out that Nokia missed the boat on building a united software platform: “Our competitors aren’t taking our market share with devices; they are taking our market share with an entire ecosystem. This means we’re going to have to decide how we either build, catalyse or join an ecosystem.” He also fingered Nokia’s own inflated vision of itself. “We poured gasoline on our own burning platform,” he wrote. “I believe we have lacked accountability and leadership to align and direct the company through these disruptive times. We had a series of misses. We haven’t been delivering innovation fast enough. We’re not collaborating internally.”

All evidence suggests that Elop has moved mountains to improve the company’s product line-up and its culture since then. But the task he faces is just too gargantuan. Once you miss the boat on an ecosystem, it’s just about impossible to recover. There are too many moving parts to coordinate, too many different parties to please. It happened to Apple in the 1990s with the Mac—once Windows took over, Apple faced permanent decline in the PC business. Only by changing the rules of the game—by going entirely beyond the PC business—did it manage to rebound.

But the smartphone business is even more treacherous. To win here, Nokia needs more than just beautiful hardware and software. It needs to attract developers, but for that it needs consumers, and for that it needs a strong retail position, and for that it needs commanding marketing, and—see what I mean? The choreography of success is too demanding, especially when you’re up against rivals like Apple and Google, relentless competitors that never stop innovating.

Elop is optimistic, or at least he’s pretending to be. The company points out that it is receiving “specific support” from Microsoft that will allow it to release many lower-priced phones. It’s also banking on the release of Windows Phone 8, which should inspire some more excitement for the critically acclaimed but unpopular OS. And the company is working on ways to improve how its devices are sold in stores—stores that are currently dominated by salespeople who push iOS and Android and aren’t very familiar with Windows Phone.

But if Elop is still anywhere near as clear-eyed as he was when he wrote about Nokia’s burning platform, he’s got to be very, very worried. If the Windows Phone bet doesn’t work, there isn’t much else Elop will be able to do. He had one shot to remake Nokia. He took the boldest, biggest bet he could think of. There’s a better-than-even chance he’ll fail anyway, and soon.