Japan ran its biggest single-month trade deficit in more than eight years in May as high commodity prices and declines in the yen swelled imports, clouding the country's economic outlook.

The growing trade deficit underscores the headwinds the world's third-largest economy faces from a slide in the yen and surging costs of fuel and raw materials, on which domestic manufacturers rely for production.

Imports soared 48.9% in the year to May, Ministry of Finance data showed on Thursday, above a median market forecast for a 43.6% gain in a Reuters poll.