A QUIET but constant ticking can be heard from the demographic time bomb that sits beneath the world’s third-largest economy. This week it made a louder tick than usual: official statistics show that the population declined last year by a record 244,000 people—roughly the population of the London borough of Hackney. Japan's population began falling in 2004 and is now ageing faster than any other on the planet. More than 22% of Japanese are already 65 or older. A report compiled with the government’s co-operation two years ago warned that by 2060 the number of Japanese will have fallen from 127m to about 87m, of whom almost 40% will be 65 or older.

The government is pointedly not denying newspaper reports that ran earlier this month, claiming that it is considering a solution it has so far shunned: mass immigration. The reports say the figure being mooted is 200,000 foreigners a year. An advisory body to Shinzo Abe, the prime minister, said opening the immigration drawbridge to that number would help stabilise Japan’s population—at around 100m (from its current 126.7m).

But even then there’s a big catch. To hit that target the government would also have to raise the fertility rate from its current 1.39, one of the lowest in the world, up to 2.07. Experts say that a change on that scale would require major surgery to the country’s entire social architecture. One of the first things Japan would need to do, says Kathy Matsui, chief Japan equity strategist at Goldman Sachs in Tokyo, is make it easier for mothers to work. “Evidence shows that work-forces with a higher female participation rate also have higher birth rates,” she says.

Mr Abe has invoked Ms Matsui in his quest to boost the birth rate. Progress towards bringing women into the labour force is far from assured however. The latest Gender Gap Report, compiled annually by the Davos-based World Economic Forum, ranked Japan 105 out of 136 countries, down 25 places from 2006. (South Korea—another country with a fertility crisis—does even worse, coming in at 111th place.)

The looming crisis has so alarmed Japan’s government that in 2005 it created a ministerial post to raise fertility. Last year a 20-member panel under the ministry produced a desperate wish list to reduce what it calls “deterrents” to marriage and child rearing. It included a proposal to assign gynaecologists to patients on a lifelong basis and even to provide financial support for unmarried Japanese who undertake "spouse-hunting" projects.

Immigration is being approached as a last resort. Even so the prime minister faces tough choices. The United Nations estimates that without raising its fertility rate, Japan would need to attract about 650,000 immigrants a year. There is no precedent for that level of immigration in this country, which is still a largely homogenous society.

Roughly 2% of Japan’s population is foreign. And even this figure includes large numbers of permanent residents—mostly Chinese and Koreans—who have been here for generations. Tellingly, the recent story about the government’s discussion of immigration broke in the right-wing Sankei newspaper (in Japanese), which is especially unlikely to embrace the idea of a Chinese family living on every Japanese street.

Japan’s demographic dilemma grows more urgent by the year. Last week the government passed the nation’s largest-ever budget—a mammoth $937-billion package swelled by welfare and pension spending. Japan is already weighed down by one of the world’s largest public debt burdens. With its inverted population pyramid, where will it find the tax base to repay this debt, and to care for its growing population of elderly?

The 2012 government report said that without policy change, by 2110 the number of Japanese could fall to 42.9m, ie just a third of its current population. It is plausible to think that the country could learn to live with its shrinking population. But that might mean also embracing a much diminished economic and political role in the world. Mr Abe would seem to be the last leader to accept that.