BEIJING // China, with the world's largest population, faces some formidable demographic challenges of its own making in a time of impressive economic growth and rapid urbanisation.
Key among the looming problems is the growing gender imbalance caused by a decades-old birth-control policy sustained, at times, with brutal efficiency.
Then there is the rush to the cities and towns by more than 10 million people each year, and the prospect of a population that will age before the country has the means to look after its elderly.
After decades of high birth rates under Mao Zedong, China moved to a one-child policy in 1980. Authorities say that has meant 400 million fewer births, although this figure is contested.
With most urban families limited to a single child and rural families typically limited to two, the birth rate has fallen to an average of about 1.5 for each woman, well below the 2.1 required for the population to sustain itself.
Official figures predict the country's population, now at 1.34 billion, will peak at more than 1.46 billion in 2030, by which time India will have overtaken it as the world's most populous nation.
Limiting birth rates has produced what was recently described as a "demographic time bomb" because the ratio of old to young is increasing quickly.
A decade ago there were six workers for each person over 60 years old. In two decades there will be just two.
"A lot of talk is about the dependency ratio. It's going to be a lot higher … it will probably be a strain to the social-welfare system," said Ben Li, an assistant professor in the department of applied social studies at the City University of Hong Kong.
That strain could be unprecedented because the drop in birth rates was so rapid, in contrast to countries such as the United Kingdom, where birth rates began to fall in the 1800s.
Despite its rapid economic growth, China is ageing before it has time to become a wealthy developed nation with a welfare system to provide security for a growing elderly population that has fewer descendants to provide care.
By the time a quarter of the population is aged above 60, per capita incomes will be just one third of those of a developed western nation, according to one estimate this year.
A rise in the pension age, currently 55 for women and 60 for men, is thought to be likely, and the authorities in cities such as Shanghai have already raised retirement ages.
But by limiting birth rates - even if methods such as enforced sterilisation and abortion are controversial - and by achieving rapid economic growth, China has avoided having the vast pool of disenchanted, unemployed youth of the kind that has driven dissent in the Middle East and North Africa.
The gender imbalance the one-child policy has intensified - there are 118 boys for every 100 girls - has been cited as a possible source of social tensions in the future, with vast numbers of men unable to marry.
China is also having to cope with the speed of urbanisation. Migrant workers are abandoning the countryside in droves for construction, service industry and factory jobs in towns and cities.
This year the urban population overtook the rural population in size, with migrant workers now numbering more than 200 million.
Last year China added 13 million urban residents and even by 2020 the annual urbanisation rate is expected to be as high as 10 million. It is the fastest urbanisation in history.
The financial incentives to move to the cities "are still strong", said Stephen Joske, the director of the Economist Intelligence Unit's China Regional Forecasting Service.
"We certainly see urbanisation continuing," Mr Joske said.
Despite this frenetic rush to the cities, the government has tools to manage the process that would not be available to a less authoritarian regime.
In particular, the hukou system, which limits the provision of government services such as health and education to an area's permanent residents, discourages migration.
This year, the Beijing authorities shut unofficial schools for the children of migrant workers to try to push some of the floating population back to their home provinces.
China's urbanisation has driven the investment-led economic growth that has made the country's economy the world's second largest.
The slowing population growth is already knocking one or two percentage points off GDP growth, said Mr Joske, but "it's not going to stop economic growth".