Just a few short weeks ago, Chinese state media were touting it as the place where people could realise what President Xi Jinping calls the "Chinese dream". But since then, that dream has turned into a nightmare for the millions of mainlanders who heeded the leadership's call to invest in the stock market. For a while, it looked like the gamble paid off. By the time the market peaked last month, it had risen by as much as 150 per cent since November. But the collapse took only a fraction of that time - the market lost about 30 per cent from its height of 5,166 on June 12 to hit a low of 3,631 at yesterday's session, wiping off more than 20 trillion yuan (HK$25 trillion), or the equivalent of Britain's gross domestic product, just in three weeks. Analysts said China would pay a high political, economic and social price for the tumble. The stock market fall would delay the slow economic recovery, complicate macroeconomic management, damage the government's credibility, trigger social discontent, and undermine the Communist Party's leadership under Xi and Premier Li Keqiang. The market is now in clear bear territory and more volatility is likely, conditions that will test the leadership if things do not improve soon. "The recent roller-coaster ride in China's stock market poses a challenge for the leadership," University of Nottingham professor of Chinese politics Hongyi Lai said. Lai said millions of small investors were upset over their losses and the slump would complicate the government's economic management. It also highlighted the need for the leaders to pay greater attention to macroeconomic issues in the near term. Economists said the government whipped up the stock frenzy to help it achieve its main policy goals by recapitalising cash-strapped firms and injecting money into the real economy. The idea was also to promote consumer demand in an economy awash with overcapacity and grappling with a growth slowdown. China's growth slowed to 7.4 per cent last year - the lowest in a quarter of a century - and GDP came in at 7 per cent in the first quarter, the slowest pace since 2009. Political economist Ma Guoxian, from the Shanghai University of Finance and Economics, said the government was gambling that investors' money would flow into the real economy and allow competitive companies to get the cash they needed to move up the technology and innovation ladders. But the repeated short, sharp falls in the stock market have undermined the improving economic signs and could trigger systemic risks in the financial sector. It would also prompt the government to scale back its bold reforms, particularly the overhauls in the politically sensitive financial and banking sectors. Analysts said the slump had tarnished the government's reputation because many believed the authorities were in large part responsible for the bubble. Indeed, the government has cheered on the rally via state media since the middle of last year, with officials talking daily about "an inevitable bull market". When the Shanghai Composite Index broke through the 2000, 3000 and 4000 barriers, hitting four-, five-, six- and seven-year highs, People's Daily declared: "4,000 points is just the beginning of China's bullish market". Xinhua, and the official China Securities Journal and Securities Times all joined the chorus, singing along with slogans such as: "The A-share market is where to realise the 'Chinese dream'", and "The stock market is facing a 30-year golden time". The debate now is on how the government will handle the challenges. Warwick University finance assistant professor Lei Mao said the government should not try to "help" build any kind of investor sentiment. "A well-functioning financial market should be a neutral place in which information gets aggregated objectively. It is not a place to realise or appreciate political successes, or condemn authorities," Mao said. "The Chinese government should learn that, when they aim to build a healthy and thriving financial market for everyone, they should act as neutral regulators, not push the market itself in any direction." Beijing-based political economist Laurence Brahm said he believed the government would continue its intervention. "Clearly the next step of the Xi-Li administration will be to intervene, stabilise the market, and push it back to higher levels this autumn on the back of political threshold dates," Brahm said. "While China is still experimenting, finding the balance between market and intervention, one thing is certain: they will use both tools as needed with unabashed pragmatism." Steve Tsang, chair of the University of Nottingham's School of Contemporary Chinese Studies, said the degree of the setback would depend on how it unfolded, how long the market stayed low, and how many were burnt. "The government's responses to the fall in the stock markets confirm that it remains essentially a Leninist party-state and will use all resources at its disposal to influence the market when things do not go the way it wants and potentially puts its legitimacy at risk," he said. Tsang said that although the downturn so far was not enough to gravely undermine the government's legitimacy or capacity to rule, it had no intention to let the market slide too far.