Photo/IllutrationIn this July 8, 2019, photo, Subaru cars are parked to wait for export at Kawasaki port, near Tokyo. (AP Photo)

Japan's exports declined in June as shipments of goods were hit by global trade wars, according to data released by the Finance Ministry on Thursday.

Japan's exports declined 6.8 percent compared to the same month last year, while imports fell 5.2 percent. The trade surplus for the month totaled 589.5 billion yen ($5.5 billion), the ministry said.

For the first six months of this year, Japanese exports slipped 4.7 percent while imports edged down 1.1 percent, with the nation logging a trade deficit of 888.8 billion yen.

The Japanese economy is dependent on exports and has been hurt by the conflict between the United States and China.

U.S. President Donald Trump has imposed 25 percent tariffs on $250 billion in Chinese imports. Beijing has countered by taxing $110 billion in U.S. goods.

Koya Miyamae, senior economist at SMBC Nikko Securities Inc., said exports remain weak, especially to Asia.

"That brought the overall numbers down," he said in a report. "The outlook looks dim for July through September as far as export growth."

Japan is also embroiled in a row with South Korea over Tokyo's move to tighten controls on the exports of photoresists and other sensitive chemicals to South Korean companies that use them to produce semiconductors and display screens for smartphones and TVs.

Japan has already been hit by increased U.S. steel and aluminum tariffs. Trump has repeatedly said Japan needs to buy more from the U.S., and bilateral trade negotiations are expected to continue through this year.