WASHINGTON — Foreign demand for U.S. Treasury securities fell for a second consecutive month in May even though China increased its holdings.

The Treasury Department said Tuesday that total foreign holdings declined 0.5 percent to $5.68 trillion. That follows a 0.3 percent decline in April.

China, the largest buyer of Treasury debt, increased its holdings 2 percent to $1.32 trillion. That followed a 1.6 percent increase in April, which was revised higher after an initially reported 0.4 percent drop. Japan, the second-largest buyer, trimmed its holdings 0.2 percent to $1.11 trillion in May.

Treasury debt held by foreigners is up 7.8 percent from a year ago. That suggests overseas demand for U.S. debt remains high despite prolonged congressional budget battles.