After 36 years, communist China has finally decided to end its infamous one-child policy and will now allow couples to have up to two children.

The news was reported by the state-run Xinhua news agency, citing a statement released by the fifth plenum of the Central Committee of the Communist Party that has been meeting in Beijing.

Chairman Deng Xiaoping enacted the policy in 1979 as a measure aimed at population control, but the hotly contested law had created a series of gender imbalances and ultimately proved counterproductive for the new phase of social and economic development of the Asian giant.

Punishments for having a second child ranged from onerous monetary fines and the loss of employment to forced abortions, and the policy is estimated to have prevented 400 million births since its inception.

Critics had called the policy “the worst violation of human rights ever,” and blamed it for the rise in the trafficking of babies, infanticide, and sex-selective abortions, among other things.

One of the more notorious cases occurred in 2012, when Chinese family planning officials kidnapped a 23-year-old woman from Shaanxi province and performed an abortion on her seven-month-old fetus.

A Xinhua report in July suggested that a nationwide two-child policy could “help elevate the low fertility rate in China” and help to counteract the country’s aging trend.

Economically, China’s rapidly aging population and shrinking workforce spell a slowdown, unless something can be done to arrest the trend.

According to UN estimates, by 2050, China’s over-60 population will swell to nearly 440 million, while the working-age population continues to decline. Last year, Chinese citizens of working age—defined as from 15 to 59 years—dropped by 3.71 million, and this trend shows no sign of abating.

Follow Thomas D. Williams on Twitter @tdwilliamsrome.