(Adds detail, analyst comment)
BEIJING, Nov 8 (Reuters) - China's exports rose at a slower pace in October as expected, but import growth beat forecasts in a sign domestic demand remained robust despite Beijing's crackdown on pollution that analysts say will reduce factory output and crimp overall economic growth.
October exports rose 6.9 percent from a year earlier, slightly lagging analysts' forecast of a 7.2 percent increase, compared to 8.1 percent growth in September, official data showed on Wednesday.
Imports grew 17.2 percent year-on-year in October, beating forecast of 16.0 percent growth but slightly slower than the 18.7 percent rise in September.
That left the country with a trade surplus of $39.17 billion for the month, according to a Reuters calculation using data from the Administration of Customs.
Analysts had expected China's trade surplus to have widened to $39.5 billion in October from September's $28.61 billion.
The Asian giant's trade with its largest export market the United States will be in the spotlight this week as U.S. President Donald Trump is set to arrive in Beijing later on Wednesday for his first visit to China, during which North Korea and trade are expected to top the agenda.
Trump has railed against China's massive trade surplus with the U.S., and bilateral trade is set to feature prominently in discussions.
China's trade surplus with the U.S. in October was $26.62 billion, based on Reuters calculations of official data, down from $28.08 billion in September, even as its overall surplus with the rest of the world widened.
For a summary of trade issues between China and the U.S., click here:
The weaker trade comes amid expectations of a renewed effort by policy makers to reduce debt risks and tighten rules to bring polluting factories to heel, though also reflect weaker external demand, say analysts.
"The big picture is that both outbound and inbound shipments have softened recently, a trend that continued last month," Capital Economics China economist Julian Evans-Pritchard wrote in a note.
"We suspect that this reflects a slight easing of growth in other emerging markets along with weaker domestic demand as a result of slower infrastructure spending."
At the recently-concluded Communist Party Congress President Xi Jinping emphasised quality over speed in fostering sustainable growth, while reinforcing a pledge to win the war on pollution and clamp down on riskier types of lending.
The latest trade numbers suggest that China's recovery is starting to show signs of fatigue after economic growth slowed slightly in the third quarter, but still remains robust.
Growth in China's manufacturing sector cooled more than expected in October and one of its sub-readings indicated unexpected weakness in new export orders, pointing to slackening demand at home and abroad.
China's economy has recorded better-than-expected growth of nearly 6.9 percent through the first nine months of this year, thanks to strong government infrastructure spending, a resilient property market and unexpected strength in exports.
Even with some loss of momentum in the fourth quarter, the country's economic growth is still expected to easily meet or beat the government's full-year target of around 6.5 percent.
(Reporting by Lusha Zhang and Elias Glenn; Editing by Shri Navaratnam)