The authorities tried to prohibit pro-Palestinian protests in Austria, Hungary and Switzerland, where some cities took the approach of banning protests of any kind. In France, a court dismissed a blanket ban on pro-Palestinian demonstrations, but they can still be banned case by case.

Even where protests have not been banned, some government officials strongly discouraged pro-Palestinian demonstrations, or harshly condemned them.

Nowhere has the debate over what is legal and legitimate expression of dissent been more fraught than in Germany, where it has struck at the heart of how the nation defines itself, and prompted questions about which values should be prioritized at the cost of others.

Germany sees severely restricting criticism of Israel as a necessary part of atoning for the Holocaust. But many in its immigrant communities — Arabs, and also many progressive Jews and Israelis — say the restrictions not only violate free speech, but are discriminatory as well.

In recent weeks, Hamburg banned protests — or restricted the number of Palestinian flags that could be waved. In Berlin, officials authorized schools to bar students from wearing the kaffiyeh or the Palestinian flag or its colors.

The police in Berlin said they had blocked over half of the 41 scheduled Gaza solidarity protests, sometimes on the grounds that they would “emotionalize” residents of Palestinian origin. These included a children’s demonstration to mourn the Palestinian children killed by Israeli strikes in the past month. Permitted protests were banned from using slogans such as “stop the war” and “free Palestine.”

The Berlin police prohibited the protests based on “an imminent danger that the gatherings would lead to incitement to hatred, antisemitic statements, glorification of violence, incitement to violence and thus to intimidation and violence,” a spokeswoman said.

Asked for comment about Ms. Mustafa’s video and account, the police would only confirm that two people were detained, and gave no explanation.

Activists blame the authorities for incitement: In Berlin, a police officer stomped out candles at a vigil for Gaza’s dead. The police said that a video of the episode was too short to determine context, but that the officer was required to extinguish the candles because they were on the street.