China factory
Chinese factory output exceeded expectations in JuneReuters

China's economy expanded 6.9% year-on-year in the second quarter, matching the rate of growth in the previous three months, official figures have revealed.

Analysts had expected the world's second-largest economy to expand 6.8% in the April to June period.

The better-than-expected figures mean China is on track to beat the growth target of "around 6.5%" set by the country's leadership for the whole year.

It is also on track to post its first annual acceleration in growth since 2010, with gross domestic product having expanded 6.7% in 2016.

"The national economy performed within an appropriate range with more visible good momentum," the National Bureau of Statistics said.

"Overall, the economy continued to show steady progress in the first half... but international instability and uncertainties are still relatively large, and the domestic long-term build-up of structural imbalances remains."

On a quarter-on-quarter basis, GDP expanded 1.7% between April and June.

Other data released by the statistics agency painted a rosy picture of the economy, with industrial production and fixed-asset investments both beating expectations.

Factory output was 7.6% higher compared to a year earlier in June, while fixed-asset investments were up 8.6% in the first six months of the year.

Retail sales increased by 11% compared to the previous year in June – the fastest pace of growth recorded in 18 months.

Chinese shares were down despite the positive GDP report, with the benchmark Shanghai Composite index falling 2.5% during early trading on 17 July.

Analysts said investors were cautious after Chinese President Xi Jinping stressed the need to control financial risks at a five-yearly financial conference over the weekend.

China has set an economic growth target of 6.5% for 2017, lower than the 6.5% to 7% target set last year. The country's economy expanded at its slowest pace in 26 years in 2016.

The ruling Communist Party has pledged to create 11 million new jobs this year and downsize "zombie" companies that are underperforming.