NEW YORK - China increased its holdings of Treasuries in July for the first time in eight months, while Japan reduced its U.S. government debt load, data from the U.S. Treasury department showed on Friday.

China's stash of Treasuries rose to $970 billion in July, from $967.8 billion in June, which was the lowest since May 2010 when it had $843.7 billion.

Japan, on the other hand, reduced its Treasury debt holdings to $1.234 trillion in July from $1.236 trillion the previous month. Japan remains the largest non-U.S. holder of Treasuries.

The fall in Japan's holdings was more or less in line with moves in the currency market. The yen firmed in July against the greenback, ending the month at 131.6 yen per dollar, from 135.22 yen at the beginning.

The yen's steep fall against a resurgent dollar this year has raised the prospect of Japan intervening in the market to boost the Japanese currency. Since the beginning of 2022, the yen has fallen 19.5% versus the dollar.

Overall, foreign holdings of Treasuries rose to $7.501 trillion in July, from 7.430 trillion in June.

On a transaction basis, U.S. Treasuries saw net foreign inflows of $23.12 billion in July, down from $58.9 billion the previous month. U.S. Treasuries have posted foreign inflows for a third straight month.

The inflows generally tracked price action in the Treasuries market. The benchmark 10-year Treasury yield started July at 2.904%, and ended the month at 2.642%.

In other asset classes, foreigners sold U.S. equities in July for a seventh straight month amounting to $60.32 billion, from outflows of $25.36 billion in June. July's outflow was the largest since March.

U.S. corporate bonds posted inflows in July of $8.78 billion, slightly down from $13.99 billion in June. Foreigners were net buyers of U.S. corporate bonds for seven straight months.

The Treasury data also showed U.S. residents once again sold their holdings of long-term foreign securities, with net sales of $27.2 billion, from sales of $50.5 billion in June.

(Reporting by Gertrude Chavez-Dreyfuss Editing by Chris Reese and Jonathan Oatis)