A worker prepares to unload Toyotas from a car carrier at Nagoya Port on July 31. Japan fell into red ink in goods trade for the first time in two months in July as the cost of energy imports surged. | BLOOMBERG

Japan logged ¥231 billion trade deficit in July as oil prices climbed

Japan fell into red ink in the goods trade for the first time in two months in July as the cost of energy imports surged, government data showed Thursday.

The ¥231.2 billion trade deficit followed the revised ¥720.8 billion surplus logged in June, the preliminary report from the Finance Ministry said.

Exports grew 3.9 percent from a year earlier to ¥6.75 trillion amid an increase in demand for electronic components from the rest of Asia, but were overshadowed by a 14.6 percent rise in imports to ¥6.98 trillion.

By the ministry’s definition, Asia refers to East, Southeast and South Asian countries and regions, including China, Taiwan, South Korea, Thailand, Indonesia, Vietnam and India.

Japan logged a surplus of ¥533.4 billion, up 15.2 percent, with those countries in July.

But with the Middle East, the main source of oil exports to Japan, the trade deficit surged 53.5 percent to ¥703.8 billion.

The deficit was also widened by an increase in pharmaceuticals from Ireland and aircraft made in Germany, bringing imports from the European Union to a record-high ¥889.6 billion.

On balance, Japan logged a ¥122.8 billion deficit against the region despite a rise in exports of construction and excavation machinery.

Against the United States, Japan scored a surplus of ¥502.7 billion, down 22.1 percent from a year before, as automobile exports fell.

Exports of steel, on which U.S. President Donald Trump placed a 25 percent tariff in March, were also down in both value and volume, though a ministry official who briefed reporters said the figures did not deviate much from data from the past several years.

Koya Miyamae, an economist at SMBC Nikko Securities Inc., said weak exports could hamper the world’s third-largest economy in the third quarter.

“Judging from the data currently available, overseas demand could drag down growth in July-September,” he said, adding that if the recent earthquake and torrential rains in western Japan were to blame for a temporary slowdown, exports will likely pick up again in August.

Against China, its biggest trade partner, Japan saw its deficit narrow 17.8 percent to ¥212 billion on robust demand for semiconductors and equipment for manufacturing liquid crystal displays used in smartphones and other devices.