For years, China has relied on huge domestic savings to fund the investment that has powered its rapid economic growth. While President Xi Jinping has backed a shift toward unleashing consumption as an alternative driver of growth, Beijing has repeatedly been tempted to lean back on investment when growth has weakened, as seen in its recent economic data.

But China's incipient swing from net saver to global net borrower will make it harder to rely on state-led investment. This shift to running current account deficits instead of surpluses, which is likely to occur this year, ought to give the government motivation to accelerate much-needed reforms to open the country's capital markets to foreign investors.

Throughout its years of miraculous growth, China's high savings rate enabled it to run big current account surpluses and avoid the balance of payments crises that periodically plagued emerging markets in Latin America and elsewhere. By exporting its vast savings, China also helped hold down interest rates around the world.

Since the 2008 global financial crisis, China's current account surplus has steadily fallen as highlighted in the official government trade figures released Wednesday showing both an unexpected decline exports paired with a surprise gain in imports. All the while, China's capital account has strengthened, largely due to heavy-handed government intervention rather than inflows of free-ranging, yield-seeking capital.

Over the next few years, this position could well become untenable.

From a peak of 9.9% gross domestic product in 2007, China's current account surplus has melted away. In 2018, it came to just 0.4% of GDP. Over the same period, China's domestic savings rate has fallen faster than its investment rate, a development set to intensify this year and tip the current account into the red for the first time in 25 years.

All three components of China's economy -- companies, households and government -- used to save far too much. They still are savers, but on a smaller scale.

In the aftermath of the financial crisis, China's business savings rate plunged as exporters struggled. Business savings rebounded over the years 2012 to 2014 but have come under pressure again as profits have weakened.

China's household savings rate has recently declined in parallel, partly in response to structural policy changes designed to rebalance the economy from a focus on investment-led growth toward consumer spending. Such reforms include a strengthening of the welfare net, expanded medical care and pension provision, and tapping the spending potential of rural areas via e-commerce and other channels.

The government's savings rate has also fallen as it has tried to offset the deflationary impact of flagging exports and more recently, as it has sought to reduce leverage in the economy. Beijing's projection in March that its budget deficit will expand this year to 2.8% of gross domestic product from 2.6% last year suggests no break in this trend.

Even as structural rebalancing, government stimulus and dwindling business profitability push the overall domestic saving rate down, the investment rate is likely to creep up after falling each year between 2012 and 2016. Beijing does not want to repeat the massive post-crisis monetary stimulus of 2009-2010, but the gap between what China saves domestically and its investment needs is likely to widen, turning the country into a net international borrower.

The implications of this shift for China and the rest of the world are hugely significant. For a start, a deteriorating current account will put the yuan under pressure, all else equal, at the very time when it is politically imperative for Beijing to hold its exchange rate against the dollar broadly steady as part of the trade deal being negotiated with the U.S.

In the short term, China can draw on its $3.1 trillion stockpile of foreign exchange to plug any deficit. But in the longer run, it needs to do better at attracting foreign investors.

The inclusion of Chinese bonds and stocks in indexes such as the Bloomberg Barclays Global Aggregate Bond Index and the MSCI Emerging Markets Index is already leading to increased inflows of capital. But the impact of these inflows will fade once investors match benchmark weightings.

To get foreign investors to keep raising their exposure to Chinese assets, Beijing needs to let the yuan and interest rates both float freely and to liberalize its capital account instead of keeping domestic money dammed up at home. This would send a signal of confidence to foreign investors who, unlike domestic companies and banks, do not take their cue from Communist Party directives.

Beijing has already started down this path. In a series of announcements in January, regulators widened the scope of and access to the Qualified Foreign Institutional Investor, or QFII, program and doubled its maximum size to $300 billion. Other moves have also given foreign investors better access to domestic stocks and bonds.

But international investors not only want easier paths into China's markets, they also want to be sure they can get their money out at short notice. Instead, as the abrupt tightening of curbs on capital outflows in 2015 reminded them, crucial financial policy decisions can still change at the whim of the party. The authorities, of course, have always prioritized domestic stability in all its forms over the preferences of outsiders.

Scrapping capital controls would not be without risk. Volatility would rise and the yuan would have to be allowed to fluctuate more freely to cushion the impact of increased inflows and outflows.

However, the upside of trusting market forces would be considerable. Capital would be allocated more efficiently and the yuan would be come to be used more widely outside China, an important policy goal for Beijing.

If foreigners decide not to fund the embryonic current-account deficit, Beijing will have little choice but to slow its pace of investment.

Ramping up state spending on things like building railways and power stations may still be a short-term option to stimulate the economy, as the recent GDP report for the January-March quarter illustrated. But another extended credit-fueled investment splurge would be dangerous given that even President Xi has recognized that China's overall debt-to-GDP ratio, tallied at 253% as of last September by the Bank for International Settlements, has reached a level that poses a threat to the stability the party craves.

China's economic success over the last 40 years is incontrovertible. But as the country's current account swings into deficit and leaves it reliant on the kindness of strangers to finance the shortfall, maintaining its command-and-control economic model can only become harder.

Diana Choyleva is chief economist of Enodo Economics, a macroeconomic and political forecasting company in London