China's exports and imports fell more than expected in July in a rocky start to the third quarter, pointing to further weakness in global demand in the aftermath of Britain's decision to leave the European Union.

Imports fell 12.5% from a year earlier, the biggest decline since February and suggesting China's domestic demand may be faltering despite a flurry of measures to stimulate economic growth.

"I think (the drop in imports) is mainly from the demand side," said Ma Xiaoping, an economist at HSBC in Beijing.

Government efforts to cut overcapacity could produce an even bigger hit to demand in the next few quarters, Mr Ma added.

Exports fell 4.4% year-on-year, the General Administration of Customs said, while adding that it expects pressure on shipments likely will start to ease in October.

That resulted in a trade surplus of €47.18 billion in July, the biggest since January, versus June's €43.39 billion.

China's imports have now declined for 21 straight months, while exports have fallen for 12 of 13 months, helping to drag economic growth to its slowest in a quarter of a century.

"Signs of stronger manufacturing activity among many of China's key trading partners has so far failed to lift export growth," Capital Economics' China economist Julian Evans-Pritchard said in a note.

"The country's export growth is likely to remain subdued for some time."

Economists polled by Reuters had expected trade to remain weak but show some signs of moderating as factories gear up for orders heading into the peak year-end shopping season.

July exports had been expected to fall 3%, compared with a 4.8% decline in June, while imports were seen falling 7%, following June's drop of 8.4%.

China's exports underwhelmed despite still-strong shipments of steel and oil products, with the latter hitting a record.

China has come under fire from trading partners accusing it of dumping its excess industrial capacity in global markets.

Exports to the United States – China's top market – fell 2% in July, while shipments to the European Union – its second biggest market - fell 3.2%.

While the decline in shipments to the EU actually moderated slightly from June, economists at ANZ expect Brexit will weigh further on China's exports to Europe in coming months.