New York CNN Business  — 

Apple has officially been dethroned as the world’s most valuable company.

After flirting with reclaiming the title all week, Microsoft (MSFT) passed Apple on Friday and ended the day as the most valuable company, with a market cap of $851 billion.

Both companies remain well below the $1 trillion milestone that Apple and Amazon hit earlier this year.

Apple (APPL) first passed Microsoft to become the world’s most valuable company in 2010, as its consumer hardware business thrived while Microsoft’s floundered. Now, Microsoft is thriving in large part by focusing not on consumers, but enterprise customers.

Under CEO Satya Nadella, Microsoft has made a years-long bet on cloud computing. This has positioned Microsoft as one of the two dominant players — along with Amazon (AMZN) — in a fast growing market, and propelled the company to its first $100 billion sales year.

Apple, meanwhile, has seen its stock plunge amid concerns about sagging demand for the new lineup of pricey iPhones and its decision to stop disclosing unit sales for smartphones — not to mention a report earlier this week that President Donald Trump is open to placing tariffs on the iPhone.

Microsoft doesn’t have to worry about the “flat-lining” market for smartphones plaguing Apple, says Dan Morgan, senior portfolio manager at Synovus Trust. Neither is it particularly vulnerable to an exodus of social media users over privacy concerns.

“Microsoft’s huge strides that it has made in the cloud space … is more enterprise focused,” Morgan says. That “has allowed [its] shares to outperform its tech brethren.”

Daniel Ives, an analyst with Wedbush, tells CNN Business that Microsoft has “almost been Teflon-like.” The company is “continuing to hum along,” even as “many of their well-known tech peers [are] going into major stumbling blocks.”

Google and Facebook are increasingly in the crosshairs of regulators over data privacy. The latter has seen its market value fall as much as 40% from its peak in July as investors worry about the long-term privacy backlash.

Yet, in an odd twist of fate for Microsoft, which was sued 20 years ago by the United States for engaging in anticompetitive behavior, regulation is suddenly one of its strengths in the tech industry.

“For the first time in two decades, Microsoft is on the right side of the regulatory discussion,” says Brad Reback, an analyst who tracks Microsoft at Stifel. “There is no regulatory issue with Microsoft. They are just going about their business.”

In 2018, when tech companies are caught up in trade wars and foreign election meddling, just going about your business is enough to stand out from the pack.