TOKYO (AP) — Japan has recorded a trade surplus in June, including with the U.S., despite tariffs put in place by President Donald Trump.

The Finance Ministry reported Thursday that Japan’s exports in June rose 6.7 percent from the same month a year ago, as exports grew in machinery, food, metals and computers.

Imports rose 2.5 percent from a year earlier.

By country, exports rose to nations including Germany, China and Brazil. Although exports to the U.S. fell slightly, by 0.9 percent, imports declined 2.1 percent, resulting in a surplus.

The Trump administration imposed tariffs this year on steel and aluminum from several countries, including Japan.

It is also threatening tariffs on autos and auto parts but the move has drawn criticism from the U.S. auto industry.