Japan’s trade deficit hit a record high in July as the impact of soaring commodities and the yen’s 24-year low added to the headwinds for the nation’s economic recovery.

The trade deficit widened to ¥2.13 trillion ($15.9 billion) on a seasonally adjusted basis, the finance ministry reported Wednesday, extending the sequence of shortfalls to a 14th month. The trade balance has been in the red for the longest continuous streak since 2015.

Imports gained 47.2% from a year ago, led by continued year-on-year gains in energy prices, while exports increased 19%, boosted by growing shipments of autos and chipmaking equipment. Both figures beat forecasts.