BEIJING (AP) — Activity at China's factories slowed in December but still represented the fifth consecutive month of expansion in the latest sign that the world's No. 2 economy is stabilizing.

The monthly purchasing managers' index by the Chinese Federation of Logistics and Purchasing was 51.4 in December, the second highest level of 2016. The highest reading was November's 51.7 — the first time the index had hit that level since July 2014.

December's figure climbed from 49.7 a year earlier.

The index is based on a 100-point scale with the 50-point mark separating expansion from contraction.

China's manufacturing sector picked up throughout the year following an uneasy start in an upbeat sign for the wider Chinese economy, which posted steady growth of 6.7 percent in the third quarter.

China's economy has cooled gradually over the past six years as Beijing tries to pivot away from heavy reliance on export-based manufacturing and investment toward consumer spending.

However, the government has supported the manufacturing sector with stimulus measures aimed at shoring up growth, including heavier spending on public infrastructure projects.