A federal judge in Rio de Janeiro issued an injunction late Tuesday night barring the police from ejecting spectators from Olympic venues simply for protesting against Brazil’s unpopular interim president, Michel Temer, by wearing T-shirts, waving signs or chanting slogans against him.

As Folha de S. Paulo reported, Judge João Augusto Carneiro Araújo ruled that Brazilians do not forfeit their constitutionally protected right to free speech just by attending the games.

The ruling came after images of ticket holders being forced from their seats by the police, soldiers or Olympic volunteers went viral on social networks over the weekend, prompting a wave of anger at the censorship of political speech.

Padre João, the president of Human Rights Commission in Brazil’s House of Representatives, wrote to the nation’s attorney general on Tuesday to argue that a special law governing behavior at Olympic venues — signed in May by President Dilma Rousseff before she was suspended — clearly prohibits only signs or other forms of demonstration that are racist, xenophobic or encourage discrimination. The display or chanting of the slogan “Fora Temer,” or “Temer Out,” must be permitted, the commission president wrote.

Two incidents caught on video by activists on Saturday showed spectators being forced from their seats by the security forces for waving placards or wearing T-shirts that called for the resignation of the interim leader, who came to power in what many Brazilians consider a legislative coup.

On Saturday afternoon, a man was removed from the stands at the Sambadrome in Rio during the archery finals for waving a sign that read “Fora Temer.” His ejection was recorded and posted on Facebook by Pedro Freire, a member of the activist media collective Mídia Ninja.

The ejected fan’s wife told the Washington Post that he was warned to put the sign away, and did so, but was later forced from the stands after someone else shouted the slogan.

Then, during a women’s soccer match between the United States and France at the Mineirão stadium in Belo Horizonte on Saturday night, nine spectators wearing t-shirts that spelled out the slogan were told they had to take them off or leave the stadium.

That incident was also captured on video by Mídia Ninja and seen widely on social networks.

Protesters were also warned that anti-Temer signs and T-shirts were prohibited during a pre-Olympic soccer match at the Mané Garrincha National Stadium in the capital, Brasília, and in the Olympic stadium in Rio on Friday.

Those incidents and others inspired at least one Olympic volunteer to resign in protest, and post a photo of the slogan scrawled on his credentials on Facebook.

The official crackdown on dissent, initially justified by Olympic officials as an attempt to keep the games “clean” of politics, appeared to backfire by inspiring protesters to smuggle anti-Temer messages into the venues and then share images of them on social networks.

Before the ruling made it clear that signs explicitly calling for the interim president to go could not be banned, several spectators found creative ways of making their point — including one woman who simply displayed the message: “Out with you know who.”