Chinese economic growth held steady in the second quarter, defying expectations for a slight slowdown, as state investment bolstered output.

GDP grew by an annual 6.7%, as in the first quarter, higher than the 6.6% Bloomberg consensus.

The growth rate fell comfortably within China's annual GDP target of 6.5% to 7% after the world's No. 2 economy met its goal of "about 7%" growth last year with 6.9% economic expansion. However, analysts said a breakdown of the data showed that was down to the state stepping into the breach left by a waning private sector and structural issues remain unresolved. The 9% six-month private investment growth rate lagged expectations.

"While China is almost certainly expanding at a slower rate than its GDP data suggest, rapid state sector investment does appear to have kept growth broadly stable last quarter. Growth is more likely to pick up over coming months than slow further, but a lasting turnaround is not on the cards," said Capital Economics.

The quarter-on-quarter growth rate came in at 1.8%, higher than the 1.7% expected and up from a revised 1.2% in the first quarter.

Growth in industry and construction rose by an annual 6.1%, quicker than the 5.8% growth rate in the first quarter, thanks to state spending.

The services sector, which China is relying on as it rebalances its economy away from industrial exports, expanded by 7.5%, down from 7.6% in the first quarter. Capital Economics said growth was supported by property sales as mortgage rates fell and controls on transactions were relaxed.

However, with separate data Friday showing a rapid expansion of new lending in June, the analysts said they see "no immediate threat to growth in China" and expect economic expansion to accelerate rather than slow in the next few quarters. Government figures on June output and retail sales out on Friday also showed growth exceeded expectations.

But Capital Economics analysts said that " as worries about the outlook have diminished, so has the likelihood of further stimulus. Any turnaround would therefore be short-lived and, with structural issues still unresolved, a renewed slowdown over the next couple ofyears is looking increasingly likely."

Chinese stock benchmarks edged higher on Friday, after reversing initial losses, with the CSI 300 recently up 0.23% at 3,284.18.