A suicide bomber who died after he detonated a bomb at a music festival in Ansbach, Southern Germany was a Syrian man who had been denied asylum.
The blast, which injured 12 people, three of them seriously, was near the entrance to a open-air music festival in the Bavarian city.
Around 2,500 people were evacuated from a nearby open-air music event where the attacker, who had been in Germany for more than a year, tried to gain entry.
Witnesses described seeing a rucksack explode, killing the man.
As they launched an investigation, local officials said it would be "purely speculation" whether his actions were linked to Islamic extremism.
The attack comes as Germany reels from Friday's massacre in Munich that left nine dead and dozens injured.
It is the third attack to hit Bavaria in a week, following an IS-inspired axe rampage by a teenager on Monday.
The final night of the three-day Ansbach Open music festival in the city around 90 miles north of Munich, was under way with when the chaos began.
Police began to receive reports of a blast in the city centre shortly after 10pm, thought at first to have been a gas explosion near a bar.
Witness Thomas Debinski described the "disturbing" scene in the small city as bystanders came to realise 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 told Sky News.
"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."
The concert was shut down and around 200 police officers and 350 rescue personnel flooded the scene, with investigators later confirming the blast had been caused by a bomb.
Bavaria's interior minister, Joachim Herrmann, said the suspect was a Syrian who had been rejected for asylum a year ago, but had been allowed to stay in Germany due to the civil war.
In January a programme was launched in Ansbach to help refugees assimilate by teaching them the basics of law in their new host country.
The initiative came amid growing tensions and concerns in Germany over the large numbers of migrants, and taught lessons on freedom of opinion, the separation of religion and state and the equality of men and women.
Police are yet to release more details on the attacker and he has not been named.
Michael Schrotberger, a spokesman for the prosecutor's office in Ansbach, said his motives remained unclear.
"If there is an Islamist link or not is purely speculation at this point," he said.
Investigators have appealed for any mobile phone footage taken at the scene of the attack, following similar appeals by Munich detectives who made their first arrest in connection with Friday's atrocity on Sunday.
The latest incident will add to a feeling of grief and insecurity in a country rocked by a spate of violent extreme acts.
On Monday a 17-year-old Afghan asylum seeker launched an axe and knife attack on passengers on a train in Wuerzburg.
Islamic State claimed responsibility for the attack in which five people were injured. The teenage axeman, Riaz Khan Ahmadzai, was shot dead by police.
On July 14 more than 80 lives were lost when a lorry ploughed into crowds watching a Bastille Day firework display in Nice, France. IS said it was also responsible for the attack by 31-year-old Mohamed Lahouaiej Bouhlel.
Earlier on Sunday a Syrian asylum seeker killed a woman with a machete and wounded two others outside a bus station in the south-western German city of Reutlingen before being arrested.
Witnesses said the 21-year-old man, who was known to police, was having an argument with the woman before attacking her. Police said the motive behind the attack is still not clear.
Why are you making commenting on The Herald only available to subscribers?
It should have been a safe space for informed debate, somewhere for readers to discuss issues around the biggest stories of the day, but all too often the below the line comments on most websites have become bogged down by off-topic discussions and abuse.
heraldscotland.com is tackling this problem by allowing only subscribers to comment.
We are doing this to improve the experience for our loyal readers and we believe it will reduce the ability of trolls and troublemakers, who occasionally find their way onto our site, to abuse our journalists and readers. We also hope it will help the comments section fulfil its promise as a part of Scotland's conversation with itself.
We are lucky at The Herald. We are read by an informed, educated readership who can add their knowledge and insights to our stories.
That is invaluable.
We are making the subscriber-only change to support our valued readers, who tell us they don't want the site cluttered up with irrelevant comments, untruths and abuse.
In the past, the journalist’s job was to collect and distribute information to the audience. Technology means that readers can shape a discussion. We look forward to hearing from you on heraldscotland.com
Comments & Moderation
Readers’ comments: You are personally liable for the content of any comments you upload to this website, so please act responsibly. We do not pre-moderate or monitor readers’ comments appearing on our websites, but we do post-moderate in response to complaints we receive or otherwise when a potential problem comes to our attention. You can make a complaint by using the ‘report this post’ link . We may then apply our discretion under the user terms to amend or delete comments.
Post moderation is undertaken full-time 9am-6pm on weekdays, and on a part-time basis outwith those hours.
Read the rules hereComments are closed on this article