BEIJING (Reuters) - China’s exports growth unexpectedly accelerated in July despite fresh U.S. tariffs, while its trade surplus with the United States remained near record highs as Beijing and Washington ramped up a bitter dispute that has rattled financial markets.

Cars to be exported sit at a port in Lianyungang, Jiangsu province, China August 8, 2018. REUTERS/Stringer

Imports also rose much faster in July thanks to still solid domestic demand, official data showed on Wednesday, with purchases of commodities like copper and iron ore rising from June.

The headline numbers are the first readings of the overall trade picture for the world’s second-largest economy since U.S duties on $34 billion of Chinese imports came into effect on July 6.

China’s closely watched surplus with the United States dipped only slightly to $28.09 billion last month from a record $28.97 billion in June. Washington has long criticized China’s trade surplus with the United States and has demanded Beijing cut it. Still, disagreements between the two major economic powers run deeper than just the trade balance and tensions remain over market access, intellectual property, technology transfer and investment.

The United States and China implemented tariffs on $34billion worth of each other’s goods in July. Since then, Washington and Beijing have raised the stakes by threatening more punitive trade measures in an intensifying dispute that has rattled financial markets worried about the impact on investment and growth.

The two sides have shown no signs of letting up, with the U.S. earlier Wednesday saying it will begin collecting 25 percent tariffs on another $16 billion in Chinese goods on Aug. 23, and Chinese media resorting to personal attacks against Trump earlier in the week.

China’s July exports rose 12.2 percent from a year earlier, beating forecasts for a 10 percent increase according to the latest Reuters poll, and up from a 11.2 percent gain in June.

A weaker yuan, which marked its worst 4-month fall on record between April and July, may have taken the sting out of 25 percent tariffs on $34 billion exports to the United States. However, analysts still expect a less favorable trade balance for China in coming months given it’s early days in the tariff brawl.

“Looking ahead, we expect export growth to cool in the coming months, though this will primarily reflect softer global growth rather than US tariffs, the direct impact of which will continue to be mostly offset by the renminbi’s (yuan’s) recent depreciation,” Capital Economics’ Senior China Economist Julian Evans-Pritchard wrote in a note.

After a strong start to the year, growth in the world’s second-largest economy cooled slightly in the second quarter, partly hit by the government’s years-long efforts to tackle debt risks.

The worry is that the escalating Sino-U.S. trade war, rising corporate bankruptcies, and a steep decline in the value of the yuan versus the dollar could put a significant dent on the economy.

The government has responded by releasing more liquidity into the banking system, encouraging lending and promising a more “active” fiscal policy.

Imports grew 27.3 percent in July, customs said, beating analysts’ forecast of 16.2 percent growth, and compared with a 14.1 percent rise in June.

TRADE SURPLUS WITH U.S. NEAR RECORD

China’s exports to the United States rose 13.3 percent in the first seven months of 2018 from a year earlier, compared with a 13.5 percent rise in Jan-June. Its imports from the U.S. rose 11.8 percent in the same period.

The trade balance between the two countries, which is at the center of the tariffs tussle, continued to be in favor of China.

In July the surplus with the United States was at $28.09 billion, down a touch from $28.93 billion in June, according to Reuters calculations based on customs data released on Wednesday.

The surplus with the United States was higher than China’s overall trade surplus in July, which was $28.05 billion, indicating China ran a net trade deficit with the world excluding the U.S.

Economists had forecast the surplus would be $39.33 billion in July, compared to a surplus of $41.47 billion in June.

For January-July, the surplus with the U.S. rose to $161.63 billion, compared with about $142.75 billion in the same period last year.

The Trump administration ramped up the pressure for trade concessions from Beijing last week by proposing a higher 25 percent tariff on $200 billion worth of Chinese imports. China in turn retaliated by proposing tariffs on $60 billion worth of U.S. goods, with the extra levies ranging from 5 to 25 percent.

China has now either imposed or proposed tariffs on $110 billion of U.S. goods, representing the vast majority of China’s annual imports of American products. Last year, China imported about $130 billion of U.S. goods.