German Vice-Chancellor Robert Habeck has vowed a tough political response to increasing antisemitism.
In a video seen eight million times, he criticised antisemitism from Islamists, the far right and "parts of the political left".
Germany has seen a recent surge in antisemitic and anti-Israel incidents.
They began after the 7 October attacks in Israel during which Palestinian Hamas militants killed 1,400 Israelis and took more than 230 hostages.
Israel then launched a war it says is aimed at destroying Hamas. The Hamas-run health ministry says more than 9,000 people have since been killed.
Mr Habeck's lengthy and emotive video has had a big impact in Germany. He pointed out that almost 80 years after the Holocaust, Jewish communities were having to tell their members to steer clear of certain places.
Some political figures praised him for giving what sounded like a state of the nation address. Antisemitism commissioner Felix Klein said he had made a clear and prudent appeal to the responsibility of everyone in Germany to stand up for the safety of Jewish women and men.
Germany has outlawed the burning of other countries' flags and the vice-chancellor reminded Germans that burning the Israeli flag or praising Hamas's actions were crimes.
"Anyone who is German will have to answer for this in court," Mr Habeck said in his message. "Anyone who isn't German also risks losing their residence status. Anyone who doesn't yet have a residence permit is giving grounds for deportation."
Mr Habeck said some Muslim groups had been "too hesitant" in distancing themselves from Hamas or antisemitism, and he spoke of his concern about young activists on the left talking of "anti-colonialism".
Not everyone was impressed. One former party colleague said she was disgusted he had implied that Muslim migrants and refugees had brought antisemitism into Europe.
The head of Germany's Central Council of Muslims, Aiman Mazyek, had earlier condemned antisemitism as a sin, stressing that Germany's five million Muslims should not all be lumped together. He went on to condemn Israel's bombing of Gaza as a war crime.
When Hamas gunmen attacked Israeli communities on 7 October, activists celebrated on the streets of the Berlin district of Neukölln, handing out pastries to passers-by, sparking outrage in much of Germany.
German Interior Minister Nancy Faeser announced on Thursday that all activities linked to Hamas in Germany would be banned, along with a pro-Palestinian network called Samidoun that handed out the pastries.
She said "terror organisation Hamas pursues the goal of destroying the state of Israel", while Samidoun was spreading propaganda against Israel and Jews under the pretence of acting as a "solidarity organisation" for the release of prisoners in various countries.
Hamas is proscribed as a terrorist group in the EU, US and UK, so it was already banned in Germany. But Ms Faeser said outlawing its activities enabled authorities to broaden the ban and would make it easier to intervene in gatherings of supporters.
Intelligence officials estimate Hamas has 450 members in Germany, many of them German citizens.
A week after the Hamas attacks, antisemitic incidents in Germany soared by 240%, compared with the same period in 2022.
Petrol bombs were thrown at a Berlin Jewish community centre and Jewish-owned homes have been daubed with slogans.
The head of Germany's Central Council of Jews, Josef Schuster, welcomed the bans and called for action against "other hate organisations".
Neighbouring Austria has also seen a sharp increase in reported antisemitic incidents.
On Tuesday night, a Jewish section of Vienna's central cemetery came under attack. A swastika was daubed on the wall and a fire broke out in a ceremonial hall.
Although the cause of the fire was unclear, the head of the Jewish community, Oskar Deutsch, wrote on social media that the fire had destroyed valuable old books and a Torah Ark.
In a separate development, police in France have said that a Moldovan couple have been detained on suspicion of spray-painting Stars of David on walls in Paris.
They were arrested on 27 October, days before dozens of Stars of David tags appeared on buildings linked to the Jewish community in the 14th district of the capital. The couple, who said they had carried out the offence on behalf a third party, are now facing expulsion.
Prosecutors have said they are unclear whether the tags were intended as an insult to the Jewish people or not. However, unconfirmed reports say another couple is being sought in connection with the other incidents.