BEIJING (Reuters) - China posted a rare flurry of disappointing data on Thursday -- including its slowest growth in investment in nearly 18 years -- suggesting the world’s second-largest economy is finally starting to lose some momentum as borrowing costs rise.

Factory output and retail sales also grew less than anticipated, though a rebound in property sales and construction starts is likely to keep China’s overall growth relatively robust and comfortably on target ahead of a key leadership reshuffle next month.

“I think the risk (for China) isn’t in the next couple of months but rather the next couple of years,” said Capital Economics’ Julian Evans-Pritchard.

“Progress on key structural reforms that really matter, such as boosting the performance of state-owned enterprises, has been quite slow and the structural drags on growth remain quite strong and are real risks.”

Analysts had widely expected China’s August data to show industrial output and retail sales growth had accelerated after fading slightly in July, while investment was seen as only marginally softer.

That would have fit into a pattern of stronger-than-expected readings from China in the first half of the year and upbeat surveys on August factory activity.

A year-long, government-led construction boom has lifted demand and prices for everything from cement to steel to glass, helping offset an expected drag from property cooling measures and a regulatory crackdown on riskier types of financing.

But August’s data suggested the strong boost from Beijing’s infrastructure building spree may be starting to fade.

Fixed-asset investment, a key growth driver for the world’s second-largest economy, grew 7.8 percent in January-August from a year earlier, the weakest pace since December 1999 and cooling from 8.3 percent in January-July.

The main drag appeared to be a slowdown in infrastructure investment due to a significant drop-off in government fiscal spending over the past two months, analysts said.

China frontloaded fiscal spending this year to produce rosy growth ahead of the once-in-five-years Communist Party Congress next month, Evans-Pritchard said. But local governments are constrained by annual budgets and have had to pare back spending in the second half of this year, he added.

A man works in the Tianye Tolian Heavy Industry Co. factory in Qinhuangdao in the QHD economic development zone, Hebei province, China December 2, 2016. REUTERS/Thomas Peter

That likely had a knock-on effect on industrial output, which rose 6.0 percent in August on-year, the weakest pace in nine months, statistics bureau data showed.

Analysts polled by Reuters had predicted output would grow 6.6 percent in August, up from 6.4 percent in July.

The statistics bureau said unusually hot and wet weather weighed on industrial output last month, adding that the economy remained on a steady, improving trend. On a monthly basis, output rose nearly half a percent.

China’s crackdown on pollution may have also dented industrial output, as Beijing looks to close older, smog-belching mines and factories, said Nie Wen, an economist at Hwabao Trust in Shanghai.

Still, economists at Nomura maintained their view that the economy would expand 6.8 percent in the third quarter from a year earlier, easing only slightly from 6.9 percent in the first half.

That would keep China on track to easily beat the government’s full-year growth target of around 6.5 percent, even if there is some further softening late in the year.

PROPERTY

Overall investment may have softened further if not for an unexpected rebound in the property market, which directly affects 40 other business sectors in China.

Despite a series of government curbs which have largely succeeded in cooling red-hot housing prices, activity in the property market snapped back in August, possibly as developers turn their focus to smaller cities with fewer restrictions.

Property investment, which mainly focuses on residential real estate but also includes commercial and office space, grew 7.8 percent in August on-year, versus 4.8 percent in July, according to Reuters calculations from Thursday’s data.

New construction starts measured by floor area, a telling indicator of developers’ confidence, were up 5.3 percent after contracting in July for the first time since last September.

Growth of private investment slowed to 6.4 percent in January-August from 6.9 percent in the first seven months of the year, suggesting small- and medium-sized private firms still face challenges in accessing investment-finance.

Private investment accounts for about 60 percent of overall investment in China.

RETAIL SALES ALSO MISS

Retail sales also confounded market expectations, rising 10.1 percent in August on-year, the slowest pace in six months and cooling from 10.4 percent in July. Analysts had expected a slight pick-up in demand.

Again, however, sales rose at a decent clip from a month earlier, and shoppers are expected to throng the stores and online sites as usual in October over the long Golden Week holidays.

Other data for August released last week was mixed, with imports beating expectations -- pointing to still solid domestic demand, while exports grew less than expected. Producer and consumer inflation quickened more than forecast.

Producer prices, particularly for building materials, have surged this year, giving China’s long-ailing and heavily-indebted industrial sector its best profits in years. But some analysts said higher prices may also be skewing the data and exaggerating the strength of its economic recovery.

Foreign investment in China has remained tepid, though a sharp rebound in the yuan currency may be a game changer if sustained.

Foreign direct investment (FDI) in China fell 0.2 percent in the first eight months of 2017 from a year earlier to 547.94 billion yuan (63.38 billion pounds), Commerce Ministry data showed. But for August alone, it rose 9.1 percent.

China’s outbound non-financial investment (ODI) slumped 41.8 percent in January-August from a year earlier as authorities continued to crack down on speculative outflows and “irrational” overseas asset purchases which had pressured the yuan.

Some acquisitive and high-profile Chinese firms have had to scrap plans for global acquisitions in recent months.