SHANGHAI, April 18 (AFP) - Shanghai on Monday said three people had died from Covid-19, the first official announcement of deaths from an outbreak which has plunged the megacity into a weeks-long lockdown, sparking widespread anger and rare protests.

Since March, a patchwork of restrictions has kept most of the city's 25 million residents confined to their homes or compounds, with daily caseloads regularly edging over 25,000.

On Monday city officials revealed the first deaths -- all elderly people with underlying conditions.

They "deteriorated into severe cases after going into hospital, and died after all efforts to revive them proved ineffective," the city said on an official social media account.

The statement said two of the dead were women aged 89 and 91, while the third was a 91-year-old man.

The municipal health commission confirmed the deaths.

The eastern business hub posted 22,248 new domestic cases on Monday, according to the municipal health commission.

While relatively low compared to other global outbreaks, the figures extend the pattern of recent weeks which has seen the city log tens of thousands of daily cases, most of which are asymptomatic.

In response, authorities have doubled down on Beijing's longstanding zero-tolerance approach to the virus, vowing to persist with onerous curbs on movement and isolating anyone who tests positive -- even if they show no signs of illness.

Residents in Shanghai -- one of China's wealthiest and most cosmopolitan cities -- have chafed under the restrictions, with many complaining of food shortages, spartan quarantine conditions and heavy-handed enforcement.

Social media users ripped into authorities for the filmed killing of a pet corgi by a health worker and a now-softened policy of separating infected children from their virus-free parents.

In a rare glimpse into the discontent, videos posted online last week showed some residents scuffling with hazmat-suited police ordering them to surrender their homes to patients.

Other footage and audio clips have indicated increasing desperation, including some showing people bursting through barricades demanding food.

Despite the blowback, China, where the coronavirus was first detected in late 2019, is sticking to its tried-and-tested zero-Covid policy of mass testing, travel restrictions and targeted lockdowns.

But the world's most populous nation has recently struggled to contain outbreaks in multiple regions, largely driven by the fast-spreading Omicron variant.

The country last reported new Covid-19 deaths on March 19 -- two people in the northeastern rust belt province of Jilin -- the first such deaths in more than a year.