China's industrial output growth slowed to a more than 17-year low of 5% in May, well below expectations, in the latest sign of weakening demand in the world's second-largest economy as the United States ramps up trade pressure.

Employees working on a production line of clothes for export at a factory in Xiayi county, in Shangqiu in China's central Henan province.

Fixed-asset investment also grew less than expected, official data showed on Friday, reinforcing expectations that Beijing will need to roll out more growth-boosting measures soon.

Analysts polled by Reuters had forecast industrial output would grow 5.5% from a year earlier, only marginally higher than a 5.4% rise in April.

Fixed-asset investment rose 5.6% in January-May from the same period a year earlier, the National Bureau of Statistics said, decelerating from 6.1% tipped in the Reuters poll and 6.1% in January-April.

Private sector fixed-asset investment, which accounts for about 60 percent of total investment in China, rose 5.3%, compared with a 5.5% rise in the first four months of 2019.

Retail sales rose 8.6% in May from a year earlier, picking up from a 7.2% rise in April, which was a 16-year low. Analysts surveyed by Reuters had expected a rebound to 8.1%, but some said it was likely due to higher inflation rather than any turnaround in weak consumer confidence.