Gloomy results from Alphabet and Microsoft stoked fears of a global economic downturn and derailed an earnings-led surge in stock markets on Wednesday, while setting the tone for results from other megacap technology giants.

The Nasdaq tumbled nearly 2% as the results underscored the fallout of strong dollar and weak demand on the tech sector against the backdrop of high inflation and rising borrowing costs.

Shares of the Google-parent and Microsoft fell about 8% in early trading. Meta Platforms Inc, which will report after markets close, was down 4%, while Amazon.com Inc lost 4% and Apple Inc 1% in the run-up to their results on Thursday.

Heavyweights Netflix, Meta, Amazon, Microsoft, Alphabet and Apple have already lost a combined market value of more than $2.5 trillion so far this year and were set to shed another $330 billion on Wednesday.

"The results of the big technology firms were seen as a key determining factor in market sentiment going into the U.S. third quarter reporting season and both Microsoft and Alphabet have given investors reason to worry," said Laith Khalaf, head of investment analysis at AJ Bell.

Alphabet missed Wall Street's target for revenue growth in the third quarter as ad sales remained weak, while inflation and a strong dollar led Microsoft to report its slowest topline growth in five years.

At least 21 analysts cut their price target on Alphabet, lowering it by as much as $36, while 17 of them brought down their targets on Microsoft.

With analysts predicting a pullback in budgets for advertising due to rising prices, investors fear that Meta's business too could come under pressure as it revenue relies heavily on ads.

"Investors will be bracing for Meta's results with some trepidation, with a common thought being that if Google's struggling, the rest of the tech pack faces a marathon climb," said Sophie Lund-Yates, an analyst at Hargreaves Lansdown.

For Meta, Google Search's soft results are worrisome while YouTube and Snap weakness suggest that macro and ad targeting challenges continued in the third quarter, JMP Securities analyst Andrew Boone wrote.

Meanwhile, a slowdown in growth at Azure, Microsoft's cloud platform and one of its most successful businesses, raised worries around Amazon's cloud business.

While most Big Tech stocks have edged higher in the past few weeks, overall it has been a bleak year for the sector that has lost roughly 15% to 60% of their value.

Wednesday's selloff also hit Europe's tech index, falling 2.3% to lead sectoral losses in the region.

(Reporting by Yuvraj Malik, Akash Sriram and Nivedita Balu in Bengaluru; Editing by Saumyadeb Chakrabarty and Arun Koyyur)