Japan posted a goods trade deficit of ¥18.71 billion in August for the first red ink in three months, with a firming yen pushing down the value of exports, government data showed Wednesday.

The value of exports dropped 9.6 percent from a year earlier to ¥5.32 trillion, down for the 11th straight month, affected by declining automobile exports to the United States and falling steel shipments, the Finance Ministry said in a preliminary report.

Imports tumbled 17.3 percent to ¥5.34 trillion for the 20th straight month of decline due mainly to lower crude oil prices.

"Exports remain stagnant as they are weighed down by continued sluggishness in the global economy as well as a firming yen," said Toru Suehiro, senior market economist at Mizuho Securities Co.

The yen climbed 16.8 percent in the reporting month from a year earlier to an average ¥103.24 per U.S. dollar, according to the ministry.

Exports to China, a major destination for Japanese products, fell 8.9 percent to ¥968.94 billion, down for the sixth straight month, while imports shed 15.4 percent to ¥1.31 trillion, down for the fifth month in a row.

Japan's shipments to the United States plunged 14.5 percent to ¥971.45 billion for the sixth consecutive monthly decline, while imports dropped 9.5 percent to ¥609.10 billion, down for six straight months.

Weakening goods exports to the United States such as automobiles may indicate that the world's largest economy had been hurt by a strong dollar and casting a shadow on private consumption, said Suehiro of Mizuho Securities.

Exports to the European Union slipped 0.7 percent to ¥590.77 billion for the fourth straight monthly decline, while imports plunged 12.4 percent to ¥673.28 billion for the sixth consecutive monthly decrease.

The figures were measured on a customs-cleared basis.