Munich: A failed asylum seeker from Syria killed himself and injured 12 others after setting off a bomb near an open-air music festival in the German city of Ansbach, officials said early Monday. Bavarian Interior Minister Joachim Herrmann said the 27-year-old man detonated a backpack device after being refused entry to the festival in the southern city on Sunday night due to the lack of a ticket, the BBC reported. About 2,500 people were evacuated from the venue after the explosion. The explosion was reported to have occurred at about 10.10 p.m. outside the Eugen's Weinstube wine bar which is a short distance from the entrance to the Ansbach Open Music Festival. The festival has been cancelled, officials confirmed. The suspected attacker had entered Germany two years ago and had his asylum claim rejected a year ago, BBC quoted Herrmann as saying. He was given leave to stay temporarily given the situation in his home country and provided with an apartment in Ansbach, he added. 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", BBC reported. 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 explosives in the man's backpack would have been sufficient to kill and injur many more people. The man, who has not yet been identified, stood around the festival entrance for a short period before he blew himself up, CNN reported citing Bavarian police officials as saying. This was the third attack in the state of Bavaria in a week. On Sunday, a man killed a pregnant woman with a machete in Reutlingen. The 21-year-old Syrian asylum seeker came to Germany one year ago, according to a police statement, and he was known to police for property thefts and assault, CNN noted. Police said the woman was 45 years old and from Poland. On Friday, a man in Munich went on a shooting spree in a busy shopping district, killing nine people before killing himself, authorities said. Authorities have not found a link to terror groups. Police said he may have planned the attack for a year, CNN added.