Traditionally, waves of emigrants have headed to Latin America, with flows peaking at the beginning of the 20th century. From 1905-1913, 1.5 million Spaniards left the country for Argentina, Brazil, Uruguay and Venezuela. Following interruptions stemming from the World Wars and the Spanish Civil War (1936-1939), emigration to these countries began anew. Between 1946 and 1958, about 624 000 people left the country for overseas. Then, as Western European countries gained in popularity as destination countries, Latin America no longer seemed as attractive, and the number of transoceanic emigrants sank steadily, reaching insignificant levels by the mid-1970s. In total, approximately 300 000 people joined this final wave of emigration to Latin America between 1958 and 1975.
Only when Northern and Western European countries began to recruit foreign workers, following a period of economic development in the 1960s, did Spanish emigration alter its direction. Spain became a source country of the "guest workers" needed by France, Germany and, later, Switzerland, a trend that lasted until the mid-1960s. The economic and energy crises of 1973/74 led to the end of foreign labour recruitment by those countries, resulting in a drastic reduction in emigration from Spain, the primary cause for which then became family reunification. From 1960 to 1975, approximately two million Spaniards migrated to other European countries. In addition to long-term labour migration, seasonal migration was a significant phenomenon, especially in the agricultural sector. During the same time frame, approximately 1.5 million Spanish migrants headed abroad, especially to France, to work at harvest time.
From the mid-1970s to 1990, approximately 15 000 people per year went to other European countries through Spain's "controlled" emigration
These forms of emigration were accompanied, somewhat delayed, by considerable return migration. Of the two million emigrants to other European nations between 1962 and 1979, 1.5 million returned. While the number of repatriates from Europe ranged around 15 000 per year between 1980 and the second half of the 1990s, the figure for some years after 1999 was closer to 20 000 per year, although this figure has declined again slightly in recent years (2006: approx. 16 700). This continuing return to Spain is most likely due to the fact that, now nearly five decades following the signing of agreements on the recruitment of "guest workers", an ever-increasing number of migrants are reaching retirement age and wishing to spend their remaining years in their home country. Swings in return migration from Latin America have been more extreme: from the mid-1990s, when there were approx. 8 000 per year, numbers increased sharply as a consequence of the crises in Latin America (2002: 30 400) but have meanwhile reached the same level as those for Europe (2006: 16 600).
Spain's foreign population has been increasing slowly since the middle of the 1980s. In the beginning, Northern and Western Europeans, in search of a (retirement) residence in a warmer climate, accounted for a considerable proportion of incoming migrants. However, overall migration trends have changed, with increased levels of south-north migration from the "Third World" and, after the fall of the Iron Curtain, east-west migration from Central and Eastern Europe. These new trends, combined with a period of prolonged economic growth in Spain, have led to a rise in the number of migrant workers entering Spain.
In 1975, there were approximately 200 000 foreigners living in Spain. This number increased fivefold in the following 25 years to reach 1 million by the end of the century (not including undocumented immigrants). This represented 2.5% of Spain's then population of 40 million. At the end of 2007, around 3.98 million foreigners were in possession of a residence permit, with the number of permit holders having grown at a rate of approximately 20% per year since 2000. From 2004 to 2005 it grew by almost 40% as a result of a legalisation campaign (see below), and again from 2006 to 2007 by more than 30%. Data derived from municipal registries (padrón municipal) suggest that the actual total number of foreigners residing in Spain is considerably greater.
According to these municipal figures, foreigners represented 11.3% of the total population of 46.1 million at the beginning of 2008. If, instead of the number of registered foreigners, one considers the number of foreign-born people in Spain (5.25 million), a quite different view of immigration to Spain emerges. These people can be divided into three categories: foreigners, naturalised citizens and Spaniards. This last group is comprised primarily of just over half a million second and third generation Spanish emigrants born throughout Europe, Latin America and Africa who have returned to Spain.
Overall, the high level of immigration has been responsible for Spain's considerable population growth. For example, the country's population grew by 2.1% from 2004 to 2005, 1.4% from 2005 to 2006, 1.1% from 2006 to 2007 and 1.9% from 2007 to 2008, putting Spain's growth (in absolute numbers) far ahead of other European countries in this respect.
The reasons for Spain's transformation from emigration country to immigration country are diverse and caused both by Spain's domestic situation and socioeconomic and political developments abroad. The country's membership in the EC/EU and its relatively continuous economic growth have made Spain an attractive destination. Moreover, labour shortages have arisen in certain sectors because it is no longer possible to attract Spanish workers, who have become accustomed to a higher standard of living, for certain occupations (for example, in the agricultural sector). These shortages have also been due to a reduction in migration from rural to urban areas, which has curtailed the supply of unskilled labour (for example, domestic workers)
Among the developments abroad that have contributed to Spain's transformation into an immigration country were the restrictions established through immigration reforms in places like Germany, France and Switzerland beginning in the mid-1970s, and the US in the mid-1980s, which made Spain especially attractive to migrants from Latin America and the Philippines. The emergence of dictatorships in nearly all Latin American countries as well as in the former colonies of Equatorial Guinea led to a growth in migration spurred by political circumstances. Later, however, migration from these places became increasingly motivated by economics.
In an age of highly developed means of travel, geographical location generally carries less weight when it comes to choosing a migration destination; nevertheless, location remains relevant for Spain. The Mediterranean, in particular the Strait of Gibraltar, offers little challenge to reaching Spain and the European Union.