A total of 190,020 non-Spaniards took the decision to abandon the country during 2012, the Spanish National Institute of Statistics (INE) said on Friday.
The number of foreign nationals leaving the country was almost 13 times that of those who left Spain during 2011, meaning a 3.1 percent fall in the number of foreigners now residing in the country.
On January 1, 2013, there were 5,546,238 foreign residents in Spain, making up 11.77 percent of the total population of just over 47 million.
Of the 190,020 foreigners who left Spain in 2012, 84,246 were from other countries in the European Union, with the remaining 105,774 from non-EU nations.
The unemployment rate in Spain is standing at over 25 percent of the workforce.
This is reflected in the nationalities of those who have left Spain, with more Ecuadorians, Rumanians and Colombians moving back to their homelands than from any other country.
There are now more Rumanians living in Spain than people from any other country, followed by Moroccans, British, Ecuadorians and Colombians, meanwhile the Chinese are the nationality which have most seen their populations increase.
The average age of foreigners living in Spain is below the average age of Spaniards, with non-Spaniards at an average of 35.01 years old, compared with the average age of 42.78 for Spaniards.
They are more likely to live in Andalusia, Catalonia, Madrid and the Comunidad Valenciana, with these four communities home to 60 percent of all foreigners living in Spain, although the only part of the country which has seen the number of foreign residents grow is the Canary Islands with 335 more foreign citizens living there.
The departure of non-Spaniards was most sharply felt in Madrid, where the population fell by 54,933 in 2012, followed by Catalonia (28,307), while the parts of Spain which the highest percentage of foreigners have made their homes is the Balearic Islands (20.19 percent) and that with the lowest percentage of foreign residents is Extremadura with just 3.78 percent.