Berliners have expressed disbelief after a Syrian migrant who stormed a synagogue with a knife yelling “Allah hu Akbar!” was freed from jail only a day later.

The incident occurred at a synagogue in the middle of Berlin on a Friday. Syrian migrant Mohammed M., 23, climbed over a security fence armed with an eight-inch-long knife and stormed the building while yelling “Fuck Israel!” and “Allah hu Akbar!” before security guards pepper-sprayed him, Bild reports.

Police subsequently arrested the 23-year-old, but he was released the next day. According to a police spokesman, the local prosecutor did not consider the man was sincerely trying to hurt anyone, just trying to threaten them.

Antisemitic Incidents Surge in Berlin with over 1,000 Cases in 2018 https://t.co/JlkO0VBep2 — Breitbart London (@BreitbartLondon) April 20, 2019

Berlin defence lawyer Alexander Pabst expressed dismay as to why the Syrian was not assessed by a medical professional.

“In addition, one could at least have a suspicion of a particularly serious breach of the peace, at least,” Mr Pabst complained.

Others were far less generous in their assessment of the way authorities handled the incident. Gideon Joffe, chairman of the Jewish community in Berlin, labelled the event a failed terrorist attack.

“Especially at this time, an attack on a Jewish institution in the middle of Berlin must be comprehensively investigated and punished with zero-tolerance measures,” a spokeswoman for the Israeli embassy in Berlin added.

Bild spoke to the father of the 23-year-old, who said his son suffered from mental issues.

“I do not know exactly what he has. But we are shocked when it was he who threatened policemen in Berlin. We absolutely have to ask him about it,” he said.

Berlin Antifa Assault Populist Jewish Youth at Holocaust Film Screening https://t.co/6aGwErj5zS — Breitbart London (@BreitbartLondon) February 12, 2019

Berlin has seen a surge in antisemitic attacks in recent years. A report released earlier this year claimed that there had been at least 1,000 antisemitic incidents in the city in 2018.

Last month, two antisemitic Palestinian rappers were scheduled to give a concert at a pro-Palestinian rally at the Brandenburg gate.

Following an outcry from the Israeli embassy and American ambassador to Germany Richard Grenell, organisers cancelled the performance.

Paris Police Killer was Salafist-linked 'Radical' Muslim Who Defended Terrorism https://t.co/40gIWceA8o — Breitbart London (@BreitbartLondon) October 6, 2019