The Chinese delegation attending the International Monetary Fund's recent spring meetings in Washington returned to Beijing in an ebullient mood. China's first quarter growth had come in at a better than expected 6.4%. It was virtually the only major country where the economic outlook had been adjusted upward by the IMF.

Beijing took the moral as well as the economic high ground in Washington, as it has done in international forums since it became the object of U.S. wrath over its trade performance just over a year ago.

For most of the time since China entered the World Trade Organization in 2001, it has sold far more to the rest of the world than bought from it, accounting for 30% to 40% of current account surpluses worldwide. At the peak a decade ago, those surpluses amounted to almost 10% of China's gross domestic product.

But last year those surpluses dropped to just 0.4% of GDP from a peak of 9.9 % in 2007. Today, many economists predict that this year China will produce its first current-account deficit since 1995.

Once the source of global liquidity, China will in the future likely try to attract more of those capital flows itself. "China is moving toward becoming a net capital importer from being one of the largest exporters of capital globally," notes Shweta Singh of TS Lombard in a recent report.

Rather than financing deficits -- whether those of the U.S. or the rest of the world -- China will increasingly compete with other deficit countries in both the developed and developing world to import capital. Moreover, China will likely have fewer problems attracting capital from offshore than other deficit countries, precisely because its debt is now increasingly part of both world and emerging-market benchmarks.

The consequences for the U.S. could be especially severe.

For years, analysts have noted that China has financed a big part of U.S. deficits, which historically have been the mirror image of Chinese surpluses. Beijing has been either the largest or the second-largest foreign buyer of U.S. Treasurys, alternating places only with Japan in the rankings, according to Treasury Department data.

Among those warning that this will not be the case much longer is Zhu Min, a former top official at the IMF and a member of the recent Chinese delegation to its meeting in mid-April.

"Capital account imbalances have increased dramatically," said Zhu on his return to Beijing on April 19. "The U.S. has the largest deficits. It has to think about who will buy Treasurys in the future."

Indeed, China will likely not only buy fewer Treasurys in the future, it has even already begun to sell some of its holdings. Since June, Beijing has sold some $100 billion of its U.S. government debt, according to Goldman Sachs. "It looks more like normal foreign reserve management than active portfolio diversification," Goldman analysts concluded.

But last spring is exactly when friction with the U.S. ratcheted up. Moreover, other central banks also offloaded dollars in what was clearly a political move. Russia, for example, went from holding 46% of its foreign reserves as greenbacks last year to just 22%, increasing its holdings of yuan and gold at the expense of the dollar.

Zhu is not the only one to sound the alarm. "High and rising levels of government debt in many mature markets, notably the U.S., elicits few concerns in the current low-rate, low-inflation environment. Out of some $65 trillion in global general government debt, the U.S. government accounts for nearly a third ($21 trillion)," noted the Washington-based Institute of International Finance in a report in mid-April. "In fact," the report adds, "a recent poll suggests that reducing the U.S. budget deficit has declined in importance for the general public in recent years, even as pro-cyclical tax cuts feed into higher projected debt levels."

But it concludes: "While global financial stability risks may be limited as low/negative rates persist, rising leverage presents an array of medium- and long-term risks."

Nor is it clear that the U.S. economy is as strong as its current growth rate suggests. Many companies are spending their windfall from the Trump administration's tax cuts on financial engineering, devoting almost $1 trillion annually to share buybacks, often with borrowed money, rather than spending the money on investment.

The U.S. is not the only nation at risk from the shift in China's financial status. Others, especially in emerging markets, risk having a harder time attracting foreign capital to finance their own shortfalls. Indeed, increasing sovereign debt in emerging Asia helped drive global government debt to a record high of 50% of GDP, according to IIF data.

Indonesia, for example, has historically relied on foreign investors to finance around 40% of its perennial current account deficits, according to data from JPMorgan. India has also seen its borrowing rise dramatically in recent months. "At 170 billion rupees ($2.4 billion) of issuance every week, the gross issuance target is a 53% increase over the similar period from the last fiscal year," note economists at Citigroup.

The fact that the Chinese government and policy bank bond market is now part of international benchmarks, such as the Bloomberg Barclays Global Aggregate Index and the EM Local Currency Government Index, is therefore especially helpful as Beijing prepares to tap world markets.

Today, foreign investors represent less than 2% of holders of these bonds, but that is expected to change rapidly. Analysts believe that the inclusion could result in about $150 billion of inflows into Chinese yuan bonds before year's end, and that ultimately foreigners will raise their allocation to China from around 2% of their portfolios at present to 18%, reflecting China's growing economic heft.

At the margin, global investors will have less money for the U.S. and other credit-hungry nations. In other words, China will continue to be a headache for the rest of the world, albeit for very different reasons than in the past.