A Syrian refugee who was facing deportation to Bulgaria pledged allegiance to the Islamic State group in a video on his cellphone before detonating a bomb near a music festival in a southern German town on Sunday night, killing himself and injuring 12.
Bavarian officials say the 27-year-old suspect detonated the bomb, which was concealed in a backpack, after he was denied entry to a music festival in Ansbach for not having a ticket.
The BBC says cellphone video shows the bomber pleading allegiance to the so-called Islamic State's leader, said Bavarian interior minister, Joachim Hermann.
Hermann said that in the video the man threatened a "revenge attack" on Germans.
Authorities said on Monday that the young man had received psychiatric treatment and had previously made multiple suicide attempts. He had reportedly arrived in Germany two years ago, and his application for asylum had been rejected one year ago.
"It's terrible...that someone who came into our country to seek shelter has now committed such a heinous act and injured a large number of people who are at home here, some seriously," Hermann said at a news conference on Monday. "It's a further, horrific attack that will increase the already growing security concerns of our citizens. We must do everything possible to prevent the spread of such violence in our country by people who came here to ask for asylum."
Government officials are urging Germans to avoid linking the recent uptick in violence with the massive influx of refugees fleeing war, terror and conflict in countries like Syria and Iraq. "Most terrorists who have committed attacks in Europe in recent months were not refugees" said Ulrike Demmer, the deputy government spokeswoman, in Berlin on Monday. "This finding is consistent with recent studies, according to which the threat of terrorism is no greater and no less than in the general population."
The attack was the third in Bavaria in just one week to targeted German civilians. On Friday, an 18-year-old gunman who was obsessed with school shootings opened fire at a mall in Munich, killing nine. Last Monday, the Islamic State claimed an axe attack on a train near Würzburg which left five people injured.
Reuters contributed to this report