Shanghai authorities on Tuesday began dismantling fences around housing compounds and ripping police tape off public squares and buildings, to the relief of the city's 25 million residents, before a painful two-month lockdown is lifted at midnight.

On Monday evening, some of the people allowed out of their compounds for brief walks took advantage of suspended traffic to congregate for a beer and ice cream on deserted streets, but there was a sense of wariness and anxiety among residents.

Most will be stuck indoors again until midnight, as they have been for the past two months under a ruthlessly enforced lockdown that has caused income losses, stress and despair to millions struggling to access food or get emergency health care.