A 26-year-old Jewish student was seriously injured after being attacked outside a synagogue in the northern German city of Hamburg on Sunday, police said.
A police spokesperson said the 29-year-old perpetrator struck his victim - who is expected to survive - on the head with a blunt object.
Sources close to the investigation said the attacker was wearing military-style camouflage clothing, had a piece of paper with a swastika in his trouser pocket, and used a shovel to bash his victim on Sunday afternoon.
Police officers who were on site as part of the routine protection of the synagogue arrested the attacker.
According to the police, he lives in Berlin. What links him to Hamburg is still unclear.
The 26-year-old was able to escape to safety and was given first aid by passersby until the emergency services arrived.
Those inside the synagogue were taken to safety. They were celebrating the Sukkot holiday at the time and the victim had been on his way to participate, police said.
The attack drew quick condemnation.
"This is not an isolated incident, this is disgusting anti-Semitism and we must all oppose it," Foreign Minister Heiko Mass tweeted.
The police spokesperson said the attacker, who is a German citizen with Kazakh roots, was acting "extremely confused" and that investigators have been unable to question him in his present state.
The assault in Hamburg revived memories of the attack on a synagogue in the city of Halle almost a year ago.
In that case, the attacker made a failed attempt to enter the synagogue by force as a full congregation marked the holiest day in the Jewish calendar, Yom Kippur, and subsequently shot dead two people nearby. Several people were injured.
"The question is, what have we not learned since Halle," said regional chief rabbi Shlomo Bistritzky, who said in a statement he arrived a few minutes after the attack. "Everyone was very, very shocked."
Several people gathered at crime scene, which was cordoned off by police, to show their support for the Jewish community.
Germany has recently seen a rise in anti-Semitic incidents in the country, most recently at protests against coronavirus restrictions, which have been partially fuelled by conspiracy theories about a nefarious global elite and have also attracted support from right-wing extremists.