By Martin Mou

Tencent Holdings' shares closed at a record high on Tuesday, amid a broad uptrend by Chinese internet stocks, which analysts widely expect to gain from a consumer shift to online services in a pandemic-stricken world.

Tencent's Hong Kong-listed shares touched their highest level of 498.60 Hong Kong dollars at midday and later settled 4.9% higher at their highest closing price of HK$497.40.

The internet giant's market capitalization is now at HK$4.551 trillion (US$587.17 billion).

Tencent, the world's largest mobile-gaming company by revenue, was no exception to the pandemic-triggered collapse in global equity markets in March, with shares slumping to around HK$330 that month.

However, Tencent's shares have been on a steady rise since then, as the broader market began to recover and, more importantly, the company reported a jump in first-quarter revenue, fueled by strong demand for mobile games from homebound Chinese consumers.

Among the 773 Asia-Pacific companies on the Dow Jones World Large Cap Index, Tencent was among the very few that said their business hadn't been hurt by the health crisis, while the rest have suffered revenue loss totaling billions of U.S. dollars.

The pandemic is likely to bring about a lasting shift in consumer behavior to embracing online services, Moody's said in a recent note.

"In this new environment, the largest technology firms will have a clear advantage," Moody's said.

Tencent shares have been on a winning streak since June 16, one day after a Chinese regulator approved new games titles for companies including Tencent and rival NetEase Inc.

Jefferies expects the release of more new games in the second half of this year to consolidate Tencent and NetEase's market-leading positions in the Chinese online-gaming sector.

China's leading tech companies have broadly outperformed the market since the pandemic. Shares in NetEase Inc., which completed its secondary listing in Hong Kong earlier this month, have gained 37% since the start of the year on Nasdaq.

Meanwhile, e-commerce giant Alibaba's Hong Kong shares have risen 29% over the past three months, compared with a 7.5% gain for the benchmark Hang Seng Index.

Write to Martin Mou at martin.mou@wsj.com