The U.S. Treasury building in Washington, D.C.The U.S. Treasury building in Washington, D.C.

China's holdings of U.S. debt have fallen for the first time in 12 years due to rising interest rates.

In May, China's government debt fell to $980.8 billion, continuing a trend that began early in the year. There was a decline of nearly $23 billion from April and a decrease of nearly $100 billion from a year ago.

China's holdings fell below the $1 trillion mark for the first time in more than a year. Japan now holds more U.S. debt than any other country.

The moves came as the U.S. Federal Reserve raised its rates. Capital losses for investors who sell bonds ahead of maturity are caused when rates rise.

China's share of the foreign debt portfolio has fallen due to the nation trying todiversify.

The reporting period came before the Fed hiked benchmark overnight borrowing rates by 0.75 percentage point in June.