The U.S. merchandise trade deficit with Japan shrank 26.1 percent in May from the previous month to $5.35 billion (¥576.8 billion), the Commerce Department said Wednesday.

The deficit with China, meanwhile, expanded 12.2 percent to $30.20 billion, the department said.

For the reporting month, Japan ranked as having the United States' fourth-largest trade deficit after China, Mexico and Germany.

U.S. President Donald Trump's administration has been pushing Japan to cut the deficit during talks for a bilateral trade agreement.

In a meeting last week in Osaka, Trump and Chinese President Xi Jinping agreed to restart negotiations for resolving the trade war between the two countries. The United States will hold off on imposing additional tariffs on Chinese imports for now.

Globally, the U.S. deficit in trade of both goods and services grew 8.4 percent to $55.52 billion.

U.S. exports rose 2.0 percent to $210.64 billion, while imports climbed 3.3 percent to $266.16 billion.

The global trade figures are measured on a balance-of-payments basis after seasonal adjustment, and the country-by-country and regional breakdowns are based on unadjusted customs-cleared data.