Published on 10:24 AM, July 25, 2016

Syrian migrant 'behind German blast'

Emergency workers and vehicles are seen following an explosion in Ansbach, near Nuremberg July 25, 2016, in this still image taken from video. Photo: Reuters

A failed asylum seeker from Syria killed himself and injured 12 other people after setting off a bomb near an open-air music festival in the German city of Ansbach, officials say.

Bavaria's interior minister said the 27-year-old man detonated a backpack device after being refused entry to the festival in the southern city.

About 2,500 people were evacuated from the venue after the explosion.

It is the third attack in the state of Bavaria in a week.

A shooting rampage in Munich on Friday left nine dead while an axe-wielding teenager was shot dead after injuring four people on a train a week ago in Wuerzburg.

The explosion is reported to have happened at about 22:10 (20:10 GMT) outside the Eugens Weinstube bar in the city centre which is a short distance from the entrance to the Ansbach Open music festival.

Police said three of the injured were in a serious condition.

Security services have sealed off the city centre and experts are trying to establish the kind of explosives the bomber used.

Bavarian Interior Minister Joachim Herrmann said the suspected attacker had entered Germany two years ago and had his asylum claim rejected a year ago.

He had been given leave to stay temporarily given the situation in his home country and provided with an apartment in Ansbach, Mr Herrmann added.

Police secure the downtown area after an explosion in Ansbach, near Nuremberg, Germany July 25, 2016. Photo: Reuters

The minister said he was "incensed" by the attack, which he said demonstrated the need "to strengthen controls on those we have living in our country".

Mr Herrmann said the man was known to have attempted suicide twice before, adding: "We don't know if this man planned on suicide or if he had the intention of killing others."

However, he said the bomb in his backpack would have been sufficient to kill and injure many more people.