Anticipating possible violence against Jews and citing a "marked increase in danger for Israeli establishments", police in Berlin deployed more than 1,000 officers around the opposing demonstrations.
Despite intermittent heavy rain, around the same number of pro-Gaza protesters gathered as expected and paraded along the city's famous Kurfürstendamm shopping street, mostly without incident.
Police briefly obstructed the passage of several banners and signs while they checked their legality. These included the printed slogan 'Stop the genocide, stop the massacre', referring to the ongoing Israeli military offensive in Gaza.
Banners also attacked Germany as an arms exporter to Israel, saying 'German arms in murderers' hands are erasing the whole land', and 'Israel bombs while Germany finances'.
But pro-Palestinian organizers urged participants to refrain from racist outbursts and remain peaceful.
Meanwhile, a few hundred people marched in two concurrent pro-Israeli demos in the capital, with a heavy presence of police officers and vehicles enforcing a cordon between the sides.
"It's important to stand up for the Jews, especial with Germany's history," said German marcher Johanna, 26.
"I'm protesting against Israeli genocide," countered Ali, 27, as he moved with the rival column. "People in Gaza have no food, no water, and they are dying."
Government officials had warned earlier that breaches of the law through racial slurs and inciting slogans would be prosecuted, as well as any acts of violence against members of Germany's 200,000-strong Jewish population.
"Anyone who picks a fight in this way with the Jewish community will be doing so also with our law-based state," Justice Minister Heiko Maas told the news agency dpa.
People were entitled to express their views, but when these became "a pure outpouring of hatred and were worded accordingly, these constitute an offence of incitement which must also be dealt with," Maas added.
Acting in response to messages posted on Facebook, police in Essen on Thursday detained four men on suspicion of planning an attack on a synagogue in the Ruhr city.
Complaints filed, debate fuelled
Several politicians have filed complaints with the police and demanded action over anti-Semitic slogans and tirades observed in recent days, including a prayer offered in a Berlin mosque by a Danish imam for the wholesale destruction of Jews by God.
A senior Berlin police official also said prosecutions should be made in certain cases that were observed.
Chancellor Angela Merkel on Wednesday pledged her unwavering support for the country's Jewish community.
The chancellor regarded such outbursts as "an attack on freedom and tolerance and an attempt to shake the foundations of our free and democratic system," government spokesman Georg Streiter told reporters..
Speaking on German radio, the general secretary of the Central Committee of Muslims in Germany, Nurhan Soykan, said his organization distanced itself from insults and direct attacks on Jews, and had appealed for restraint.
"But it must also be possible to criticize Israeli policy just like the policy of any country," Soycan added.
The chairman of the German-Israeli committee in the German Parliament, Volker Beck, told Tagesspiegel newspaper that there should be a firm consensus in the country that "Jews in Germany are not responsible for Israel's policies and that we will protect them."
Prior to demonstrations on Friday in Stuttgart and Mannheim, police explicitly warned organizers that anti-Semitic slogans would not be tolerated.
The tensions have produced some unlikely alliances amid attempts to avert excesses witnessed in recent days.
In Berlin, the largest Turkish Muslim organization, the Ditib, is together with the Milli Görüs Jewish association jointly organizing a rally on Sunday to promote mutual understanding.