In the encounter last month, 14-year-old Reem told Merkel in fluent German that she and her family, who arrived in the north German city of Rostock from a Lebanese refugee camp four years ago, faced possible deportation.
Merkel expressed sympathy before defending her government's asylum policies, saying Germany “couldn't manage” to shoulder the burden of all those fleeing war and poverty.
Minutes later, Reem began to weep and the chancellor stroked her head and tried to comfort her in a way critics said appeared awkward and cold, and which led to a storm of protest on social media.
The Rostock city hall said in a statement that Reem and her family “had today received for the first time residency permits for humanitarian reasons”.
“These permits are valid until March 2016,” it said.
Chris Müller, the Rostock mayor's deputy, said: “Reem is an example of successful integration in our city.”
Europe's deepening crisis and its mounting human cost has sparked sharp divisions within the 28-nation European Union, with Germany leading efforts to get the bloc to accept more refugees while newer eastern states balk at the prospect of compulsory quotas.
Austria and Germany have meanwhile agreed to receive thousands of migrants due to arrive at the Hungarian border in the coming hours, Austria's Chancellor Werner Faymann said early Saturday.
Faymann told Austria's APA agency that he had informed Hungary's Prime Minister Viktor Orban of the decision “in consultation” with German Chancellor Angela Merkel. He said it was motivated by “the current emergency at the Hungarian border”.
Late Friday Hungary said it was laying on buses to ferry desperate refugees who had set off on foot for the Austrian border after being stranded for days in Budapest's main railway station.