China reduced its holdings of U.S. Treasury debt in May as total foreign holdings of government debt posted a slight increase.

China's holdings fell by $32.5 billion to $867.7 billion, the Treasury reported Friday.

The report said that total holdings of Treasury securities edged up $5.8 billion to $3.96 trillion in May, a slight increase of 0.1 percent compared to April.

The Treasury said that net purchases of long-term securities, a category that covers not only U.S. government debt but also debt of U.S. companies, increased by $35.4 billion in May. That followed bigger gains of $81.5 billion in April and $141.4 billion in March.

While the May figure was down from the previous two months, analysts said it still reflected significant interest on the part of foreigners in holding U.S. government and corporate debt.

That demand has been spurred in recent months by a debt crisis in Europe that has prompted a flight to safety. U.S. Treasury securities are considered the safest investment in the world because the U.S. government has never defaulted on its debt.

Analysts said foreign demand has also been spurred by the fact that even though the U.S. economic recovery has been half-speed, the growth rates are still more than double what is occurring in Europe.

"The United States remains a safe haven for investments and remains a place where investors have confidence," said Gregory Daco, a senior economist at IHS Global Insight. "Growth is the key."

Daco said he expected investment would remain strong in coming months, in part because he said the outlook is for U.S. growth, even though it is slowing, to remain higher than European economic growth.

China is the largest foreign holder of Treasury securities. The 3.6 percent drop in China's holdings in May followed two months of increases. Those holdings are being closely watched because of concerns that at some point China might start shifting its investments out of Treasury securities into other investments, a move that would boost financing of America's huge budget deficits.

The federal deficit hit an all-time high of $1.4 trillion last year and is forecast by private economists to total $1.3 trillion this year.

The financial crisis which hit in the fall of 2008 pushed U.S. interest rates down significantly after foreign investors rushed to the safety of U.S. government bonds. That development helped reduce the costs of financing federal budget deficits even as though deficits have been surging.

Japan, the world's second-largest holder of Treasury securities, also cut its holdings in May, to $786.7 billion. That's a drop of 1.1 percent from April.

However, the United Kingdom, the third-largest holder, posted a 9 percent increase. Its Treasury holdings rose to $350 billion.

(This version corrects total figure for foreign holdings)