SHANGHAI, May 26 — Shanghai schoolchildren will gradually resume some in-person classes in June with daily Covid-19 tests, the local government said today, as the Chinese metropolis gradually emerges from a lengthy lockdown that brought it to a standstill.

The country has been fighting its worst coronavirus outbreak since the start of the pandemic, with the epicentre Shanghai banning its 25 million residents from leaving their homes for weeks.

Some of the city's restrictions have recently eased as cases dwindle, though much of the population is still not allowed to venture outside for more than a few hours a day at most.

Schools have been shut since March 12, weeks before the megacity's lockdown officially began.

Students in the last two years of high school -- who must prepare for the all-important college entrance examinations -- will return to their campuses on June 6, Shanghai education official Yang Zhenfeng said at a press conference on Thursday.

They will be joined a week later by students in the final grade of middle school, while all other students are to remain home and attend online classes, Yang said.

"We will ensure that students get swabbed on campus after school every day," with results from their PCR tests available by the next morning, Yang said.

Shanghai's lockdown has taken a heavy toll on business and morale, pushing city authorities to allow some factories and public transport lines to resume operation in a patchy reopening.

China is the last major economy hewing to a zero-Covid policy with mass lockdowns, routine tests and movement restrictions whenever infection clusters emerge.

Those who test positive for Covid -- even if they have no symptoms -- are sent to mass quarantine centres or isolation facilities.

In another sign of slowing infections in Shanghai, state media reported that a 7,300-bed makeshift quarantine centre had been closed Wednesday.

Converted from the Shanghai World Expo Exhibition and Convention Center, the hospital was the city's first large-scale quarantine site for patients with mild to no symptoms.

Patients who stayed there and in other makeshift quarantine halls complained to AFP of inadequate sanitary conditions and overworked staff.

China's zero-Covid approach has been severely challenged by the rise of the Omicron variant, which has caused hundreds of thousands of infections nationwide this year.

Authorities have also turned greater attention to the low vaccination rate among the elderly population, long a weak point in the country's defense against the virus.

Officials have ramped up incentives for older people to get jabbed, including one neighbourhood near Beijing's Temple of Heaven which is dangling as much as 1000 yuan ($149) in gift cards for residents over 80 who get their first shot. — AFP