Japan posted its biggest half-year trade deficit of 7.9 trillion yen ($57 billion) in the first half of 2022, inflated by a surge in import costs amid soaring energy prices and the yen's depreciation, government data showed Thursday.

Imports jumped 37.9 percent from a year earlier to 53.9 trillion yen on the back of rising crude oil and coal prices propelled by Russia's invasion of Ukraine, according to the Finance Ministry's preliminary report.

Exports rose 15.2 percent to 45.9 trillion yen, also registering a record high for a half-year period since comparable data became available in 1979, on the back of rising material prices and the weakening yen, the ministry said.

By item, shipments of iron and steel to the United Arab Emirates and mineral fuels, including diesel fuel to Australia, notably rose, the data showed.

Resource-poor Japan saw a trade deficit for the second straight half-year period after falling into the red in the second half of 2021.

"By item, imports of crude oil and coal significantly increased in the half-year period, and we believe that was due to rising resource prices," a ministry official said.

The value of petroleum imports, from Saudi Arabia and others, more than doubled, those of coal more than tripled, and those of liquefied natural gas nearly doubled in the January-June period, according to the data.

Takeshi Minami, chief economist at the Norinchukin Research Institute, said that the value of both exports and imports are rising at a high pace but they were mostly inflated by high resource prices and the yen's depreciation.

"High prices of resources, including crude oil, might be suppressed along with the potential heightening of the risk for a global recession, while exports may not expand further for a while," Minami said.

Imports from China, the world's second-largest economy, rose for the third consecutive period to 11.4 trillion yen, up 16.9 percent from a year earlier, while exports climbed for the fourth consecutive period to 8.9 trillion yen, up 3.7 percent.

Exports to the United States rose 16.6 percent from a year earlier to 8.2 trillion yen, on the back of brisk shipments of semiconductor manufacturing devices, ship engines, and mineral fuels, the ministry said.

Imports from the world's largest economy also increased 25.2 percent to 5.3 trillion yen, boosted by those of pharmaceuticals, grains including corn, and liquefied petroleum gas, according to the ministry.

The previous record high trade deficit for a half-year period was 7.6 trillion yen registered in the first half of 2014, which was boosted by rising fuel imports for thermal energy generation after nuclear power plants suspended operations due to the massive quake-tsunami disaster of March 2011.

For June alone, Japan logged a trade deficit of 1.4 trillion yen for the 11th consecutive month of deficit.

Imports climbed 46.1 percent to 10.0 trillion yen, while exports increased 19.4 percent from a year earlier to 8.6 trillion yen, both highest for the reporting month.

Related coverage:

Japan logs 2.38 tril. yen goods trade deficit in May, 2nd largest ever

Japan logs 5.4 trillion yen goods trade deficit in FY 2021

USTR report cites Japan's "high" tariffs on rice, dairy products