Passengers at Spain’s Bilbao airport. Santos Cirilo

The registered population had grown every year since 1998 – when these figures were first compiled – up until 2012. That year, it began to decline. The biggest drop was in 2013, when nearly half a million foreign residents left the country in the middle of a deep economic crisis. The downward trend has extended all the way to 2016, although the decline was less steep, with 68,723 foreign nationals leaving the country.

Currently, 90.2% of people registered as living in Spain have Spanish citizenship, with 9.8% holding passports from various other countries. The report also notes that around 150,000 foreign residents received Spanish citizenship throughout 2016.

Around 150,000 foreign residents received Spanish citizenship throughout 2016

Out of the 4,549,858 foreigners registered in Spain, Romanians make up the largest community from a EU member state (684,532), followed by the British (236,669) and Italians (189,005). Among residents from non-EU countries, Moroccans make up the largest group (747,872), followed by people with Chinese citizenship (207,593) and Colombians (145,055).

There was a considerable spike in the number of Venezuelans who took up residence in Spain last year (14,283), perhaps in the wake of growing turmoil in their home country.

According to the INE statistics which are yet to be finalized, the greatest declines were registered among Romanians (down 32,930) and British citizens (down 19,832) possibly concerned about the effects that Brexit will have on their current status in Spain.

Broken down by age, 15.9% of Spain’s population is under 16 years old, 37.3% is aged 16 to 44, and 28% is 65 and over. The average age of Spanish citizens is 42.9 years, compared with 35.8 among foreign residents. The INE shows a slight majority of women to men among Spaniards on the registers (51%-49%), whereas this trend is reversed among foreigners, of whom 50.4% are men.

The regions of Spain with the highest population continue to be Andalusia, Catalonia and Madrid. At the other end of the scale, those with the lowest populations are La Rioja, Cantabria and Navarre.