Berlin (AFP) - As Germany takes in record numbers of people fleeing Syria and other war zones, its large Turkish community is warning the country not to "repeat the mistakes of the past".
Europe's top destination for refugees is also home to the world's largest Turkish diaspora, counting three million, a legacy of Germany's post-war so-called guest worker programme.
From the 1960s, as then-West Germany enjoyed its "economic miracle" boom years, the government invited Turkish and other foreign labourers to man its car plants, coal mines and steel foundries.
"What went wrong in the past was that the guest workers were seen as just labourers who would go home again," said Gokay Sofuoglu, chairman of the Turkish Community in Germany.
Instead, the vast majority chose to stay, becoming by far the largest ethnic minority in Germany. It's so big that today Turkish political parties come to campaign for the crucial expat vote.
About 900,000 Turks -- 20 percent of them women -- arrived between 1961, when the Turkish-German labour exchange pact was signed, and 1973, when the oil crisis and rising unemployment put paid to it.
While Germany long resisted the notion that it had become a country for immigration, the "guest worker" programme's legacy irreversibly transformed German society.
Today, the guest workers' children and grandchildren are seen in German politics, the media, on the football pitch and in the pop music charts.
The Turkish greengrocer has become a common shopping fixture, and the Turkish kebab now rivals the sausage as the nation's most popular fast food.
- Regrets and recriminations -
Still, a debate about integration continues, with regrets and recriminations voiced on both sides.
Many elderly Turks still have a poor command of the German language, which poses problems both for them and their host society, says Aykut Duzguner, president of the German-Turkish Society of the southwestern city of Stuttgart.
For many years, Germany did not provide much language training, permanent residency rights or other help to a group it expected to leave again soon enough.
The debate around integration only started much later, said Gulistan Gurbey, social science researcher at Berlin's Free University.
And even though second and third-generation Turkish Germans have done much better in training and on the job market, gaps remain in higher education and the professions, he said.
The unemployment rate for people of Turkish origin in Germany stands at 10.4 percent against the national average of 6.4 percent.
Turkish groups in Germany complain of discrimination in the labour and housing markets and in education, creating frustrating hurdles to full inclusion in German society.
In 2010 former central banker Thilo Sarrazin published the controversial book "Germany Abolishes Itself", arguing that undereducated Muslim migrants were making Germany "more stupid" -- only to see the text become a runaway bestseller.
Germany only last year granted German-born children of Turkish couples the right to hold two passports as adults.
Duzguner warned that, amid the historic influx, Germany must "avoid repeating the mistakes of the past".
"It must quickly integrate people who come to us. Training them quickly, linguistically and professionally, is the key to success," he said. "Germany may benefit."
- Opportunities and risks -
Chancellor Angela Merkel has said the new refugee influx, if well managed, could "present more opportunities than risks".
This year alone, the country expects one million new migrants -- more than one percent of the national population, Vice Chancellor Sigmar Gabriel has said.
Merkel warned this month that "we should learn from the experience of the 1960s, when we invited guest workers here, and from the very start give the biggest priority to integration."
At the same time, she said, "we must make clear which rules apply here, and we should not watch on if certain communities turn inward and reject integration or build parallel societies".
For now, polls suggest most Germans back Merkel's can-do approach, reflecting changing societal values.
Many citizens now readily agree that Germany is an immigration society -- and that this is the only hope for a fast-greying economy with one of the world's lowest birth rates.
Five years ago, then president Christian Wulff said that Islam has become a "part of Germany", a phrase Merkel and other politicians have since adopted.
Gurbey, the social science researcher, said that Germany has in recent years "learned a lot ... and can apply this experience to the refugees who will remain here".
Sofuoglu greeted the welcoming stance of the Merkel government and said "the attitude of saying immigrants will be integrated from the very beginning is of course a positive thing".
Perhaps, he added, "German politics has learned the lessons of history".