China's exports unexpectedly rose in July, growing 3.3 percent from a year earlier, customs data showed on Thursday, despite mounting US trade pressure.
Analysts polled by Reuters had expected exports would fall two percent, after a 1.3 percent decline in June.
Imports in July fell 5.6 percent from a year earlier, less than a predicted fall of 8.3 percent and moderating from a 7.3 percent drop in June.
That left China with a trade surplus of $45.06 billion in July, compared with a $50.98 billion surplus in June. Analysts had forecast $40 billion.
The United States sharply raised tariffs on some Chinese imports in May and Beijing retaliated, escalating a year-long trade war between the world's largest economies.
President Donald Trump stunned financial markets last week by vowing to impose even more levies from September 1, which would extend tariffs to nearly all of the Chinese goods the US imports. Days later, China let the yuan currency fall sharply.
China July exports surprise, rise 3.3 percent; imports fall 5.6 percent