China’s economy is moving in wrong directions. In many ways, the rest of the world is bound to suffer as a result.

The most important driver of events in 2017 could very well be the Chinese economy, which is shaking the country’s political system and affecting its external policies.

Beijing, which once thought it would dominate the world, has been playing defense for the last year and a half as almost no economic trend has been going its way.

Next year, China’s economy will more resemble the turbulent 2015 than the relatively calm 2016. The measures employed to stabilize the situation, which looked like they worked in the beginning of this year, have only made it more difficult for Chinese technocrats to rescue the situation in the longer term.

We start on the 14th of this month, when Janet Yellen inadvertently highlighted China’s fragility. The Federal Reserve’s hawkish comments on interest rates—the central bank signaled three rate increases next year instead of the expected two—along with the quarter-point rise in rates forced bond prices down across the world. In China, the damage was historic.

Last Thursday, just a few hours after the Fed’s announcements, futures on China’s benchmark 10-year obligation stopped trading when they hit the daily down limit, the first time that has ever occurred. Trading on the five-year also was halted, another first. The People’s Bank of China, the central bank, injected the equivalent of $22 billion in short-term money, and that allowed trading to resume.

The next day, bond prices recovered in China, but only because the PBOC injected more than $57 billion. Beijing, by brute force, was able to stabilize the bond market, already rocked by defaults and cancelled offerings.

And the Chinese central bank has also muscled the currency markets by orchestrating rescues. The renminbi is ailing, down 6.9% this year against the dollar. Beijing once had ambitions of the “redback” replacing the greenback as the world’s reserve currency, but now it is merely trying to stage an orderly descent.

If the renminbi were allowed to float and if there were no capital controls, Chinese money would become worthless. China’s people and businesses certainly don’t want to hold it, and increasingly the same is true for foreigners. International use of the renminbi, even in the face of Beijing’s strenuous efforts, has declined this year.

Last year, there was $1 trillion of net capital outflow according to Bloomberg . This year, despite the imposition of draconian capital controls, the outflow could approach last year’s astounding total. And those controls, which are now failing to prevent capital fleeing, are working against Beijing’s efforts to attract investment cash from the outside. Few want to invest in China because repatriation risk is high and growing.

Many people, pointing to China’s forex reserves, don’t worry about a tumbling currency. The State Administration of Foreign Exchange, the custodian of the country’s forex hoard, reports that those reserves amounted to $3.05 trillion as of the end of last month.

Yet that number is almost certainly too high. Beijing has been engaging in dubious practices designed to hide the depletion of reserves caused by the support of the renminbi. For instance, there is incomplete reporting of its use of forward contracts to mask its selling of dollars, a trick Chinese technocrats learned from Brazil in 2013.

More important, Beijing has used its reserves, which are supposed to remain liquid, for long-term investments, such as the so-called One Belt, One Road infrastructure projects, and for loans to Venezuela and other risky borrowers. The reserves have also been deployed to capitalize China Investment Corp., the country’s sovereign wealth fund. No one outside a small circle in Beijing knows the amount of these ill-liquid investments, but they amount to at least $400 billion.

Finally, SAFE’s monthly announcements of changes in the reserves are questionable. It has continually been announcing monthly declines smaller than the estimates of analysts, a sign of deliberate misreporting.

In short, China’s liquid reserves are, in all probability, substantially less than Beijing claims, which means the country may soon run out of ammunition to defend the sagging renminbi. The liquid reserves are almost certainly far smaller than the $2.8 trillion IMF guidelines recommend China maintains.

None of this would matter if China’s economy were growing fast. The official National Bureau of Statistics has announced that gross domestic product increased 6.7% in each of the first three quarters of the year. Many observers believe growth is more likely to be half that figure.

Yet even if China is growing at a 6.7% clip, the country is creating debt at least five times faster than incremental GDP. At the moment, the debt-to-GDP ratio could be as high as the 350% that George Soros noted in January at Davos or the 400% that the respected Orient Capital Research in Hong Kong estimated at the beginning of this year. In any event, debt is far too high and its rate of accumulation much too quick.

Beijing can continue its rescue efforts for some time—perhaps years—because it runs an increasingly state-dominated economy, but state economies tend to fail spectacularly when they go.

Why? Underlying imbalances build up while leaders postpone downward adjustments, like they have been doing, especially since 2008. They will continue to intervene until they no longer have the ability to do so. When they no longer have that ability, their economy will go into free fall.

And the election of Donald J. Trump makes the work of Chinese leaders far more complicated. If the 45th president engineers a recovery in growth in America with lower taxes and less regulation, even more money will flow back across the Pacific and make it almost impossible for China to avoid a severe contraction.

A severe contraction has implications for Xi Jinping, China’s wilful leader. He has taken over much of the economics portfolio from Premier Li Keqiang, a long-term rival, and therefore has made himself the “Chairman of Everything.” As such, Xi has become responsible for all economic developments, but he can neither control them nor solve problems. China’s economy could very well be past the point of no return, and so Xi’s hold on power cannot be as firm as many suggest.

Already, there are hints that the country’s severe economic problems have affected the still-incomplete leadership transition from Hu Jintao to Xi. Premier Li, from the same political faction as Hu, and Xi clashed in July over the role of state enterprises in the economy . In May, Xi tried to take down Li by criticizing his debt-fueled policies in the pages of People’s Daily, the most authoritative publication in China, by arranging for an “authoritative person” to warn of a “systemic financial crisis.” Senior figures this year could not keep their disagreements out of sight, and the feuding is a sign of a fracturing leadership team.

Infighting at the top, over economic and other issues, affects the country’s external policies. As civilians like Xi and Li squabble, the generals and the admirals of the People’s Liberation Army are gaining political influence.

We saw hints of PLA power when Bo Xilai, one of the country’s most popular political figures, ran to the headquarters of the 14th Group Army in Kunming in February 2012, during the time of his desperate maneuverings.

Xi’s purges of Bo and the infamous Zhou Yongkang, the former internal security boss, were related to their apparent collusion with PLA elements. This collusion is what made their defiance especially dangerous to Xi.

All this suggests China’s flag officers have now eased into a powerbroker role. The military lost political power in the 1990s as China transitioned from Deng Xiaoping, a military officer, to Jiang Zemin, a civilian.

But the PLA has been making a comeback since the turn of the century as civilian leaders enlisted flag officers in their political struggles with each other, something apparent in the transition from Jiang to Hu Jintao.

And apparent in the transition from Hu to Xi. Once attaining the top spot, Xi has looked to certain officers to be the core of his political support. As a result, these generals and admirals now wield great influence over him, who relies on them for their backing. And Xi’s military support becomes more crucial to him as his popularity among civilian officials erodes, something evident from a series of acts of defiance in public in March.

At the moment, China’s general officers, pursing their “military diplomacy,” seem to be setting and implementing Beijing’s external policies, and this process has made those policies more provocative.

The weakening of China’s economy and its increasing belligerence are occurring in tandem, and the progression from one to the other appears to be related. For one thing, a deteriorating economy will undermine Xi Jinping’s bold efforts to consolidate power, and the resulting disunity will surely make China’s external posture unpredictable.

The country could turn inward, but lashing out looks more probable, especially if Chinese leaders think the decline in the economy will close a window of opportunity to achieve historic goals, like enlargement of Chinese control over neighboring lands and peripheral seas.

China’s economy is moving in wrong directions. In many ways, the rest of the world is bound to suffer as a result.