Foreign investors cut their holdings of U.S. Treasury debt in June for the first time in more than two years. The decline came at a time of anxiety about whether the United States would raise its borrowing limit.

China, the biggest buyer of U.S. Treasury debt, increased its investment for a third straight month. But Japan, the second-largest buyer, along with Brazil, Russia, Hong Kong, and a group that includes the Bahamas, Bermuda, the Netherlands and the Cayman Islands cut their investments.

Overall foreign holdings dropped 0.4 percent to $4.5 trillion. It was the first decline since April 2009.

Much of the decline was driven by private investors. Their net purchases of long-term U.S. Treasurys fell a record $18.3 billion in June. Net purchases are the difference between what investors buy and sell in one month.

The decline lowered private investors' overall foreign holdings by $15.1 billion.

Overall foreign holdings of governments, which include central banks, dropped only $1.7 billion. Governments account for roughly 72 percent of total foreign holdings of U.S. Treasury debt.

Congress and the Obama administration reached a deal on Aug. 2 that would allow the U.S. government to increase its $14.3 trillion borrowing limit by more than $2 trillion. It was approved hours before the U.S. faced a potential default on its debt.

The full increase is dependent on lawmakers reaching agreement on an equal amount of cuts to the deficit over the next decade. Up to $1.5 trillion of those cuts must be negotiated by a special committee of lawmakers over the next three months.

The total deficit cuts fell short of the $4 trillion in cuts that Standard & Poor's said was needed to achieve a credible deficit-reduction plan. As a result, S&P downgraded the U.S. government's credit rating from AAA to AA+.

Economists said investors likely worried about how the debate in Washington would be resolved, and those worries contributed to the overall decline. Many economists expect foreign holdings will drop further in July because the borrowing limit was not raised until August.

However, they predict foreign holdings will increase in August. Congress approved an increase in the borrowing limit, and Europe's debt crisis has made U.S. Treasurys more seem like a safer bet, they said.

"Now people are saying they want to hold U.S. Treasuries. They don't care what S&P said," said Chris G. Christopher Jr., senior principal economist at IHS Global Insight. "They are saying they have nowhere else to put their money."

In June, China increased its holdings 0.5 percent to $1.166 trillion.

Japan trimmed its holdings 0.2 percent to $911 billion. Britain, the third-largest foreign holder of Treasury securities, boosted its investment 0.8 percent to $349.5 billion.