China has officially ended its one-child policy after 36 years, allowing all married couples to have a second child.

Chinese lawmakers on Sunday passed the new legislation during a session of the National People’s Congress Standing Committee, which governs the country’s laws.

The decision, which was first declared in October by the ruling Communist Party, takes effect as of January 1.

By ratifying the law, Beijing attempts to cope with an ageing population and shrinking workforce.

The UN estimates that by 2050, China will have nearly 440 million over-60s. Meanwhile, the working-age population, those aged between 15 and 59, fell by 3.71 million last year - a trend that is expected to continue.

Currently a nation of over 1.35 billion people, China implemented the one-child policy in 1979 in a bid to control the rapid growth of its population, but the law became increasingly unpopular.

Chinese authorities, however, argue that it was a pivotal contributor to the country’s economic boom and prevented 400 million births.

In recent years, there has been a gradual relaxation of China’s family planning laws, which already permitted ethnic minority families and rural couples whose firstborn was a girl to have more than one child.

Furthermore, since 2013, couples in many parts of the country have been allowed to have two children if one parent was an only child.