The fear that gripped financial markets this month is a stark one: That China's economy might be slipping into a decline that could persist for years.

But the world's second-largest economy isn't collapsing — certainly not yet, anyway. What's really in freefall is confidence in its leaders, once seen as wielding near-mythic power to keep their economy growing at a propulsive pace.

Global stock markets have sunk — and gyrated — as investors have wrestled with their doubts. The Dow Jones industrial average has lost nearly 1,000 points since China's surprise move to devalue its currency Aug. 11. That step, in part an effort to align the yuan with market forces, was also seen by investors as a desperate bid to fuel exports in a faltering economy.

"The incredible faith in the Chinese policymakers has been shaken," says Ruchir Sharma, head of Morgan Stanley's emerging markets equity team.

For all its woes, China still outruns every other major economy. For 2015, while the nearly healthy U.S. economy will expand perhaps 2.5 percent, even most pessimistic analysts predict that China's will grow at least 5 percent . Yet its growth has decelerated for four straight years.

And a series of bungled decisions have escalated doubts about Beijing's economic stewardship. The skepticism is rising just as China is pursuing one of the most daunting transitions in modern economic history — from overheated growth, driven by exports and often-wasteful investment, toward slower and sturdier growth fueled by spending from an emerging middle class.

The leadership's miscues have multiplied, starting with its handling of the stock market. To try to cushion the pain from a slower economy, the government deployed state-run media to promote stocks for inexperienced individual investors. The hope was that Chinese companies could issue shares into a rising market and use the proceeds to finance growth and shrink their heavy debt levels.

Untethered from economic reality, Chinese stocks took wing. The Shanghai Composite Index rocketed 150 percent in the year through mid-June, propelled in part by individuals who poured money in, often on borrowed funds, confident that their government wouldn't steer them wrong.

On June 12, the bubble burst: Shanghai stocks have since tumbled 37 percent, though they remain 47 percent above where they were a year ago.

Beijing, abandoning a pledge to let market forces play a bigger role in the economy, tried futilely to stop the freefall. It suspended trading in many companies, restricted the use of borrowed money for some trades and banned big investors from selling their stakes for six months.

"The bubble pops, and they intervene and it doesn't work," says Derek Scissors, resident scholar at the conservative American Enterprise Institute.

Beijing suddenly looked like something less than omnipotent.

Then, on Aug. 11, China devalued the yuan. The government said the move was a nod to reality: Investors were signaling that the currency was overvalued. And the United States and the International Monetary Fund had long urged China to let market forces play a bigger role in the yuan's exchange rate.

Yet the decision surprised investors and aroused suspicions that it was a bid to drive up exports, which tumbled more than 8 percent in July from a year earlier. (A lower-valued yuan gives Chinese goods a competitive edge overseas.) And Beijing has since sent confusing signals, sometimes intervening to keep the yuan from falling too fast.

The episode led investors to take a more skeptical look at the Chinese economy. China's economic statistics have always been dubious. Premier Li Keqiang once acknowledged that its growth figures were "man-made" and unreliable.

The official unemployment rate is laughable: It's remained between 4 percent and 4.25 percent — and almost always precisely 4.1 percent — every quarter for the past five years, according to Trading Economics.

Some analysts have sought alternative ways to gauge China's economic performance — electricity consumption and freight shipments, for example. The London firm Consensus Economics asked several economists to provide alternative forecasts based on unconventional measures.

They predicted that China's economy would grow 5.3 percent in the year ending in the fourth quarter of 2015, well below conventional forecasts near 7 percent. Morgan Stanley's Sharma suggests that the economy is growing 5 percent "at best" this year.

Still, compared with other major economies, that's a brisk pace. And there's some evidence that China has managed to begin transitioning toward growth based on consumption and services. Retail sales, for example, rose 10.5 percent in July from a year earlier despite the economy's overall deceleration. And from January through March, U.S. services exports to China rose 8 percent even as manufacturing exports fell 9 percent.

China's authorities, though, are pursuing a transition on a magnitude never seen before. And their recent stumbles have prompted a more critical appraisal of the policymakers' earlier decisions. After the global financial crisis in 2008, for instance, they enacted a stimulus program — spending on roads and other infrastructure and ordering state-owned banks to lend freely.

Yet the stimulus came at the cost of a surge in debt: McKinsey & Co. says China's public and private debt quadrupled to $28 trillion in 2014 from $7 trillion in 2007.

Sharma, who studied other countries with big debt run-ups, found that all later suffered severe slowdowns. The reason: When banks lend at a frenzied pace, they make many bad loans, leading eventually to a growth-killing credit crunch.

The only good thing about the recent financial market tumult, Sharma says, is that it leaves the world with a more realistic view of Chinese leaders.

"The blind faith that they could achieve whatever growth rate they wanted to — it's amazing so many smart people thought that," he says.