Public anger in China towards continuing COVID-19 lockdowns has sparked rare protests in a number of major cities in recent days.
The latest demonstrations were prompted by a fire in a high-rise apartment block in the northwestern Xinjiang region on Thursday.
The fire, in the city of Urumqi, killed at least 10 people, and questions have been raised over whether China's strict lockdown policy stopped residents from escaping the flames.
Officials deny this, and a fire department spokesperson inspired further anger after appearing to blame residents for not being able to "rescue themselves".
Many Chinese cities have been under strict lockdown for months - many of Urumqi's four million residents, for example, have been unable to leave their homes for any reason since August.
In Shanghai on Saturday night, police used pepper spray on around 300 protesters who had gathered at Middle Urumqi Road with flowers and candles and holding signs that said "Urumqi November 24" in memory of the fire's victims.
A protester who gave only his family name, Zhao, told The Associated Press that one of his friends was beaten by police and two friends were pepper sprayed.
Mr Zhao said protesters yelled slogans including "Xi Jinping, step down, Communist Party, step down", "Unlock Xinjiang, unlock China", "do not want PCR (tests), want freedom" and "press freedom".
Reuters reported it had seen a video showing Beijing residents in an unidentifiable part of the city marching around an open-air carpark on Saturday, shouting "end the lockdown".
Sean Li, a resident of Beijing, told Reuters that a planned lockdown for his compound was called off on Friday after residents spotted workers putting barriers on their gates.
The residents had protested to their local leader and convinced him to cancel the plans.
Mr Li said: "The Urumqi fire got everyone in the country upset.
"That tragedy could have happened to any of us."
Urumqi, in Xinjiang, saw protests on Friday night, when a vigil for fire victims turned into an anti-lockdown demonstration.
People chanted "open up, open up", in videos that were shared on social media before being deleted by censors on Saturday.
But the protesters won some concessions, with parts of the city deemed low risk being given a bit more freedom from restrictions during the weekend.
Protests against government policy are rare in China but even more unusual in Xinjiang.
Xinjiang, home to China's persecuted Uyghur minority, has experienced some of the country's longest lockdown restrictions, with reports of people left starving earlier in the year.
China's zero-COVID policy was initially well-received by citizens, who saw it as minimising deaths while other countries were battling huge casualties.
But support has fallen in recent months as Chinese people tire of restrictions that go far beyond what was seen during the UK's lockdown, for example.
China is the only major country that is still fighting the COVID-19 pandemic with mass testing and strict lockdowns.