NEW YORK, Sept 16 (Reuters) - Foreigners bought long-term U.S. securities in July, after selling them the previous month, data from the U.S. Treasury Department showed on Friday.

Offshore investors purchased $103.9 billion in long-term securities in July after selling $500 million in June.

The June sales figure was previously reported at $3.6 billion.

Including shorter-dated securities, overseas investors bought $140.6 billion in U.S. assets, compared with a revised $194.5 billion sold in June.

Data also showed foreign investors sold U.S. Treasuries for a fourth straight month in July. They sold $13.1 billion in U.S. government debt, following $32.9 billion in sales in June. (Reporting by Richard Leong; Editing by Andrew Hay)