Germany became an asylum seeker's utopia, a beacon of hope for the war torn and desperate.
But following a string of terrorist attacks including last month's strike on a Christmas market here, this nation is weighing tough changes to an asylum system that critics say has exposed millions of Germans to risk.
At a time when the incoming administration of US President-elect Donald Trump has pledged a migrant crackdown in the United States, the moves in Western Europe's most populous nation signal a harder line also brewing on this side of the Atlantic.
Chancellor Angela Merkel, sniped at by Trump for welcoming the mostly Muslim migrants, remains opposed to some of the strictest measures, including renewed pressure to set a firm cap on new asylum seekers who are still arriving at a rate of several hundred per day. But in an election year in which her refugee stance has become Merkel's Achilles' heel, she and her top allies are accelerating a push for reform.
"You cannot apodictically separate security and asylum policy," said Stephan Mayer, a senior German lawmaker from the centre-right Christian Social Union. Referring to the Christmas market attacker Anis Amri, a 24-year old Tunisian asylum seeker, Mayer added: "Amri came to Germany disguised as a refugee. The more people come here, the more likely it is that there is going to be a villain among them."
Proposals being discussed by Merkel's Cabinet could give German authorities more power to detain or slap ankle brackets on rejected asylum seekers who are deemed security threats. New "repatriation centres" could also corral rejected asylum seekers in clearinghouses near airports to better ensure their ejection from Germany.
Developing nations that refuse to take their nationals back could also face cuts in foreign aid. Among the most radical proposals: a massive effort to re-examine the backgrounds of the roughly 1.2 million asylum seekers who arrived in Germany since 2015 - a large number of whom, critics say, were never thoroughly vetted.
The proposals are in response to three terrorist attacks last year in Germany involving militants who posed as asylum seekers, as well as the arrest of more than a dozen asylum seekers linked to suspected plots. But refugee advocates are deeply alarmed, arguing that new proposals like nationwide deportation centres could violate the human rights of innocent refugees.
"The question is, who do they want to send there?" said Stephan Dünnwald, spokesman of Bavarian Refugee Council. "We currently have 160,000 people in Germany whose asylum request have been rejected. . . . Do they want to build camps for 160,000 people? They should consider whether putting 160,000 people in camps doesn't mean taking big steps towards a Nazi state again."
Most of the reforms still require political deals before being set down into draft bills, as well as parliamentary approval. Still others, analysts warn, may be hard to impose even if consensus is reached.
Yet the clamour for change is growing, and Merkel has indicated a willingness to back a number of them.
"Those who do not have a right to stay must be returned to their home countries," she said this week.
Her conservative allies in Bavaria have been pressing the Chancellor especially to curb new arrivals. They ramped up calls today, unveiling a new proposal including a higher bar for family reunions that could make it significantly harder for war-torn families to reunite.
Yet the question in Germany now is not only how to manage migrants, but how and whether to improve domestic security. Two days after the December 19 Berlin Christmas market attack, the German Government backed a new bill aimed at expanding video surveillance in public spaces, including shopping centres, stadiums, parking lots and public transport. The bill also gives federal police expanded power to use body cameras and automatic systems for reading license plates and to record emergency calls.
The plan had been in the pipeline for months, but the Government pushed through an announcement of the measure shortly after the attack.
In an article for Frankfurter Allgemeine, Interior Minister Thomas de Maizière called for a stronger centralisation of German security agencies and an expansion of powers for federal police. It is raising the prospect of a beefed-up state security apparatus in Germany, a notion long considered anathema in a nation with dark memories of the Cold War and Nazi eras.
"We owe it to the victims, those affected and the entire population to rethink our entire migration and security policy," Bavaria's Governor, Horst Seehofer, recently said.
In 2015, Merkel famously declared the right to asylum in Germany had "no limit," prompting, critics say, an even greater number of migrants to race to Germany or die trying.
Yet the Germans have since sought to stem the tide. In early 2016, Merkel brokered a deal with Turkey to block migrants attempting to enter Europe. German authorities are also working with neighbouring nations to make it harder for irregular migrants to cross into Germany, where generous refugee benefits serve as a magnet for hundreds of thousands of would-be refugees.
Once here, laws and policies protecting migrant rights make it relatively hard for the Germans to expel those rejected. Several of the new measures being discussed now are meant to plug what critics see as dangerous holes in the system.
The Berlin Christmas market attacker, for instance, was a rejected Tunisian asylum seeker with deportation orders who was long suspected by authorities of being a terrorism threat. Efforts to deport him, however, were stalled for months because Tunisia refused to take him back. Meanwhile, officials say, they never had enough evidence to detain him under current German law.