It's a strange time to pick a fight with your biggest lender.

President Trump is considering more tariffs that would punish China. But he needs China more than ever in the coming years to pay for the U.S. government.

China is by far the largest holder of Treasuries, the debt that the United States sells in the form of bonds when it needs to borrow money. China's holdings climbed 13% to $1.18 trillion last year.

And the United States is about to sell even more debt. The Republican tax cuts and the federal budget deal will require even more borrowing. The Committee for a Responsible Federal Budget estimates the deficit could swell to $1 trillion next year.

Someone has to buy all that extra debt. If there isn't enough demand, the Treasury — meaning U.S. taxpayers — will have to pay higher interest on the bonds to entice investors to buy. Because other kinds of debt, like mortgages, follow Treasury rates, that will raise the cost of borrowing for businesses and people.

Why does China own so much U.S. government debt? Partly because of the trade gap between the world's two largest economies. China exports goods to the United States. The United States, in a way, exports dollars to China.

"They have to buy something with those dollars," said Guy LeBas, chief fixed income strategist at Janney Capital Management. The only way China's purchases of Treasuries will fall is if the trade deficit begins to decline, he added.

The market for U.S. debt was rattled last month when Bloomberg News reported that China was souring on Treasuries. Many analysts interpreted the unattributed comments in that report as a warning shot from Chinese officials to the United States.

But it was a fairly empty threat.

Related: China has boosted its huge stash of U.S. government debt

"It's a problem for China to simply start to sell Treasuries because if they dumped them, it would drive down the value of their own holdings," LeBas said. "Even buying more slowly is tough because they have to do something with the dollars."

If the Trump administration achieves its goal of significantly narrowing the trade gap with China, one bad consequence is that China will have fewer dollars — and thus less appetite to buy U.S. Treasuries.

In other words, if Trump does what he has promised to do, it could cause alarm in the bond market and raise borrowing costs.

But if the trade gap stays at the current level or keeps growing, as it did last year, experts are still concerned that China won't have the appetite to buy all the new American debt coming to the market.

Some projections have the amount of debt up for sale doubling by the end of next year because of the growing government deficit.

Related: Did Trump just start a trade war with China?

"That's something I do worry about," said Tom Simons, a senior economist at Jefferies. "Even if the anticipation of economic growth paying the tax cuts is true, that won't be realized for a couple of years. They have to look under every rock to find people to buy their debt."

The Trump administration is talking tough about narrowing the trade gap with China. It is considering steep tariffs on steel and aluminum imports, action that would curb Chinese exports here.

China has already vowed to take steps "to defend our rights" to keep steel and aluminum exports flowing to the United States.

The administration has already imposed tariffs on solar panels, most of which come from China, and on washing machines, which are imported primarily from South Korea and Mexico.

Correction: An earlier version of this article misstated the pace of the increase in China's holdings of U.S. Treasuries. It also contained an inaccurate quote about the impact of a shrinking trade deficit on purchases of U.S. Treasuries.