Japan logged a trade deficit for the 11th consecutive month in June, as higher energy prices and a weaker yen continued to inflate the nation’s import bill.

The trade deficit narrowed to ¥1.38 trillion ($10 billion) from ¥2.39 trillion in May, which was the most since January 2014, the Finance Ministry reported Thursday. Imports rose 46.1% from a year ago, with crude oil, coal and liquid natural gas leading the increase as oil and gas prices continued to surge from year-ago levels. Economists had forecast a 46.3% gain.

Exports increased 19.4%, compared with a 17% forecast by analysts, as shipments of mineral fuel, steel and semiconductor parts jumped from the previous year. The value of shipments gained 4% from May.