A Syrian man killed himself and injured 12 people after a “deliberate explosion” outside a music festival in the German town of Ansbach.
Authorities said the 27-year-old had been denied asylum a year ago and had a history of making attempts on his own life.
It is believed a device he was carrying exploded although it is not clear whether it was a suicide bombing or whether the man intended to plant it and harm others.
At a media conference in the early hours of Monday the Bavarian interior minister, Joachim Herrmann, said the man had attempted to gain entrance to the Ansbach open music festival.
More than 2,000 people had been in the crowd in the small town of 40,000 people south-west of Nuremberg that is also home to a US army base.
Herrmann said the man was carrying a backpack at the time of the blast, at about 10pm on Sunday, but was turned away at the entrance to the festival, where the performers were to have included Ian Anderson, frontman of defunct prog-rock band Jethro Tull.
The backpack contained metal items used in “wood manufacturing” and could have killed many more people, he said.
Hermann did not specify whether these items were nails or screws but he said that because of the contents a terrorist motivation for the incident could not be ruled out.
However, a spokesman for the prosecutor’s office in Ansbach said the attacker’s motive was unclear. “If there is an Islamist link or not is purely speculation at this point,” said the spokesman, Michael Schrotberger.
Hermann said the man’s request for asylum was rejected a year ago, but he was allowed to remain in Germany on account of the situation in Syria. “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,” he said.
“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.”
Herrmann added it was unclear if the man had planned to kill only himself or “take others with him into death”.
At least 12 people are reported to have been injured in the blast – three are believed to be in a serious condition.
Shortly after the explosion, the mayor of Ansbach said the blast had been caused deliberately.
A police spokesman said: “An explosion went off in the city centre and a man, which the latest inquiries show caused it, was killed in the event.” After the explosion the area was evacuated and the music festival cancelled.
Thomas Debinski, who was interviewed by Sky News, described a “disturbing” scene as people in the small city realised a violent act had taken place.
“People were definitely panicking, the rumour we were hearing immediately was that there had been a gas explosion,” he said. “But then people came past and said it was a rucksack that had exploded. Someone blew themselves up. After what just happened in Munich it’s very disturbing to think what can happen so close to you in such a small town.”
Police sealed off the town centre and emergency services attended the scene. Bomb experts were sent to determine the cause of the explosion.
The explosion, which followed the killing on Friday of nine people by an 18-year-old gunman in Munich, occurred at a wine bar called Eugene’s, the Nürnberger Nachrichten newspaper reported.
Germany, and Bavaria in particular, has been on edge after a deadly rampage at a Munich shopping mall on Friday in which nine people were killed, and an axe attack on a train near Würzburg last Monday in which five people were wounded.
Both came shortly after a Tunisian man in a truck killed 84 people when he ploughed through a crowd celebrating Bastille Day in the French city of Nice, on the French Riviera.
Bavarian public broadcaster Bayerische Rundfunk reported that about 200 police officers and 350 rescue personnel were brought in following the explosion in Ansbach.