China's economy contracted in the three months ending in June compared with the previous quarter after Shanghai and other cities were shut down to fight coronavirus outbreaks, but the government said a "stable recovery" is under way.

The economy shrank by 2.6 per cent, compared with the January-March period's already weak quarter-on-quarter rate of 1.4 per cent, official data showed Friday. Compared with a year earlier, which can hide recent fluctuations, growth slid to a weak 0.4 per cent from the earlier quarter's 4.8 per cent.

Anti-virus controls shut down Shanghai, site of the world's busiest port, and other manufacturing centres starting in late March, fuelling concerns global trade and manufacturing might be disrupted. Millions of families were confined to their homes, depressing consumer spending.

Return to normalcy may take months

Factories and offices were allowed to start reopening in May, but economists say it will be weeks or months before activity returns to normal. Economists and business groups say China's trading partners will feel the impact of shipping disruptions over the next few months.

"The resurgence of the pandemic was effectively contained," the statistics bureau said in a statement. "The national economy registered a stable recovery." The ruling Communist Party is promising companies tax refunds, free rent and other aid to get back on their feet, but most forecasters expect China to fail to hit the ruling party's 5.5 per cent growth target this year.

Growth for the first half of the year was 2.5 per cent over a year earlier, one of the weakest levels in the past three decades. Retails sales were off 0.7 per cent from a year earlier in the first half after plunging 11 per cent in April. Investment in factories, real estate and other fixed assets climbed 6.1 per cent, reflecting the ruling party's effort to stimulate growth by boosting spending on public works construction and ordering state-owned companies to spend more.