For the third time this summer, Shanghai issued its highest alert for extreme heat as temperatures appeared set to test records in China's most populous city on Thursday.

The city of 25 million residents announced a red alert, indicating temperatures were expected to rise to at least 40 degrees Celsius (104 Fahrenheit) over the next 24 hours.

In a three-tier warning system, construction and other outdoor work are to be reduced or halted under a red alert.

Shanghai has issued three red alerts in the past five days, though it is a relatively rare occurrence as the city has issued 17 such alerts since record-keeping began in 1873.

On Wednesday, the commercial and industrial hub sweltered as temperatures rose as high as 40.9 degrees C, matching a record set in late July, 2017.

The hot weather coincided with mass testing for COVID-19 in several districts this week amid minor outbreaks, upping the heat for both residents and Hazmat-suited health workers.

Some COVID-19 testers taped bottles of frozen mineral water to their white Hazmat suits as they worked, while others sat next to huge blocks of ice to cool off.

Some communities also began testing their residents in the evening when it was cooler.

"This suit is terribly hot," Peng Lei, who worked at a testing site, told Reuters.

"The clothes are never dry. All day long they are wet with sweat."

Half of China has been affected by the unusually hot spell during the past month. The Yangtze River basin - encompassing megacities from Shanghai to Chongqing in the heartland - has suffered heat waves over the past week.

By 3:30 p.m. (0730 GMT), 84 red alerts were in force across China, mostly in the Yangtze basin.

With higher demand for air-conditioning, China's maximum power load hit an all-time high of 1.22 billion kilowatts on Tuesday, the National Development and Reform Commission said on Thursday.

The state planner said it was making every effort to ensure energy supplies during the summer peak demand period. (Reporting by Albee Zhang, Xihao Jiang and Ryan Woo; Editing by Simon Cameron-Moore and Christopher Cushing)