AFP

IN THE boom years, migrants picked fruit in southern California's orange groves, worked on construction sites in Spain and Ireland, designed software in Silicon Valley and toiled in factories all over the rich world. Many will continue to do so, despite the economic downturn. But as unemployment rises in most rich countries, attitudes towards migrants are hardening.

Attacks on Romanians in Northern Ireland and on Indian students in Australia are the most visible and disturbing manifestations of growing xenophobia. In response, many governments are also tightening their migration policies, according to a report published by the OECD on Tuesday June 30th. Governments are reducing quotas for foreign workers and imposing tougher entry requirements on them in an effort to control the flow. Some are even paying existing migrants to go home.

Several countries have cut the numbers of people allowed to enter through official programmes. Spain let in 15,731 foreign recruits under its “contingente” scheme in 2008, but slashed the quota to a tiny 901 this year. The Italian government has announced that no non-seasonal workers will be admitted in 2009, whereas 70,000 were officially admitted in 2008. South Korea welcomed 72,000 migrants under its Employment Permit Scheme last year, but this year's limit is set at 17,000. And Australia, which had earlier said that 133,500 skilled migrants could enter the country this year, has now lowered the limit to 108,100.

Many rich countries maintain lists of occupations for which there is a shortage of domestic workers, giving foreigners with the appropriate skills preferential treatment. Several countries have reduced the scope of such lists drastically. In Spain, for example, the list issued in October 2008 had nearly a third less professions listed than the previous version.

Some countries have made it harder for employers to hire foreigners by making them jump through more hoops than before. In Britain, for example, employers hoping to hire certain kinds of skilled foreigners face tougher rules about where job advertisements must be placed. In America, the “Employ American Workers Act” attached to the fiscal stimulus bill, puts stricter conditions than before on any company that receives government bail-out money and wants to hire skilled foreigners under the country's H-1B visa programme. As a result, some American banks and other financial-services firms have rescinded job offers to foreign-born graduates of American universities and postgraduate programmes. Some of those who have the paperwork allowing them to work are finding it harder than ever to renew their permits.

Some countries are getting creative in their attempts to reduce not just fresh flows of migrants, but also the stock of migrants already present, by encouraging people to go home. Some migrants to Spain from outside the EU, for example, became eligible in November last year for a portion of their Spanish benefits if they returned home and promised not to return for three years. The Czech government is promising to provide the air-fare and €500 ($704) to workers who have been laid off. About 1,100, mostly contract labourers from Mongolia, had accepted by the end of March.

Given that many more locals find themselves without jobs in the downturn, it may seem sensible to limit immigration. It is hardly surprising that Spain, where unemployment is 18%, is looking particularly hard for ways to stop migrant flows. But the OECD's analysis points to several problems with this. Lessons from the 1970s, when the recession that followed the oil-price spikes led Germany, France, and Belgium to clamp down on immigration, suggest that such anti-migrant rules can persist even when they have outlived their use.

In general, given the politics, it is much easier to tighten controls, as countries are doing now, than to loosen them when the economy starts growing again. There are also genuine shortages of workers in some professions, such as medicine and certain technical jobs such as engineering, which locals cannot easily and quickly retrain for. Clamping down on the total flow of migrants, therefore, risks making such shortages worse.

In addition, some measures to limit official migration, such as making it harder for temporary work-permit holders to renew their permission to stay, risk pushing people into staying on illegally. Paying someone to go back home for three years, for example, would be counterproductive if the economy rebounds by the end of 2010 and such workers are in demand once again. When the world economy emerges from the doldrums, some countries that have passed legislation restricting the ability of local companies to hire foreigners may find themselves lacking the flexibility that migrants bring. Migrant workers, for example, accounted for over two-fifths of employment growth between 2003 and 2007 in Austria, Denmark, Italy and Spain, and 71% in the same period in Britain.