Four years ago to the day, Microsoft hit bottom. That's when the company posted its first-ever quarterly loss. Doubt swirled about whether longtime CEO Steve Ballmer had the vision to pull what had once been the world's most valuable company out of a prolonged slump precipitated by Microsoft's utter failure to anticipate or adjust to the mobile revolution.

From that low point, Microsoft tried to regain its footing on the long path back to prominence. It was sometimes rough going. Google passed Microsoft in market cap. The company bought one-time Finnish cell phone giant Nokia for billions only to take another big loss after the acquisition floundered. Finally, Ballmer stepped down. But doubts lingered.

"Microsoft has lost its ability to inspire—not only in terms of inspiring people to do great development work, but even to inspire them with confidence," we wrote not long after Satya Nadella took the helm as CEO.

Not so much anymore.

The Nokia acquisition now safely behind it, Microsoft has delivered four quarters of profits in a row. The company revealed today that not only did it beat analyst expectations, it once again doubled the revenue from Azure, gaining the scale that CFO Amy Hood says will make the cloud service more profitable. Microsoft's oft-mocked search engine Bing, meanwhile, has now claimed more than one-fifth of the search market. If you add AOL and Yahoo, which use Bing to power their search services, Microsoft has now captured more than one-third of Internet searches. Microsoft's transformation from a company that sells boxed software to one that sells services in the cloud is well underway.

That's on top of savvy moves like finally making good with the open source community it once dismissed and snapping up kid-favorite computer game Minecraft. Once it was easy to wonder whether Microsoft could stay relevant as Apple, Amazon, and Google soared in influence over the tech industry and people's daily lives. It's hard to question Microsoft's relevance today.

Not everything is perfect, of course. Microsoft's failed phone ambitions are still dragging down its hardware division. Its aggressive Windows 10 installation tactics have alienated many users. It's still not clear how much money it's actually making from the cloud, and it's too early to say how well its pending acquisition of LinkedIn will pan out.

Microsoft hasn't retaken its crown as the most highly valued company in the world. Apple and Alphabet are both worth more. But with a current market cap of $419 billion, third place isn't so bad. The dark days of 2012 are starting to look like a mere bad dream.