MAINZ, Germany — A teenager was detained by German special forces early Tuesday on suspicion of plotting a terror attack while staying at a center for migrants and refugees that houses unaccompanied minors, officials said.
The 17-year-old entered the country illegally in 2015, according to authorities.
A spokesman for the interior ministry in the state of Brandenburg told NBC News the suspect is believed to have arrived from Syria but cautioned that the information was not confirmed.
The arrest came after he allegedly "sent a goodbye message to a family member," according to a statement from the Brandenburg police.
Officials allege the teen was planning a terror attack in Berlin.
The police statement said the suspect had been living in a home for unaccompanied minors in Gerswalde, a village in the Uckermark region northeast of the German capital.
German leader Angela Merkel's open-door policy saw some 1.1 million asylum-seekers enter the country in 2015.
The arrest comes one week after a suicide bomber killed more than 20 people after an Ariana Grande concert in Manchester, England.
Berlin has also been the victim of attacks in the past. In December, a Tunisian man stole a truck and drove it through a Christmas market, killing 12 people and injuring dozens more.
Andy Eckardt reported from Mainz, Germany. Carolin Fiehm and Alexander Smith reported from London.
CLARIFICATION (May 30, 2017, 2:15 p.m. ET): An earlier version of this article referred imprecisely to the suspect's home. Uckermark, where the suspect had been living, is a region northeast of Berlin; the home was in the village of Gerswalde, located in Uckermark.