By Danny Wood
BBC News, Madrid
As the British government considers an amnesty for illegal immigrants, it might want to take a look at the Spanish example.
Thousands of illegal immigrants are still arriving by boat from Africa
In May last year a three month amnesty for illegal immigrants came to an end.
The result was about 700,000 people were issued official papers to allow them to live and work in Spain legally.
The Spanish government said the amnesty was part of an immigration policy based on the economic needs of the country, to satisfy demand in the construction and services sectors.
It was also about getting millions of euros of taxes and legally protecting often exploited, underpaid immigrants languishing in black market jobs.
Many European Union countries were very critical of the amnesty and like the conservative opposition in Spain, said it would act as a magnet to encourage further illegal immigrants, hopeful of more Spanish amnesties in the future.
Some Spaniards look at the wave of migration currently arriving in the Canary Islands and believe that "magnet" effect has come to pass.
But most Spaniards think the amnesty was a good idea and has worked well.
And this was not an open door policy available to every illegal immigrant. In fact migrants' groups criticised the amnesty for being too strict.
Over 700,000 workers issued with papers
Ecuadoreans were largest group to apply
8% of population are immigrants
50% of Spaniards concerned by immigration
Only by presenting a six-month work contract and evidence that they had lived in the country since August 2004 could immigrants claim work and residency papers.
In the end, Latin Americans prospered most from the policy. Ecuadoreans were the largest group to apply under the amnesty, followed by Romanians and Moroccans.
Many thousands of these people were women employed as domestic helps in Spanish homes, or men working in the construction or agricultural sectors.
Joaquin Arango, professor of sociology at Madrid's Complutense University, thinks the amnesty was the right thing to do.
"I think now there is a serious attempt in Spain to develop a serious policy. This amnesty is part of process of reform, part of an effort to fight illegal employment, to fight the underground economy and to come to terms with reality."
The Spanish government has recognised that one the biggest illegal immigration problems - apart from the thousands of Africans arriving by boat in the Canary Islands - is the lack of control on those already in the country.
'We need workers'
My electrician, Gerardo Sanchez, 47, surrounded by cables, pauses to give his view.
"Well, it's a two sided thing. Yes we need workers here, but immigration is still out of control," he says.
"There are too many people coming here without work contracts or the prospect of work. The amnesty was a good idea but we still need to find better ways of stopping illegal immigration."
My butcher, 34-year-old Mario Ferreiro (not his real name), also thinks the amnesty was a good thing but he says the government needs to send a stronger message that this amnesty was just a one off event, not to be repeated.
"I'm not sure how it would work in England. But it's good to have more people working legally and paying taxes. But any amnesty needs to be tightly controlled with strict conditions."
This recent Spanish amnesty is not the first time Spain or other countries in Europe have launched amnesties for illegal immigrants.
Mario's Ecuadorian wife benefited from an amnesty (before he met and married her, Mario is quick to point out) launched by the then conservative government about eight years ago.
So a lot of Spaniards think the amnesty was a good idea but they are still very concerned about what they see as out of control illegal immigration.
Over the last five years the population of immigrants living in Spain has grown by 400% to three-and-a-half million. It's a rapid rise, but immigrants only make up 8% of Spain's population - no higher than most other European countries.
Nonetheless, surveys suggests that over 50% of Spaniards are very concerned by the number of immigrants.
And in recent months other issues are challenging Spain's basically tolerant attitude towards migration. Record numbers of people have been arriving from Africa in the Canary Islands by boat. Spaniards feel that Europe should do much more to help Spain with this problem.
The other issue is crime, one that often sets of anti-immigration fears in many countries. There has been lots of media coverage of a recent spate of house raids by gangs that include Eastern European and Latin American immigrants.
So many Spaniards would probably say that a one-off amnesty with strict conditions does work, but it does not completely solve, or make them feel any more comfortable about the immigration issues their country is facing.