Take a look at the beta version of dw.com. We're not done yet! Your opinion can help us make it better.
This year alone, more than 140,000 Afghans have fled insecurity and the Taliban's resurgence. The majority of them have ended up in Germany. In Berlin, Ashraf Ghani and Angela Merkel vowed to stem the flow of migrants.
His countrymen, Afghan President Ashraf Ghani told journalists on Wednesday during an official visit to Berlin, needed to "understand that the streets (in Germany) are not paved with gold."
He was referring to the huge numbers of Afghans fleeing to Europe, and in particular to Germany: More than 140,000 Afghans have left their country this year alone and - largely undeterred by a recent campaign by the German embassy urging Afghans to stay at home - many more continue to queue up outside Afghanistan's passport office in Kabul every day, according to local media reports.
A year into Ghani's presidency, his country continues to be wracked by a resurgence in Taliban activity - its fighters briefly took control of the northern city of Kunduz in late September - and IS-linked groups are gaining ground.
Coupled with economic uncertainty and wide-spread corruption, many Afghans are desperate to start a new life abroad – and for most, their destination of choice is Germany, where they now comprise the second largest group of asylum seekers after Syrians.
Merkel: Economic reasons don't qualify for asylum
But German authorities, faced with an unprecedented influx of refugees in recent months, have made it clear that they are unwilling to accept all applicants from Afghanistan and that those who were denied asylum will be deported.
"We will have to deport people to Afghanistan", Chancellor Angela Merkel said at the packed joint press conference with her Afghan counterpart in Berlin.
Afghans coming to Germany hoping to improve their living standards did not qualify for asylum. "Where refugees come hoping for a better life - and I know that his hope is big for many - that is no reason to get asylum status or residency status here," the chancellor said.
Germany would, however, meet its humanitarian obligations for Afghans under threat, she added, because they had worked with foreign forces, such as the Bundeswehr.
In the past, those perceived as collaborating with foreign powers have repeatedly been targeted and killed by militants.
Afghan authorities, too, have desperately appealed to their citizens to stay.
In an interview with DW's Conflict Zone this week, Ghani urged his country's elite to make the most of opportunities at home.
"If the families of the privileged continue to live abroad, they will not have careers; if they live abroad, they will become dish washers."
And so, both Ghani and Merkel vowed to create opportunities in Afghanistan: Germany, Merkel said, would support the creation of safe zones inside the country, to provide people who "live in areas of insecurity with a zone where security is high."
Merkel said Germany would intensify its development work, providing both housing and vocational training in the "safe zones."
"These are people the country needs," she added, "they should not be left behind."
Ghani and Merkel also announced that they would improve their cooperation in training Afghan police forces to better tackle human trafficking and the forging of passports.