South Korea posted a record trade deficit in August as the currency hovered around a 13-year-low and energy prices remained elevated, swelling the cost of imports and amplifying pressure on exporters.

The shortfall almost doubled to $9.5 billion, the biggest in data going back to at least 2000, the trade ministry said Thursday. While a 6.6% gain in exports exceeded economists’ expectations, it was dwarfed by imports soaring 28.2%.

Semiconductor shipments, the biggest driver of South Korean income, fell 7.8% last month. That was the first decline in more than two years, a time when the global economy bore the brunt of the pandemic.

Korea is headed for its first annual trade deficit since 2008 as elevated energy and commodity prices drive up import prices, underpinned by Russia’s ongoing war on Ukraine. Global demand is also at risk of faltering as central banks raise interest rates to try to rein in inflation.

“We expect a trade deficit lasting at least into early next year given that imports are unlikely to decline as much as exports do,” said Kim Hyo-jin, an economist at KB Securities. “The key is energy prices, whether it’s oil or natural gas. There’s so much uncertainty around it.”

Supply chain disruptions, partly worsened by Covid lockdowns in China, have also contributed to inflationary pressure. A series of rate hikes by the Federal Reserve to rein in US inflation has weighed on other currencies, including the won, making imported goods more expensive for their economies.

The won weakened as much as 0.76% following today’s trade data. Shares of Samsung Electronics Co. , the world’s biggest memory-chip maker, fell as much as 2.2% in the local stock market.

Korea’s trade performance is viewed as an important barometer of international demand as the country manufactures key items such as chips, displays and refined oil for the world economy.

Resilient export growth has been a major factor underpinning the Bank of Korea’s confidence in raising rates. Governor Rhee Chang-yong joined global central bank chiefs at Jackson Hole over the weekend in reaffirming a willingness to keep tightening monetary policy until inflation eases meaningfully.

Adding to export woes is a gradual decline in global demand for semiconductors, the biggest cash cow for Korea. Meantime, the nation’s automakers are facing headwinds as the US “Inflation Reduction Act” excludes them from tax breaks aimed at shoring up American electric-vehicle makers.

While the outlook for exports remains clouded, consumption has been a key support for the Korean economy as Covid regulations are loosened.

A separate update from the Bank of Korea on gross domestic product showed the economy expanded 0.7% last quarter from the previous three months and 2.9% from a year earlier, unchanged compared with an earlier estimate.

Today’s report also showed:

  • Exports adjusted for working-day differences rose 2.2% in August from a year earlier.
  • Total automobile shipments advanced 35.9%, while exports of rechargeable batteries climbed 35.7%.
  • Imports reached a record amount as the purchases of energy and commodities jumped, the ministry said.