The 14-year-old Palestinian girl who burst into tears after German Chancellor Angela Merkel told her she might be deported has had her residency permit extended until March 2016, the mayor's office in the northern city of Rostock said on Friday.

Merkel was criticized in July after she told the girl, identified as Reem, during a televised discussion forum that Germany could not admit everyone who wanted to live there, and then stroked her on her back when Reem started crying.

The video clip of the exchange went viral and started the hashtag #merkelstreichelt (merkelstrokes) with critics accusing her of looking clumsy and lacking empathy.

Reem, who is from Lebanon, has lived in Germany for four years and had told Merkel in fluent German that she wanted to study there, but that it was uncertain whether she would be allowed to stay.

The mayor's office in Rostock said Reem and her father on Thursday received a limited residency permit that is valid until March 2016. The office could not immediately clarify what will happen after that date.

It said the rest of the family would not be deported so that they could remain together.

Merkel, who has been criticized for being slow to condemn violent protests against refugees in an east German town last month, saw her approval ratings slip by 4 points to 63 percent over how she has handled the refugee crisis.

Germany, with relatively liberal asylum laws and generous benefits, is the EU's biggest recipient of people fleeing war in the Middle East and economic migrants from southeastern Europe.

A record 104,460 asylum seekers entered the country in August, and it expects about 800,000 people to file for asylum this year — four times last year's level.