A special police officer leaves the area where an explosion occurred in Ansbach, Germany, Monday, July 25, 2016. Bavaria's top security official says a man who blew himself up after being turned away from an open-air music festival in the southern German city was a 27-year-old Syrian who had been denied asylum.

(AP Photo/Matthias Schrader)

View photo

Ansbach, Germany

A failed asylum-seeker from Syria blew himself up and wounded 12 people after being turned away from an open-air music festival in southern Germany, authorities said Monday. It was the fourth attack to shake Germany in a week — three of them carried out by recent immigrants.

The 27-year-old set off explosives he was carrying in a backpack at a bar shortly after 10 p.m. Sunday, having been refused entry to the festival in the southern town of Ansbach because he didn't have a ticket.

Herrmann said the man's request for asylum was rejected a year ago, but he was allowed to remain in Germany because of the strife in Syria.

An interior ministry spokesman said Syrians can't be deported directly to Syria because of the situation there, but the man was due to be deported to Bulgaria.

Tobias Plate said he could not immediately say why that had not happened. It was not clear when he was supposed to be deported or why to Bulgaria, but often asylum-seekers get deported to the European country where they first get registered, even if they later try to apply for asylum in another country.

The unnamed man had repeatedly received psychiatric treatment, including twice for attempted suicide, authorities said.

Authorities on Monday morning raided an asylum shelter in the suburbs of Ansbach.

One resident said he had occasionally drunk coffee with the attacker and they had discussed religion. Alireza Khodadadi told The Associated Press that the man, whom he would identify only as Mohammed, had told him that the extremist Islamic State group was not representative of Islam.

"He always said that, no, I'm not with them, I don't like them and such stuff. But I think he had some issues because, you know, he told lies so often without any reason, and I understand that he wants to be in the center of (attention), you know, he needed (attention)," Khodadadi said.

A team of 30 investigators were interviewing the man's acquaintances and examining evidence collected from his home.

Asked whether the bomber might have links to the Islamic State group, Herrmann said that couldn't be ruled out, though there was no concrete evidence for this yet.

"The obvious intention to kill more people indicates an Islamist connection," he told dpa.

Authorities said they were alerted to the explosion in Ansbach's city's center shortly after 10 p.m.

Police said the Syrian blew himself up in the outside seating area of a wine bar near the open-air concert.

They said in a statement that security staff noticed the man with the backpack near the entrance of the concert site around 9:45 p.m.

Police spokeswoman Elke Schoenwald said he was refused entry to the concert because he didn't have a ticket. He then sat down on a chair outside the nearby restaurant. According to witness accounts he briefly leaned forward at 10:10 p.m. and then triggered the explosion.

The three-day open-air concert was underway, with about 2,500 in attendance. It was shut down as a precaution after the explosion.

The explosion came as Germany, and the southern state of Bavaria in particular, have been on edge.

Earlier Sunday, a Syrian man killed a woman with a machete and wounded two others outside a bus station in the southwestern city of Reutlingen before being arrested. Police said there were no indications pointing to terrorism and the attacker and the woman worked together in the same restaurant. Polish authorities said she was a Polish citizen.

Two days earlier, a man went on a deadly rampage at a Munich mall, killing nine people and leaving dozens wounded.

And an ax attack on a train near Wuerzburg last Monday wounded five. A 17-year-old Afghan asylum-seeker was shot and killed by police as he fled the scene. The Islamic IS group claimed responsibility for the attack.

These attacks came shortly after a Tunisian man driving a truck killed 84 people when he plowed through a festive crowd celebrating Bastille Day in Nice, along the famed French Riviera.

In Munich on Sunday evening, 1,500 people gathered at the scene of the shooting there, lighting candles and placing flowers in tribute to the victims of an 18-year-old German-Iranian. Police said that he had planned the attack for a year.

Munich authorities said Monday at a news conference that a 16-year-old Afghan friend of the Munich attacker may have known of the attack in advance.

Police said Monday the teenager was arrested late Sunday and investigators were able to retrieve a deleted chat between him and the attacker on the messaging app WhatsApp.

Police say that from the chat it appears that the 16-year-old met with the attacker immediately before the attack at the scene of the rampage — a mall in Munich — before the attack. He also knew the attacker had a pistol.

Investigators say the two teenagers met last year as in-patients at a psychiatric ward. Both were being treated for online game addiction, among other things.

The Christian Science Monitor reported that as Germans mourn the nine mostly young people gunned down in a restaurant and shopping mall, many Munich residents expressed relief that the attack did not seem to be carried out by an Islamic militant. Yet now they face the question of how to deal with a different type of deadly violence: the type of mass shootings that have become tragically common in the United States.

“I’m happy it wasn’t a terrorist attack,” says Cheyenne Holzer, a kindergarten teacher who came to lay flowers Saturday at a makeshift memorial at the site of the shooting. But the violence left her shaken, and fearing more. “I told my parents I won’t go to Oktoberfest, and I think many people won’t go now. Tourism will be down.”

After the Munich attack, Herrmann urged the German government to allow the country's military to be deployed to support police during attacks. Germany's post-war constitution, because of the excesses of the Nazi era, only allows the military to be deployed domestically in cases of national emergency.

Herrmann has called those regulations obsolete and said that Germans have a "right to safety."

In January, Bavaria's justice minister launched a state program in Ansbach meant to teach refugees the basics of law in their new host country. The initiative came amid growing tensions and concerns in Germany about how it would integrate the estimated 1 million-plus migrants it registered crossing into the country last year.

Classes include lessons about freedom of opinion, the separation of religion and state and the equality of men and women.

"Germany is an attractive country because it respects the dignity of every human being," an educational film shown to newcomers said, "and it is supposed to stay that way."

___

Grieshaber reported from Berlin. Frank Jordans and David Rising in Berlin and Hakan Kaplan in Ansbach contributed to this report.