While many European countries say asylum seekers could damage their economies if they let in too many, Germany is counting on the record numbers pouring across its borders to save its own.
Berlin estimates its working age population will shrink by 6 million people by 2030 as the number of deaths outstrips births, making it hard to keep the economy growing.
"If we manage to quickly train those that come to us and to get them into work, then we will solve one of our biggest problems for the economic future of our country: the skills shortage," Economy Minister Sigmar Gabriel told parliament on Thursday.
Matching skills gaps with newcomers while keeping the population on side will be a challenge for the government, but many businesses have already woken up to the potential of the estimated 800,000 people expected this year.
Daniel Kok, owner of a small flooring business in the west German city of Dortmund, had been searching for a suitable trainee for over a year when the local trades association asked if he would take on an asylum-seeker.
Kok was sent Tesfagebriel Abraha, a 31-year-old refugee from Eritrea who had never heard of parquet floors before he started laying them. After a successful two-week trial in late July, he is now doing an apprenticeship that lasts until 2018.
"I didn't hire Abraha out of starry-eyed-idealism but because he is qualified, enthusiastic and eager to work," said Kok, who said he had had countless unsatisfactory trainees.
Marcel Fratzscher, head of the DIW economic institute, said immigrants had filled more than two-thirds of the almost 1.5 million new jobs created in Europe's largest economy over the past five years.
"We need workers if we want to maintain Germany's economic strength," he said.
BOON OR BURDEN?
Located in North-Rhine Westphalia, Germany's most populous state that takes around a fifth of the new arrivals, Dortmund hosts around 4,000 refugees and expects the number to double by the end of the year.
The industrial city has suffered from a decline in coal mining and its unemployment rate, at 12.7 percent, is twice the national average.
A string of European leaders have cited high unemployment as a reason for refusing to take in even just a few thousand of the hundreds of thousands of people pouring into Europe to escape war and poverty in the Middle East and Africa.
But in Dortmund, the local Chamber of Trades (HWK) sees it differently, saying almost a quarter of businesses in the city have open positions.
"The jobs are there but there aren't always appropriate applicants that have the right qualifications," an HWK spokeswoman said, saying apprenticeships did not appeal to many Germans, who preferred to go on to university after school.
To fill the gap, it invited some 85 refugees to take language and maths tests earlier this year, choosing 15 from Syria, Congo and Eritrea to train as opticians, electricians, mechanics, metal workers and parquet floor fitters.
One of them was Abraha, who fled Eritrea by foot in 2012 after six years in the military. He made it to Germany in November and had begun learning German at his refugee shelter.
The HWK spokeswoman said some companies have offered extra training places for refugees who were especially motivated even though they may have filled their quota.
Apprenticeships are not bound by the minimum wage of 8.50 euros ($9.52) an hour. Trade unions have said care must be taken to prevent migrants being exploited as cheap labour.
Asked if the influx of refugees might drive down pay, the HWK spokeswoman said remuneration for apprenticeships is fixed by collective wage agreements and there was no separate negotiation of salaries.
Berthold Schroeder, head of the HWK in Dortmund who initiated the pilot project, said small companies can sometimes act as a substitute for families and help newcomers settle in.
But there are other barriers to the influx of refugees providing a quick answer to Germany's demographic dilemma.
While many are highly-educated, particularly those from Syria, around 20 percent are illiterate, Interior Minister Thomas de Maiziere said, potentially increasing the burden on the state. Labour Minister Andrea Nahles said the number of recipients of benefits could rise by up to 460,000.
Skill shortages vary from region to region, making them hard to match with qualified newcomers. The Federal Employment Agency lists mechanical engineers, trades such as plumbers, heating and sanitary professionals as well as the I.T. and health sectors, especially care workers, as being in short supply.
To speed up access to the labour market, the government has reduced waiting times before asylum seekers can work and removed the requirement to seek approval from employment authorities before starting apprenticeships.
But there is no guarantee those who complete their training can stay, which critics say may put off potential employers.
Ulf Rinne, Deputy Director of Research at the Institute for the future of Work (IzA) in Bonn said it was an illusion to think that refugees could resolve the shortage of skilled workers in the short term because so much was open to chance.
"In the mid to long-term they can of course help to alleviate the demographic problems in Germany, in particularly if we as a society manage to successfully integrate them into the labour market," he said.
"But this is of course a challenge that faces us, there is no sure-fire success."