New York CNN Business  — 

Microsoft’s big bet on the cloud may have just helped it rise above broader market jitters.

Microsoft (MSFT) said Wednesday that its sales for the quarter ending in September topped $29 billion, up 19% from the same period a year earlier. That growth was fueled in part by the company’s commercial cloud business, which soared 47% from the prior year to $8.5 billion.

The company’s stock rose as much as 4% in after hours trading Wednesday following the earnings results.

Microsoft is the first of the big five tech companies to report earnings after tech stocks briefly fell into correction territory this week. The market has suffered turbulence this month amid concerns about rising interest rates and an escalating trade war with China.

Under CEO Satya Nadella’s leadership, Microsoft shook up its internal operations to prioritize the cloud and demote its legacy business, Windows. The shift placed Microsoft near the front of the rapidly growing technology segment after years of struggling to compete in smartphones and online services like search.

Microsoft overtook Google in public cloud market share in 2016 and now ranks second only to Amazon, according to data from Synergy Research Group. In an investor note this week, Wedbush analyst Daniel Ives called it a “two horse race.”

And there’s plenty of business to go around for both companies. Global spending on public cloud services and infrastructure is expected to hit $160 billion this year and reach $277 billion by 2021, according to projections from IDC.

“We are seeing a clear inflection point in the field as more enterprises and government agencies make this transformational move” to the cloud, Ives wrote in the note.

In recent months, Microsoft has struck deals with Volkswagen and Walmart to provide cloud services. This month, Microsoft announced that it expanded support for “highly-classified workloads” as it competes with Amazon for a $10 billion Pentagon cloud computing contract.

Microsoft’s traction in this market has catapulted its stock to all-time highs this year and fueled its first ever $100 billion sales year. Morgan Stanley analysts predicted in March that cloud computing could push Microsoft to a $1 trillion market cap, joining Apple and Amazon in the race to that astronomical figure.