Japan posted a trade deficit of 930.48 billion yen ($6.3 billion) in August after the imposition of trade restrictions by China led to the biggest drop in food exports to the Asian neighbor in about 12 years, Finance Ministry data showed Wednesday.

It was the second straight month of red ink for Japan as exports fell again in August, down 0.8 percent from a year earlier at 7.99 trillion yen, despite robust auto shipments to the United States. Imports fell 17.8 percent to 8.92 trillion yen, a year after energy imports surged.

The latest data came amid concern about slowing overseas demand for Japanese products, particularly from major trading partner China. Total exports continued to decline in August, a month after they dropped for the first time in over two years.

China imposed an import ban on Japanese seafood in late August, after the operator of the crippled Fukushima Daiichi nuclear power plant began releasing treated radioactive water into the Pacific Ocean.

Food exports to China tumbled 41.2 percent from a year earlier to 14.19 billion yen, the sharpest drop since October 2011 in the aftermath of the crisis at the nuclear plant triggered by a massive earthquake and tsunami in March of that year.

The figure includes seafood but the Finance Ministry did not release further breakdowns of the data. China's customs data showed its seafood imports from Japan dived 67.6 percent in August from a year earlier.

Japan's overall exports to China dropped 11.0 percent to 1.44 trillion yen while imports decreased 12.1 percent to 1.93 trillion yen, leading to a 493.09 billion yen trade deficit.

Increased exports, particularly of cars to the United States, had helped the Japanese economy to report strong growth despite concern that monetary tightening in other major economies would hurt the global economy.

"While overall exports are still at high levels, the outlook for China is a concern," said Shinichiro Kobayashi, a senior economist at Mitsubishi UFJ Research and Consulting.

"China-bound shipments were weak because of sluggish demand for semiconductor-related equipment and a drop in farm products for political reasons. This comes as auto exports to the United States and Europe remain robust," he added.

Japan has urged China to take action based on scientific data, saying that while the treated water includes tritium, its concentration is below global safety standards.

Wednesday's data painted a changing trade picture for Japan as the surge in import costs caused by higher energy prices and a weak yen has abated and export growth has begun to lose momentum.

Japan's trade surplus with the United States expanded 38.2 percent to 650.60 billion yen. Exports grew 5.1 percent to 1.62 trillion yen, a record for August, while imports fell 9.5 percent to 967.39 billion yen.

The country was in the red for the 13th straight month with the European Union, logging a trade deficit of 132.58 billion yen. Imports rose 11.0 percent to 946 billion yen while exports increased 12.7 percent to 813.42 billion yen.

Japan returned to the black with a trade surplus of 1.56 billion yen with the rest of Asia, including China.

Kobayashi expects Japan to remain in the red, partly due to higher energy prices and the yen's weakening. "It's hard to expect export growth to accelerate from now," he said, adding that strength in demand for cars, semiconductors and China-bound machinery will be key.

Related coverage:

China's Japan seafood imports dive 68% in Aug. over Fukushima water

Japan should take China to WTO over seafood ban: ex-U.N. official