BERLIN -- A man was killed when an explosive device he was believed to be carrying went off near an open-air music festival in the southern German city of Ansbach, police said Monday. Twelve people were injured in the explosion.

Bavaria's top security official says a 27-year-old Syrian, who had been denied asylum, blew himself up after being turned away from the music festival.

"We don't know if this man planned on suicide or if he had the intention of killing others," Joachim Herrmann said.

Get Breaking News Delivered to Your Inbox

He added that 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.

Authorities said in a statement that they were alerted to an explosion in the city's center shortly after 10 p.m. on Sunday.

"A man, according to our current knowledge the perpetrator, died" in the blast they said in the short statement.

Bavarian interior ministry spokesman says more than 2,000 people were evacuated from the nearby music festival after the explosion, Reuters reported.

German police officials told CBS News one big bang was heard close to the entrance of the music festival. After that blast, no shrapnel, screws or nails were found.

Germany, and Bavaria in particular, have been on edge after a deadly rampage at a Munich mall on Friday in which nine people were killed, and an ax attack on a train near Wuerzburg last Monday in which five people were wounded. Both came shortly after a Tunisian man in a truck killed 84 people when he plowed through a festive crowd celebrating Bastille Day in 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.

The Bavarian Interior Ministry told dpa that it appeared to possibly be a bombing attack, saying that there was evidence that there was a "deliberate explosion."

Munich's Sueddeutsche reported that the wounded suffered light injuries.