Japan's trade surplus shrank 0.2 percent in July from a year earlier to 860 billion yen for the second straight month of contraction as surging oil prices inflated the value of imports, the Finance Ministry said Wednesday.

Exports increased 14.2 percent to 6.32 trillion yen, led by auto exports to the United States, while imports climbed 16.8 percent to 5.46 trillion yen, the ministry said in a preliminary report.

Imports of crude oil jumped 25.0 percent to 942.86 billion yen on a customs-cleared basis due to a record-high average of $67.9 a barrel, up 27.5 percent from a year earlier.