FOR years now, free trade and free movement of capital have been respectable economic tenets, espoused—if sometimes reluctantly—by most politicians. But no sane politician in the rich world would advocate free movement of labour. As a result, most people are trapped in their native lands, never likely to have a legal opportunity to see the world outside.

Philippe Legrain, a liberal economist who once worked for The Economist, has already written a book stoutly defending globalisation. Now he takes on an even more emotive subject. There is not a shadow of doubt about his own views. He wants open borders. He believes that they will, on balance, enrich both sending and receiving countries; he thinks diversity generally makes life more interesting; and he detests bureaucratic restrictions on human freedoms. “Immigrants are not an invading army,” he points out. “They come in search of a better life. They are no different to someone who moves from Manchester to London, or Oklahoma to California, because that is where the jobs are. Except that a border lies in the way.”

Mr Legrain has assembled powerful evidence to undermine the economic arguments against immigration. In the case of skilled migrants, that is relatively easy. But the migrants who arrive in the back of lorries and huddled in small boats are unskilled. For them, there are hardly any legal tracks across borders. Yet, argues Mr Legrain, they too bring economic benefits and do “little or no harm” to the wages or employment prospects of native workers. As for the economic impact on sending countries, many now gain more from remittances than from official aid or inward investment. He quotes approvingly a government minister from the Philippines who says: “Overseas employment has built more homes, sent more children of the poor to college and established more business enterprises than all the other programmes of the government put together.”

Mr Legrain makes a robust economic case—though he surely understates the impact of immigrants on holding back the pay of the poorest, often themselves the children of immigrants. He is more successful at rebutting the argument that taxpayers give willingly only to those with whom they feel some kinship and that immigration, therefore, jeopardises support for the welfare state. A willingness to pay taxes to support the poor is independent of levels of immigration, he shows.

Less convincing are his proposals for encouraging immigrants to go home after a period of working abroad. If immigration were temporary, he reasons, people might tolerate it more readily. So why not get immigrants to post a bond on arrival, say, or have a portion of their wages withheld until they leave? The trouble with such ingenious ideas is that immigrants from the world's poorer countries have many reasons to stay overseas, especially in Europe or America. The financial gains are huge, but they are by no means the only rewards. Life is much easier where there is the rule of law, less petty corruption and a better health-care system than exists at home.

But hostility to immigration is not just, or indeed mainly, about economics. It is based on fear of change and on racism. It has also, since the World Trade Centre attacks, been based on growing worries about Muslim terrorism. Such anxieties are not easily assuaged by economic logic. It is striking, for example, how little serious protest there was in Britain at the absorption of over 500,000 east European immigrants in the two years after Poland and nine other countries acceded to the European Union in May 2004. Surely at least one reason was that these white Christian Europeans look and (seem to) think extraordinarily like most British people, and their children and grandchildren will be distinguishable only by their unpronounceable names.

By contrast, many Muslim immigrants and their children have become more estranged, not less. Their ambivalence towards the West and its secular liberalism has appeared to grow, not diminish. It is, of course, wholly unreasonable to see most Muslims as potential terrorists—but reason may not have much chance here.

So no government in the rich world is likely to open its borders to all comers, as Mr Legrain urges. For politicians, the tricky question is who to let in. And how to define a coherent policy? The harsh truth is that voters find it easier to accept immigrants who look and behave as they do than those who are different. That, as a basis for policy, still leaves most of mankind outside the gates.