America's biggest foreign creditor is tightening its belt.

China's holdings of US government debt fell to a six-month low of $1.17 trillion in January, according to Treasury Department data published Thursday.

The country remains the top foreign holder of US Treasury debt -- a position its held for most of the last decade -- but its move to reduce its investments comes amid rising trade tensions between the world's two biggest economies.

China spent most of 2017 gobbling up more US debt. Its holdings of treasuries rose 13% during that year.

Related: China is America's biggest foreign creditor: Could it turn off the tap?

But in January, Bloomberg reported that China was looking to cut back on the amount of U.S. government debt it buys, citing unidentified sources. The report, which rattled markets, was denied by Chinese authorities.

"US treasuries are often used as a carrot during the political ping-pong match when trade tensions escalate," said Stephen Innes, head of Asia Pacific trading at investment firm Oanda.

The data published Thursday only cover the period through the end of January, so they don't include the most recent bout of trade tensions, such as President Donald Trump's recent decision to impose tariffs on steel and aluminum imports. In January, Trump slapped import tariffs on foreign solar panels and washers, in a move widely interpreted as a broadside against China.

Related: Trump and China: 2018 could get nasty

The US trade deficit in goods with China hit $375 billion last year, according to the Commerce Department, the largest with any trading partner. President Trump has been vocal about slashing that deficit.

Innes added that it would make sense for China to gradually reduce its holdings, given the US dollar has weakened by about 10% in the last year.

Ken Cheung, a currency strategist at Mizuho Bank in Hong Kong, thinks China will continue to slowly ween itself off US treasuries during 2018, but investors shouldn't expect a fire sale.

China "unwinding its US treasury holdings aggressively due to trade tensions remains unlikely," he added. Selling its holdings too quickly would cause the value of its remaining portfolio to fall, Cheung said, which China is eager to avoid.

The second-biggest foreign investor in US government debt is Japan, whose holdings inched up slightly to $1.07 trillion in January.