MADRID/COPENHAGEN (Reuters) -- On a cold winter's morning beside the Atocha train station in central Madrid a dozen men wait silently for contractors in the market for cheap illegal laborers.
About 2,500 km north, at a sprawling slaughterhouse in the Danish countryside near Horsens, butchers in white overcoats leave their shift tired but garrulous, laughing in Polish.
Skilled migrant workers seeking employment in Europe would do well to head north. Foreigners in Spain are the first to lose their jobs as a decade-long construction boom comes to an end, but in the Nordic countries businesses can't get enough of them.
"It's a contrasting trend," said Jean-Pierre Garson, head of the international migration division at the Organisation for Economic Co-operation and Development (OECD). "The European Union is a free market, with free settlement of people. Qualified people are now more mobile."
Nordic countries used to be known for inflows of refugees from war-torn countries, but now they're morphing into magnets for skilled migrant workers.
Denmark issued about 23,000 work permits to foreigners last year, up 41 percent from 2006 and a six-fold increase from 2002. Poles received a third of the permits issued in the fourth quarter. Meanwhile, only about 1,000 asylum-seekers were granted Danish residence last year -- down from more than 6,000 in 2001.
Poles overtook Swedes as Norway's biggest minority last year. Finland has produced slick television ads in English to persuade migrants to move north to the land of Santa Claus.
To the south, Spain -- which used to be a source of emigration -- has been relying on imported labor to drive growth, especially in construction and services.
But business is no longer brisk. Rising interest rates and a glut in housing supply have snuffed out a decade-long construction boom, so demand for immigrant workers is shrinking.
The number of unemployed immigrants in Spain rose by a quarter in 2007, according to government figures; unemployment among immigrants working in construction rose by over a half in the same period.
"(Business) has fallen off a lot," said an Ecuadorean laborer, declining to give his name as he stood outside the Madrid station wrapped in a heavy coat and hat. "Before, there was work even on Saturdays and Sundays, but now it's just nine hours a day, weekdays."
Around 55 percent of immigrants are on temporary contracts against 27.9 percent of native workers, said Ramon Mahia Casado, an economist at the Autononous University of Madrid.
"They are the first to suffer," said Casado. "The first workers an employer will fire are those on temporary contracts."
In Madrid, four towering glass and steel buildings are taking form in a prestigious development hailed as the city's new financial centre, built on soccer club Real Madrid's old training ground.
Issufo Djalo, a wiring specialist from Guinea-Bissau, said there was still a steady stream of work at this emblematic development. But it is now an employer's market.
"About five months ago they would pay for extras, like our transport," he said. "Now they've stopped doing that. Before, people left if they weren't happy. Now they stay put."
At the slaughterhouse of Danish Crown, the world's biggest meat exporter, nearly 15 percent of the workforce is foreign -- mostly Poles and Germans. The company says it pays Polish workers the same as Danes -- between 25,000 and 30,000 crowns ($4,800-$5,800) per month.
That's enough for Mariusz Kogut to afford to fly twice a month to his hometown of Wrocklaw to see his wife and two children.
"It's 100 times better to work here," said Kogut, 32, who moved to Horsens last year with four Polish friends after five years as a butcher in Germany. "The money is better, the working conditions are better and the manager is more polite."
This highly automated plant -- where robots oversee the butchering of 80,000 pigs a week -- still needs humans, and the company cannot find enough of them in Denmark. Unemployment is at its lowest in more than three decades at 2.7 percent.
The company hires 50 to 80 Poles at a time, trying to recruit in groups to make it easier for them to live together in a foreign country. It pays for Danish lessons and its monthly magazine, 'The Meat Hook,' features articles in Polish.
With their hunger for immigrant labor, the Nordic countries are following a trend set by Spain, which has an ageing population and one of the lowest birth rates in the world.
"A country like Spain at the end of the seventies that collectively decided not to have children or to have them in sharply reduced numbers elected -- probably without knowing it -- to have immigration in significant amounts, especially if it wanted to grow economically," said Josep Oliver Alonso, economist at the Autonomous University of Barcelona.
The Danish government has estimated the economy will see a shortage of between 100,000 and 150,000 workers in the next five years.
Denmark's business lobby, the Confederation of Danish Industries, has called for less restrictive laws for immigrant workers, warning Danish companies are struggling to meet demand.
"Denmark is looking for more qualified people and it's very difficult to get them," said OECD's Garson.
The Confederation helps Danish companies recruit through job fairs in Sweden, Poland and Germany. At its next fair in April in Malmo, Sweden, it will mostly be looking for shelf stockers and bus drivers.
Additional reporting by Wojciech Moskwa in Oslo; Editing by Sara Ledwith