Microsoft Corp MSFT-Q reported a better-than-expected quarterly profit on Tuesday as strong performance at its cloud services business helped offset a slump in the personal computer market, sending its shares 4% higher in extended trading.

The upbeat results from Microsoft, whose business spans cloud services, software, gaming and computer hardware, will likely allay fears of a meltdown in the tech industry that has laid off thousands of employees this year in anticipation of an economic downturn.

Microsoft said Azure cloud product revenue rose 31% in the second quarter, in line with estimates compiled by Visible Alpha, while its broader Intelligent Cloud division posted revenue of $21.5 billion, versus a Wall Street consensus of $21.4 billion compiled by Refinitiv.

Story continues below advertisement

Azure has also steadily grabbed market share from leader Amazon.com Inc’s Amazon Web Services (AWS).

Azure ended 2022 with 30% share in the cloud computing market, up from 20% in 2018, according to estimates from BofA Global Research. AWS dropped to 55% from 71% during the same period.

Sales at Microsoft’s More Personal Computing segment, which includes Windows, devices and search revenue, declined 19% to $14.2 billion as the PC market continued to shrink.

Microsoft’s revenue rose 2% to $52.7 billion in the three months ended Dec. 31, compared with the average analyst estimate of $52.94 billion, according to Refinitiv IBES.

Story continues below advertisement

On an adjusted basis, Microsoft earned $2.32 per share, compared with expectations of $2.29.