China's economy grew 0.4 percent from a year earlier during the April-June period, but the pace of expansion slowed against the backdrop of a prolonged lockdown in Shanghai, official data showed Friday.

The year-on-year gross domestic product figure underscored it will be difficult for the Communist-led government to attain its growth target of around 5 percent for this year while it continues with its radical "zero-COVID" policy to stem the novel coronavirus outbreak.

Photo taken in May 2022 shows deserted roads in Shanghai during a prolonged COVID-19 lockdown. (VCG/Getty/Kyodo)

The world's second-biggest economy saw its GDP shrink 2.6 percent in the second three-month period from the first quarter of 2022. It is set to keep suffering downward pressure due largely to tough restrictions to combat the COVID-19 pandemic and the disruption of the global supply chain triggered by the Ukraine crisis.

The latest figure of 0.4 percent year-on-year growth showed the worst performance since China's economy posted in the first three months of 2020 its first quarterly decline since 1992, as the coronavirus pandemic raged.

In the first half of this year, retail sales of consumer goods fell 0.7 percent from a year earlier, while investment in fixed assets, excluding rural households, increased 6.1 percent.

The industrial production of China, dubbed the "world's factory," gained 3.4 percent, with the total value of exports climbing 13.2 percent.

The National Bureau of Statistics said China's economy "has overcome the adverse impact of unexpected factors, demonstrating the momentum of a stable recovery."

But it also warned of external and domestic risks, saying "the risk of stagflation in the world economy is rising, the policies of major economies tend to be tightened," "the impact of epidemic is lingering" and "shrinking demand intertwines with disrupted supply."

The outlook for China's economy is gloomy as the Asian power has implemented full or partial lockdowns in dozens of major cities, with the highly contagious Omicron variant spreading, dampening corporate and consumer sentiment.

Many foreign companies have also become more reluctant to boost direct investment in China in the face of its drastic COVID-19 regulations, such as lockdowns and quarantines under strict surveillance by the health authorities.

Despite mounting fears over the Chinese economy, President Xi Jinping was quoted by the state-run Xinhua News Agency as saying last month, "If we make an overall evaluation, our COVID-19 response measures are the most economical and effective."

On March 28, China decided to lock down the commercial and financial hub of Shanghai with a population of 25 million, disturbing the domestic supply chain and logistics operations for more than two months through May 31.

Stringent quarantine rules prevented drivers from delivering goods under the severe lockdown, making it difficult for a large number of inhabitants to obtain adequate supplies of food and daily necessities.

All eyes are on whether the Communist Party will continue to adopt the zero-COVID policy until the end of its twice-a-decade congress in the fall, at which Xi is expected to secure a controversial third term as leader.

Following the economic contraction in the first quarter of 2020, China showed signs of a V-shaped economic recovery with business activities intensifying and consumption bouncing back, since the increase in new infections with the coronavirus apparently peaked in late February that year.

The Asian country was the only major economy to achieve positive growth in 2020. The following year, China's economy grew 8.1 percent, registering the sharpest expansion in 10 years.

During the January-March period this year, however, China's economy grew only 4.8 percent, with Premier Li Keqiang saying it is "not easy" for the central government to accomplish the GDP growth goal for 2022.