Demographers have known for some time that the number of people in India would surpass the number in China, the two most populous countries in the world. But they did not anticipate that the change would happen so quickly.

The United Nations reported on Wednesday that India’s population will probably surpass China’s by 2022, not 2028, as the organization had forecast just two years ago.

In its 2015 revision report, the population division of the United Nations Department of Economic and Social Affairs said China’s population was now 1.38 billion, compared with 1.31 billion in India. But in seven years, the populations of both are expected to reach 1.4 billion.

Thereafter, the report said, India’s population will grow for decades, to 1.5 billion in 2030 and 1.7 billion in 2050, while China’s is expected to remain fairly constant until the 2030s, when it is expected to slightly decrease.