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 suspect, 29, was arrested by police officers who were assigned to protect the synagogue.
Dressed in combat fatigues, the suspect had a piece of paper with a hand-drawn swastika in his pocket, said police and prosecutors in a statement.
“The current assessment of the situation suggests that this is an anti-Semitic motivated attack,” they said, adding that investigators are treating the case as a “attempted murder with grievous bodily harm”.
(article continues below)
See also on The Local:
Jewish leaders and top German politicians led condemnation of the attack, which comes a year after two people were shot dead after an extremist tried and failed to storm a synagogue in the eastern city of Halle.
“Once again, we have to witness a terrible act of violence against a Jewish citizen,” said Justice Minister Christine Lambrecht.
“The hatred against Jews is a disgrace for our country,” she said, stressing that Germany has to stand up more firmly against victims of hate and violence.
Ronald Lauder, leader of the World Jewish Congress, also demanded action.
The attacker “must be held responsible as must all who engage in any expressions of hate or intolerance,” he said.
Josef Schuster, president of the Central Council of Jews in Germany, said: “No one in the country should be blase about a situation where Jews here are repeatedly the target of hate.”
He added that the case shows 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 is currently on trial for the crime.
Only last month, Chancellor Angela 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 up anti-Jewish hatred.
Anti-Semitic crimes have increased steadily in Germany in recent years with 2,032 anti-Semitic offences recorded in 2019, up 13 percent on the previous year.
Some six million European Jews were murdered by Adolf Hitler's Nazi regime during World War II.
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.