SPAIN'S population fell last year the first time since annual records began in 1998 as immigrants left in droves because of a steep recession that has tipped one in four people in the country out of work.

There were 47.1 million residents in Spain as of January 1, 205,788 fewer than during the same time last year, according to provisional figures from the national statistics institute.

The drop was entirely accounted for by a fall in the number of registered foreign residents, mostly from Spain's former colonies in Latin America.

While the number of native Spaniards grew last year by 10,337, the number of foreigners fell by 216,125 to 5.52 million - the second straight year that the number of immigrants living in the country has fallen.

Traditionally a nation that sent immigrants abroad, Spain saw the number of foreigners living within its borders take off from around half a million in 1996 to around five million in 2006 as a labour-intensive building boom lured low-skilled workers from abroad.

But the flow of immigration to the country has slowed since Spain entered into its worst recession in decades at the end of 2008 as the global credit crisis hastened a correction already underway in its key property sector.

The Spanish economy, the eurozone's fourth-largest, contracted by 1.4 per cent last year, the second worst yearly slump since 1970, while unemployment soared to a record 26 per cent.