THE mantra since Shinzo Abe returned to office in 2012 has been about pulling Japan out of its long deflationary spiral. But that is much easier said than done when the population is ageing and shrinking more rapidly than any other.

In May a think-tank predicted that within a little more than three decades some 1,000 rural towns and villages will be largely empty of women of childbearing age. The government forecasts that Japan’s overall population, currently 127m, will shrink by a third over the next 50 years (see chart below). Indeed, it predicts there will be a mere 43m Japanese by 2110. The latter forecast is unscientific extrapolation—no one can possibly know what the country will look like a century from now. Still, the forecast is a measure of the government’s mounting alarm, and it is hard to square with the prime minister’s notions of returning Japan to national greatness. In short, demography is once again coming to the fore as a hot political issue.

The chief problem is that a fast-shrinking working population will struggle to support a growing proportion of the old. In part, the government is trotting out time-worn ideas: Japan must raise its birth rate (but that can be hard, see article); to cope with labour shortages, it must develop robots to work on factory floors and in care homes for the elderly. The head of a special panel advising Mr Abe, Akio Mimura, said the government must act quickly if it is to keep the population from falling below 100m. To prevent that, the panel’s report points out, the average Japanese woman should have 2.07 children over her lifetime, up from the current level of 1.41. The panel, with plenty of greyheads on it, seemed to be itching to intrude into the bedroom to urge women to get going.

Population experts, however, say a wholesale redesign of Japan’s social architecture is needed. Mr Abe has announced plans to provide more publicly-run child care, to help mothers get back to work. But a big obstacle to working mothers is Japan’s corporate culture, with its long office hours and late nights out bonding with colleagues. The culture could take years to change. So might the stigma attached to children born out of wedlock. Meanwhile, recent measures to boost the birth rate, such as assigning gynaecologists to remind young women of their biological clocks, smack of desperation. Yet signs suggest Mr Abe’s government is now considering another obvious solution that Japan has usually shunned: immigration on a big scale. Less than 2% of the population is of foreign origin, a proportion far below that of other rich countries. Even this low figure includes large numbers of permanent residents with roots in Japan’s former colony of Korea, as well as China, whose families have been in Japan for generations. More recent arrivals include legions of Chinese students. They seldom stay for long, but without their labour, Japan’s myriad urban convenience stores would soon struggle. And during the 1990s thousands of Brazilians were recruited to work in car and related factories, notably in Hamamatsu in Shizuoka prefecture south-west of Tokyo and in Aichi prefecture around Nagoya. Japan gingerly opened the door to such workers when it desperately needed cheap labour, says Kimihiro Tsumura of Hamamatsu Gakuin University, only to slam it shut when the economy slowed after 2008, even paying many to go home. Hamamatsu’s Brazilian population has fallen from some 20,000 to around 9,000. Those who stayed have struggled to integrate. It does not help that the government has made next to no provision for the educational and other needs of the children of immigrants. Nonetheless, in February the government released a report recommending that Japan accept 200,000 new permanent immigrants a year from 2015 onwards. Perhaps predictably, officials issued denials that this scale of immigration was government policy. Mr Abe himself has insisted that recent moves to give longer temporary visas to foreigners working in construction and the like are “not an immigration policy”. Such workers, he said, would have to return home afterwards.

In reality, an adviser to Mr Abe says, the report marks the start of a move towards opening the door to a lot more permanent immigrants, even if Mr Abe cannot say so. The usually xenophobic right-wing media are coming around to the idea, says Hidenori Sakanaka, a former Tokyo immigration chief who is now head of the Japan Immigration Policy Institute. These days, he predicts, the mainstream media’s reporting on the issue will sway public opinion in favour of more immigration.

Yet Hamamatsu highlights the challenges. Even though the Brazilians had to have some Japanese blood as a visa qualification (many Japanese emigrated to South America in the early 1900s), they struggled to speak and read Japanese. What is more, says Yasuyuki Kitawaki, who was mayor of Hamamatsu from 1999 to 2007 and oversaw the city’s attempts to assimilate the newcomers, locals were not ready for a blast of multiculturalism. The vast majority of Japan’s Gastarbeiter are law-abiding, but Japanese associate them with crime and antisocial behaviour. Hiroyuki Hashimoto, committee chairman of a block of Hamamatsu flats, said Brazilians at first wanted to barbecue on their balconies and—nossa!—samba inside their flats; they were obliged to quieten down. One sign for the better, he says, is that Japanese and Brazilian children now skateboard noisily together outside. Yet immigration is still far from an easy option.