German investigators said Monday they were probing an attack on a Jewish student outside a synagogue in Hamburg as attempted murder with anti-Semitic intent, a case condemned by Chancellor Angela Merkel as a "disgrace".

The 26-year-old student was badly injured on Sunday by a man who repeatedly struck him on the head with a shovel outside the synagogue where the Jewish community was celebrating Sukkot, also known as the Feast of the Tabernacles.

The 29-year-old suspect was on Monday admitted to a psychiatric facility.

The assault came almost exactly a year after two people were shot dead by an extremist who tried and failed to storm a synagogue in the eastern German city of Halle.

Jewish leaders and top politicians led condemnation of the latest attack.

The assault came a year after two people were shot dead by an extremist who tried to storm a synagogue in the eastern city of Halle
The assault came a year after two people were shot dead by an extremist who tried to storm a synagogue in the eastern city of Halle AFP / MORRIS MAC MATZEN

"Such an attack is repulsive, no matter what investigations about the motivation and the condition of the perpetrator might show," said Merkel's spokesman Steffen Seibert.

The suspect was arrested by police officers who were assigned to protect the synagogue in the northern city.

Dressed in combat fatigues, he had a piece of paper with a hand-drawn swastika in his pocket, said police and prosecutors in a statement.

A spokeswoman for the Hamburg prosecution service later told reporters that the accused has been "temporarily placed in a psychiatric hospital".

The suspect, 29, was arrested by police officers who were assigned to protect the synagogue in Hamburg
The suspect, 29, was arrested by police officers who were assigned to protect the synagogue in Hamburg AFP / MORRIS MAC MATZEN

Josef Schuster, president of the Central Council of Jews in Germany, strongly condemned the attack.

"No one in the country should be blase about a situation where Jews here are repeatedly the target of hate," he said.

He added that the case showed that security measures may have to be improved.

Last year's attack on the synagogue in Halle came on October 9 during Yom Kippur, the holiest day in the Jewish calendar.

A neo-Nazi suspect, 28-year-old Stephan Balliet, is currently on trial for the attack and has told the court it was "not a mistake".

Only last month Merkel spoke of her shame over rising anti-Semitism in Germany, even as the Jewish community warned that coronavirus conspiracy theories were being used to stir anti-Jewish hatred.

Anti-Semitic crimes have risen steadily, with 2,032 offences recorded in 2019, up 13 percent on the previous year.

They have sparked soul-searching in Germany, which has placed a huge emphasis on atoning for the murder of six million European Jews by Adolf Hitler's Nazi regime during World War II.

The arrival in parliament of the far-right AfD, whose leaders openly question Germany's culture of guilt, has contributed to the change in atmosphere.

The arrival of more than a million asylum seekers, many from Muslim countries such as Syria, Afghanistan or Iraq, has also played a role in growing hostility against Jews.

In an assault that sparked revulsion in Germany, a Syrian migrant was charged for lashing out with his belt in April 2018 at an Israeli man wearing a Jewish kippa skullcap.

Germany is now home to the third-largest Jewish population in western Europe, largely due to an influx of around 200,000 Jews following the collapse of the Soviet Union.