MADRID, Spain—It wasn't so long ago that Spain was considered one of the most immigrant-friendly countries in the world. In 2005, the nation's European neighbors looked askance when the Spanish government instituted an amnesty program that granted residency papers to more than 500,000 foreigners. It was a potential first step to acquiring Spanish citizenship and, by extension, an EU passport. That wasn't the only chance non-EU citizens had to settle in the country through legal channels: The government has also allowed businesses to recruit for so-called hard-to-fill positions—ranging from medical technician to domestic worker—by hiring abroad. Last year, more than 200,000 foreigners arrived in Spain this way. Upon arrival, newcomers both legal and illegal could access Spain's health care system at no cost by registering at the local town hall.
Immigrants can still access the state safety net, but now that the economy has cooled, opportunities to settle in the country legally are becoming scarce. With unemployment now topping 10 percent, Prime Minister José Luis Rodríguez Zapatero announced this summer that the government would offer two lump unemployment checks to out-of-work foreigners if they agreed to leave the country and pledged not to return for at least three years. The initiative permitting overseas recruiting, meanwhile, looks likely to be phased out: Labor Minister Celestino Corbacho said in September that the number of work visas granted would "get close to zero."
Perhaps it was inevitable that the Spanish government would become more apprehensive about its newfound multiculturalism. The country has undergone a bewildering transformation: In the past decade, the immigrant population spiked to nearly 4 million, or 10 percent of the country's total population of 40 million. That is almost as high as the proportion of foreign-born residents in the United States, where immigrants comprise 12.5 percent of the population. Unlike the United States or European countries like Austria and Germany, Spain has little experience of absorbing outsiders. Traditionally, people left the country rather than settled there.
It was a mix of economics, politics, and Spain's colonial past that helped attract the masses. The economy took off in the 1990s, spawning millions of low-wage, low-skill jobs in construction, hotels, and domestic work in Spaniards' homes. Until three years ago, most newcomers arrived in the country without permission to stay. Even so, the vast majority found jobs building homes, waiting tables, cleaning houses, and looking after old people.
The numbers of illegal immigrants grew to the point where governments—both conservative and socialist—resorted to granting amnesties. Prime Minister Zapatero introduced the biggest in 2005, granting residency papers to about 600,000 illegal immigrants. He swore it was the last of its kind. But in 2007, Zapatero laid the groundwork for more men and women to move to Spain when he successfully pushed through legislation that will allow the descendants of Spaniards who fled the country during the dictatorship of Gen. Francisco Franco to acquire citizenship.
There was little backlash against this "law of return," perhaps because the would-be beneficiaries have a recent genealogical link to the mother country. Those men and women tend to be at the top of the immigrant hierarchy in Spain. Indeed, the fact that many immigrants hail from Latin America—they accounted for nearly half the people who qualified for amnesty in 2005—has eased Spain's transition to being a country of immigration. They generally speak Spanish, practice Catholicism, and usually don't look very different from their hosts.
Still, even a shared ethnicity with a swath of the new residents hasn't been sufficient to override Spaniards' anxieties. Part of the unease can be traced to the threat of terrorism. In January 2008, for example, the police detained 14 alleged al-Qaida operatives who were charged with planning suicide attacks in Barcelona. The arrests revived memories of the bombs Islamic fundamentalists detonated on Madrid commuter trains on March 11, 2004, killing almost 200 people.
The real turning point, however, was not the specter of violence but the financial downturn. While Zapatero's Socialist Party triumphed in the March 2008 general election despite a sputtering economy, the Conservative Party showed gains in some working-class regions that have traditionally been socialist territory. The conservatives' promise of reducing immigration appealed to Spaniards who felt most economically vulnerable—and put the socialists under increasing pressure to demonstrate they have a handle on the flow of immigrants. The cash-to-leave offer came a few months later.
Even before the election wake-up call, Zapatero had taken some highly publicized steps to curb illegal immigration. If there is an iconic image of outsiders arriving in Spain, it is Africans on battered boats, or pateras, washing up on the Canary Islands, a Spanish archipelago located off the northwestern coast of Africa. According to Spain's National Institute of Statistics, just 1 percent of the country's newcomers arrived this way. Nevertheless, the government launched a high-profile campaign to patrol the coast and has signed agreements with several African countries allowing migrants who are captured en route to be returned home. The policies have had an impact: The number of African migrants arriving in the Canary Islands fell from 13,000 in the first seven months of 2006 to 6,000 in the same period a year later. The government also stanched the flow of Latin American immigration by requiring visitors from countries like Bolivia and Ecuador to apply for visas. (The idea is to ferret out those who plan to work illegally in Spain before they arrive.)
In addition to cracking down on illicit entry, the government created pathways for more immigrants to come to Spain legally, principally by expanding businesses' prerogative to hire abroad. Until three years ago, immigration was theoretically controlled by strict quotas. So, for example, in 2004, hotels, restaurants, and bars were permitted to employ 3,280 immigrants through legal channels. (The following year, 70,000 workers from those sectors applied for amnesty, which gives a sense of how many men and women were hired under the table.) The Zapatero government figured that providing businesses with more flexibility would have the effect of reducing the number of people who arrived clandestinely, so it increased the quantity of workers that could be hired from outside the country to the point where 234,457 foreigners arrived through the program in 2007. That's almost seven times as many as were permitted to enter legally three years earlier. Now, of course, the government has hinted that path will be closed off.
The Spanish government has argued that its recent steps are motivated by pragmatism rather than any anti-foreigner animus. Jobs are no longer plentiful, and in that environment immigration should be discouraged and unemployed non-Spaniards enticed to pack their bags. The underlying premise of the government's rationale—namely, that immigration should closely mirror the job market—hints at some of the problems the country may have in the years ahead. While some immigrants will probably take advantage of the government's offer to return home, most will stay. And Spaniards have almost no experience harboring a large immigrant population when the economy is anything less than white-hot.
There are signs that the integration process may not be smooth. Even when the economy was on sounder footing, many of the immigrants I spoke with in Spain said they felt alienated from their new home. That was true even when they spoke the language and had acquired Spanish citizenship. The comment of one Ecuadorian woman I met seems prescient in retrospect, given the government's emphasis on reducing the number of foreigners in the country as the economy contracts. "Immigrants here aren't seen as people," she said. "They are viewed as instruments of work."