When countries around the world have stumbled in the face of pandemic headwinds, China has often stood apart, seemingly impervious to financial pressures that undermined growth.

But now, dragged down by its commitment to curbing the spread of Covid-19 with widespread lockdowns and mass quarantines, China has suffered one of its worst quarters in years, threatening a global economy heavily dependent on Chinese factories and consumers.

For the country’s ruling Communist Party, the downturn could put added pressure on Beijing at a sensitive moment. China is scheduled to hold its party congress later this year. A thriving economy and growing wealth was part of the bargain that Chinese citizens accepted in exchange for living under authoritarian rule.

But the lockdowns, a staple of Beijing’s zero-Covid policy, have heightened the risk of instability — both socially and economically.

The National Bureau of Statistics in China said on Friday that the economy expanded 0.4 percent from a year earlier in the second quarter, worse than some economists’ expectations. It was the lowest growth rate since the first three months of 2020, when the country effectively shut down to fight the early stages of the pandemic, and its economy shrank for the first time in 28 years.

The 2020 downturn was short-lived, with the Chinese economy recovering almost immediately. But the current outlook is not so promising. Unemployment is close to the highest levels on record. The housing market is still a mess, and small businesses are bearing the brunt of weakness in consumer spending.

“China is the shoe that has never dropped in the global economy,” said Kenneth Rogoff, a professor of economics at Harvard University and a former chief economist for the International Monetary Fund. “China is no position to be the global engine of growth right now, and the long-term fundamentals point to much slower growth in the next decade.”

This is an unwanted complication in a year when China is trying to project unwavering strength and stability. At the party congress, Xi Jinping, the country’s leader, is expected to coast to another five-year term, further cementing his grip on power.

In May, Li Keqiang, China’s premier, called an emergency meeting and sounded the alarm about the need to gin up economic growth to more than 100,000 officials from businesses and local governments. The stark warning cast doubt about China’s ability to reach its earlier growth target of 5.5 percent for the year.

But China is no longer growing by leaps and bounds. The Covid restrictions have combined with policies implemented in recent years — such as cracking down on speculation in real estate and curbing the power of China’s tech giants — to exacerbate the slowdown. So far this year, Starbucks, Nike and Hilton have all warned that weak spending in China had brought down sales.

While much of the world has learned to live with the coronavirus, China has adopted a zero-Covid policy to do whatever necessary to prevent infection. Under that policy, residents of an entire apartment building could be confined to their homes for weeks if a single tenant were infected. A few positive cases could cause an entire section of a city to lock down.

Even as the toll from those policies has become apparent, Mr. Xi has not flinched. He has said that he is willing to endure some temporary economic pain in order to keep Chinese citizens free from Covid.

The most recent economic malaise hit in April and May, when Shanghai, China’s largest city, went into lockdown for nearly two months and the impact rippled through the economy. Office buildings were closed, and workers were ordered to remain at home. Throughout China, hundreds of millions of consumers were shut in — leaving stores, restaurants and service providers to carry on without customers

Zheng Jingrong, an owner of a shop in Beijing selling imported handmade clothes,said she had typically sold 150 to 200 pieces of clothing in a month before the pandemic. In May, she sold 20. Her regular customers don’t come by anymore, she said, and people are generally reluctant to go out. Each year of the pandemic has been “worse than the year before,” Ms. Zheng said.

And the problem is not limited to her clothing shop. Ms. Zheng said more than 300 stores used to operate in the same neighborhood as her shop in Gulou, a maze of streets and alleyways once teeming with food stalls, cafes and bars. She estimated that 20 percent of those businesses were closing or had closed.

“Because China started booming and developing from the 1980s, its economy had always been going up,” said Ms. Zheng, who has run the shop for 15 years. “Now it’s obviously going down.”

Retail sales, an indicator of how much consumers are spending, fell 4.6 percent from a year earlier in April through June, according to the government. And even as the economy improved in June, the threat of further mass quarantines may derail a nascent recovery.

The Japanese securities firm Nomura estimated that, as of Monday, 247 million people in 31 cities were under some kind of lockdown in China, covering about one-fifth of the national population and accounting for the equivalent of around $4.3 trillion in annual gross domestic product. The number of affected cities nearly tripled from a week earlier.

Beijing has urged local authorities to step up measures to ensure job stability during lockdowns. And yet, with so many small and medium-size businesses suffering financially, the government has struggled to get a handle on rising unemployment.

As of June, unemployment stood at 5.5 percent — an improvement from April and May, but close to the highest level since China started reporting the figures in 2018. For job seekers ages 16 to 24, who include new college graduates, the unemployment rate was more than three times as high at 19.3 percent.

James Fu resigned from his job last month as a landscape designer for a property developer — a grueling job that he grew to hate. But now he’s dealing with the anxiety of finding a job in a tough labor market, especially in real estate.

Mr. Fu, 28, said fewer jobs were available at property companies because firms were either struggling financially or using the downturn to justify cutting staff and costs. And because the pool of jobs has shrunk, he said, the requirements to secure one have gone up.

“I’ve been at a standstill recently,” said Mr. Fu, who lives in Chengdu, Sichuan Province. “This year may be particularly difficult. I think it has been more difficult since the pandemic began.”

Along with the high unemployment, there are other signs of bubbling economic discontentment. On Sunday, there was a rare demonstration in the city of Zhengzhou in central China by depositors demanding their money back from four rural banks after their funds were frozen. The protests turned violent when authorities sent in guards to break up the demonstration.

Weakness in the property market has also lead to public displays of defiance. A growing number of property owners who bought homes before they were built have declared to banks and regulators that they won’t pay their mortgages, upset by delays in construction as well as declines in home prices, according to Chinese media.

When China implemented measures in 2020 to limit property speculation, it pushed many property developers into a debt spiral, depressing the prices of new homes for the first time in years and rattling the confidence of consumers, many of whom had plowed household savings into real estate.

In response to concerns about mortgage repayments, China’s banking and insurance regulator said that it would work across the central government and with local authorities to make sure buildings are finished, jobs are saved and “ensure stability” in the real estate industry, according to state-run television.