China’s economic rebound slowed in the second quarter but continued to show unusual resilience more than a year after the country largely got control of the coronavirus within its borders.

China’s factories delivered another stronger-than-expected quarter of output while its consumers beat lowered expectations, raising hopes that domestic spending might play a greater role in sustaining momentum in the coming months.

All told, China’s government said Thursday that gross domestic product grew by 7.9% in the second quarter from a year earlier, in line with economists’ expectations.

While that growth rate was far slower than the 18.3% year-over-year GDP jump during the first three months 2021, nobody expected China’s economy to sustain that pace of growth as the statistical distortions from last year’s pandemic crisis faded.

The second-quarter growth figure helped power China’s economy to a 12.7% expansion for the first half of the year compared with the pandemic-scarred first six months of 2020.

Beneath the headline GDP figure, stronger-than-expected readings on factory output, retail sales and fixed-asset investment data in June are likely to quiet rising speculation that Beijing will intervene more forcefully to keep its growth momentum going in the latter half of the year.

Last week, in a move that surprised many in the market, Beijing moved to free up more liquidity in the banking sector for lending, hinting at high-level concerns about slowing economic activity.

But further stimulus might not be needed. With the 12.7% first-half growth figure, policy makers now appear to have lots of cushion to hit their full-year growth target of at least 6%—even if the economy slows considerably in the second half.

Beijing has been careful in managing economic expectations this year, given the myriad uncertainties around the coronavirus pandemic and the global recovery.The growth target of 6% or more, set by China’s Premier Li Keqiang in March, was widely regarded by economists as being conservative. Many forecasters expect China to easily post 8% growth or more this year, given the low base of comparison from 2020.

Beijing has also signaled it would be comfortable with more modest growth this year as it resumes longer-term efforts—interrupted by the pandemic—to deal with deeper imbalances in the economy, including rising debt levels, runaway housing prices and an aging population.

Now, the unexpected second-quarter resilience could allow Beijing to sustain relatively fast growth while also tackling these longer-term issues.

Economic strength could be seen across the spectrum. Industrial output rose 8.9% in the second quarter and 8.3% in June compared with a year earlier, according to data released by the National Bureau of Statistics Thursday, beating expectations.