China will raise the retirement age for the first time since 1978, a move that could stem a decline in the labor force but risk angering workers already wrestling with a slowing economy.

Top lawmakers endorsed a plan to delay retirement for employees by as long as five years, the official Xinhua News Agency reported Friday. Men will retire at 63 instead of 60. Women will retire at 55 instead of 50 for ordinary workers, and 58 instead of 55 for those in management positions.

The change will take place over 15 years starting January, and will allow more people to work longer. This could boost productivity to address the challenges of an aging population, although it risks adding to public discontent with the economy growing at the worst pace in five quarters.