HONG KONG (AP) — China's exports tumbled 12.4% in June from a year earlier as demand weakened after central banks raised interest rates to curb inflation even as Chinese leaders struggled to keep a post-COVID recovery from faltering.

Customs data released Thursday showed imports slid 6.8% to $214.7 billion. Exports edged up slightly from the month before, totaling $285.3 billion. The trade surplus was $70.6 billion, rising from $65.8 billion in May.

Trade weakness adds to downward pressure on the world’s second-largest economy. Global consumer demand has weakened after the Federal Reserve and central banks in Europe and Asia raised interest rates to bring inflation down from near multi-decade highs by reining in business and consumer activity.

In January-June, China’s total trade including imports and exports fell nearly 5% from a year earlier. Exports slipped 3.2% and imports declined 6.7% as prices of commodities like oil fell and demand inside China also faltered.

Exports to the United States tumbled 23.7% from a year earlier to $42.7 billion, a six-month low, while imports of American goods sank 4.1% to $14 billion. China’s politically volatile trade surplus with the United States narrowed by 30.6% to $28.7 billion.

Trade also has been dampened by tension with Washington and restrictions on access to U.S. processor chips and other technology in a feud with Beijing over security and Chinese industrial policy. Chinese factories assemble most of the world’s smartphones and other electronics.

“With the global downturn in goods demand continuing to weigh on exports, we think exports will decline further for now before bottoming out toward the end of the year,” Zichun Huang of Capital Economics said in a commentary. “But the good news is that the worst of the decline in foreign demand is probably already behind us.”

Imports from Russia were up 15.7% to $11.3 billion. China has been buying more Russian oil and gas to take advantage of price cuts. That has helped shore up the Kremlin’s cash flow after the United States, Europe and Japan cut off most purchases to punish Moscow for President Vladimir Putin’s invasion of Ukraine.

Beijing can buy Russian oil and gas without triggering Western sanctions. China has also become Russia’s biggest export market and an important source of manufactured goods. Exports to Russia surged 90.9% in June from the year before to $9.5 billion.

The ruling Communist Party set this year’s official economic growth target at “around 5%,” up from last year’s 3% expansion, which was the second-weakest since the 1970s. Some economists raised their growth forecasts to closer to 6% following unexpectedly strong trade figures in March.

In April, the government announced steps to support struggling exporters, including by making more trade finance available and encouraging cross-border e-commerce.

A five-month campaign launched late April also is meant to increase trade by improving logistics and cutting costs for exporters in 17 cities including Beijing and Shanghai.

Copyright 2023 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed without permission.