WHEN Richard Fetyko left his native Slovakia in 1992 for a high-school study-abroad programme, he planned to return at the end of the year. Instead he spent 22 years in America, earning university degrees and working in banking and on Wall Street. “I didn’t really see myself able to apply my skills in Slovakia,” Mr Fetyko says. But as Slovakia’s economy matured, that started to change. In 2014 he got an offer from an investment firm in Bratislava, and came home.

Mr Fetyko was part of a wave. From 1992 to 2015, so many people left eastern Europe that its population shrank by 18m, or about 6%, according to UN figures. The trend accelerated as the region’s countries entered the European Union. It was a sour turn for the EU’s new members: rather than making them as rich as western Europe, accession lured their workers to move there.

In the west, especially Britain and France, that led to fears of “Polish plumbers” undercutting local wages. On August 23rd Emmanuel Macron started a trip to three central and eastern European countries to discuss how to stem the flow. Yet there are signs that it may already be ending. Thriving economies, rising wages and low costs of living seem to be drawing more émigrés home. A report in July by Colliers, a real-estate firm, heralded a “labour-force boomerang” as professionals come back from the west.

The EU’s lack of visa requirements makes internal migration hard to track, but some figures are suggestive. Since 2010, net emigration has fallen in nine of the 11 post-communist EU members. Net migration to Britain from the eastern countries that joined the EU in 2004, which was above 30,000 in every year from 2010 to 2015, fell to 5,000 last year. That was partly because of Brexit, but partly a broader phenomenon of rising demand for labour in eastern Europe. “It’s not old people, it’s workers that are returning,” says Mark Robinson, the author of the Colliers report.

Jobs are easy to find: unemployment rates run from 5.3% in Romania down to a remarkable 2.9% in the Czech Republic. Fully 73% of Hungarian manufacturers say they cannot find the workers they need. That drives wages higher: salaries are up 5% in the Czech Republic compared with a year ago, and in Hungary by an extraordinary 15%, helped by a big hike in the minimum wage. Tax levels, compared with western Europe, are rock-bottom: the top income-tax rate is just 25% in Slovakia and 10% in Bulgaria.

Cheap housing is another lure. Per square metre, a flat in Prague costs about half as much as one in Dublin, and one-seventh as much as in London. The cost of living is so low that an analysis of net incomes in Europe by Deloitte, a consultant, listed the Czech Republic, Slovakia and Poland as three of the continent’s top five earners (alongside Switzerland and Malta).

But it is not just finances that bring expats home. In 2010 Milos Fusek left his hometown of Dubnica nad Vahom, in western Slovakia, for Ireland, where he worked in a warehouse and later in logistics and marketing. In 2015 he came home to run a window-manufacturing company with his father. For him, family was the decisive factor. Others find they can reach more senior positions in their home countries than in the west.

And there is another reason: a sense of patriotic optimism. Tomas Melisko, a Slovak who earned his law degree in Britain, gave up a banking job in Vienna in 2015 to work as a real-estate consultant in Bratislava. Besides being closer to friends and family, he feels that “by coming back I bring the skills I have accumulated, and give back to society”. Westerners worried that eastern Europeans will continue to flood westwards should keep in mind that many of them love their countries, too.