Photo/Illutration Cars manufactured by Toyota Motor Corp. are ready for export at Nagoya Port on Dec. 7, 2021. It’s the port where the largest number of cars are exported from Japan. (The Asahi Shimbun/ Mari Endo)

Japan’s trade deficit persisted in March as imports surged 31 percent thanks to soaring oil prices and a weakening yen.

The deficit of 412 billion yen ($3.2 billion) for March was lower than the previous month’s 670 billion yen but was quadruple analysts’ estimates and a reversal of the surplus of 615 billion yen recorded a year earlier for the world’s third-largest economy.

The weaker yen helps make Japanese exports more competitive overseas and fattens profits when they are converted from dollars to yen, but it also raises costs both for consumers and businesses.

Exports climbed 15 percent in March to 8.46 trillion yen ($65 billion) while imports were 8.9 trillion yen ($68 billion).

Costs for imports of fuels like oil, gas and coal soared just over 80 percent from a year earlier, while food imports jumped 22 percent and chemicals rose 42 percent. Meanwhile, Japan’s vehicle exports slipped 1.2 percent, with the number of vehicles shipped overseas dropping more than 14 percent

Japanese automakers and other manufacturers are struggling with production cuts due to pandemic-related disruptions in supplies of all-important computer chips and other components.

Economists are forecasting a strong rebound once such problems subside. But new export orders have fallen, suggesting export growth has remained weak in April, Tom Learmouth of Capital Economics said in a report.

“And given that there is no immediate sign of chip shortages easing for carmakers, exports will probably remain weak until later in the year,” he said.

Preliminary data for the fiscal year that ended in March showed exports jumped almost 24 percent but were outpaced by imports, which climbed 33 percent. The fiscal year deficit of 5.4 trillion yen (nearly $42 billion) was the highest in seven years.

The Japanese yen has weakened against the dollar as the Federal Reserve has begun raising interest rates to tamp down inflation that is at 40-year highs. Higher rates attract investors who buy dollars and sell other currencies, like the yen.

Despite rising prices for imports, Japan’s central bank has kept its key interest rate at minus 0.1 percent for years, trying to pull the economy out of the doldrums as the country ages and its population shrinks.

That means Japan is paying more for imports as the war in Ukraine plus rising demand from economies recovering from the pandemic push prices of oil and other commodities higher.

The bill for imports of fuels such as oil, gas and coal surged 87 percent in the last fiscal year, the figures showed.

Crude oil prices are about 40 percent higher in this year alone, with U.S. benchmark crude oil trading around $100 to the barrel and Brent crude, the international basis for pricing, slightly higher.