Like the Japanese, Koreans have long held to the notion ethnicity is the same as nationality. Although both have regional dialects, they cherish homogeneity of language, culture and ethnicity.

But both have walked into a demographic trap, as falling birth rates and low-to-zero immigration mean population decline over coming decades. Japan’s starts from a peak of 128 million people in 2005 and is likely to drop sharply to as low as 85 million to 95 million by mid-century.

According to South Korean projections, its population of 48 million will peak at 49.3 million in 2020, then fall to about 42 million in 2050 – about the same as in the late 1980s.

Nothing wrong with that, you might think, as both are extremely crowded. But by 2050, a third of their population will be aged 65 or over, a huge burden on the reduced taxpaying capabilities of the working-age groups. In South Korea, the old-age group is now just 11 per cent.

Japan has tried to fight the trend by turning to robots and automation, but in both countries demographics are forcing changes to the notions of ethnic homogeneity. Both now have substantial populations of foreigners, some legal, others not.

This week in Busan, the big southern port of Korea, I met Tran Thi Ngoc Thuy, 27, one of the increasing number of foreign women marrying Korean men. Such “multicultural” alliances have been between 11 and 13 per cent of all marriages in South Korea for the past several years.

That figure is partly due to young women postponing marriage to pursue their work and individual lives, and partly to an exodus of young women from rural areas. In the Korean countryside, about 40 per cent of marriages involve foreign wives. Most are arranged by agencies. Tran met her husband, a Busan office worker, on a double date when he was travelling through Vietnam. She was 22, he was 45, but she liked him.

Busan now has a network of offices to help wives from overseas, and the government has a media campaign to promote the idea of “multicultural families”. “In the past Koreans used to have this obsession with homogeneity, that we are all of the same blood,” said Lee Mi-Kyung, the manager of one of these welfare centres. “Now our surveys are showing that younger people are moving away from that idea.”

The biggest sources of new wives are China and Vietnam, and some from other parts of South-East Asia, suggesting Koreans want partners who don’t look very different and share a Confucian heritage on notions of family.

Both Japan and Korea have been experimenting with foreign temporary workers. Both have used “training schemes” that tended to be widely abused by employers, and used by many “trainees” to jump into the underground economy as illegal over-stayers. These have now changed to temporary work visas, but still with the expectation of eventual return.

In the vast Ansan industrial zone outside Seoul, Tran Van Chien, 31, is one of a dozen foreign workers at a grain-processing factory. He would like to stay in Korea, but is not allowed beyond two three-year stints. The foreign worker scheme makes it hard to change jobs, and thus bargain pay. Tran is aware Koreans doing the same work at the dock are paid substantially more.

Both Japan and South Korea now have substantial populations of illegal workers, perhaps 250,000 in each country, working on building sites and living in communal apartments while trying to avoid the frequent raids by immigration officials.

“The crackdowns are usually at bus stops and supermarkets, so they try to avoid these places,” says Lee Miran, who helps run an NGO supporting migrant workers in Busan. “But it’s a matter of luck or bad luck whether you get caught. They live with this anxiety every day.”

Lee thinks the South Korean Government is showing “two faces” to foreigners: the welcoming face for the foreign wives, the hard face for workers. In Japan, the idea of consanguinity is still hanging on. Aside from the substantial Korean- and Chinese-descended groups, resulting from pre-1945 Japanese occupations, the largest foreign groups are Brazilians and then Filipinos.

But Japan is not loosening up as much as it might seem. The 290,000-odd Brazilians living in Japan qualified for work permits because of a Japanese parent or grandparent.

Still, second- or third-generation Japanese from Latin America come with other racial admixtures exotic to Japanese, bring Latin tastes to their host communities, and require local officials to help out in Portuguese or Spanish.