Three people were seriously injured after the 27-year-old man detonated a device after being turned away from a music festival near Nuremberg.A suicide bomber who blew himself up after being turned away from a music festival in southern Germany was a Syrian man who had been denied asylum.
The 27-year-old killed himself and injured 12 others, three of them seriously, when he detonated an explosive device near a bar in central Ansbach on Sunday evening.
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 of the incident described seeing a rucksack explode, killing the man.
As they launched a probe local officials said it would be "purely speculation" whether the attack was 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.
Police were alerted to a blast near the festival shortly after 10pm, with initial reports suggesting the incident was a gas explosion.
"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."
Around 200 police officers and 350 rescue personnel flooded the scene and investigators later confirmed 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.
Michael Schrotberger, 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," 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.
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.