Artists in Rio de Janeiro have staged a pop-up street show to protest against the closure by the new far-right state government of an exhibition because of a performance attacking dictatorship-era torture.

Álvaro Figueiredo, the curator of Literatura Exposta (Literature Exposed), accused authorities of censorship after the exhibition was ordered to close a day early to prevent a performance by the Rio collective És Uma Maluca that featured nudity and plastic cockroaches.

This is not the first time art has been targeted in Brazil as the country has swung to the right. In 2017, a gay art exhibition was shut down in Porto Alegre, southern Brazil, after online protests and picketing, while the São Paulo Museum of Modern Art held firm in the face of similar protests after a child was filmed touching the foot of a naked artist in a prone position as part of a performance.

On Sunday, Figueiredo announced on Facebook that Literatura Exposta had been shut down on orders from Wilson Witzel, the far-right governor of Rio state. Witzel is a close ally of President Jair Bolsonaro, who took office on 1 January and whose administration runs the France-Brazil House cultural centre that hosted the exhibition.

És Uma Maluca’s performance piece had already been toned down for the exhibition, Figueiredo added.

The work featured swarms of plastic cockroaches around a manhole – a reference to a torture tactic employed sometimes by the military dictatorship that controlled Brazil from 1964-1985. Electric shocks, beatings and an excruciating “parrot’s perch” device were common torture techniques, but female survivors have also described being tortured with cockroaches, snakes and even alligators.

The installation originally included a speaker playing speeches by Bolsonaro – who has defended and praised the military dictatorship. This was replaced by a voice reading out a cake recipe after the France-Brazil House complained, Figueiredo said. During the dictatorship newspapers printed recipes when stories were censored.

In a statement, Rio’s secretary of culture and creative economy, Ruan Lira, said he had learned via an email exchange that a performance “containing nudity between two women as well as cockroaches” was due to take place. He told Witzel and both decided this was not in the contract.

“Nudity itself would not be problematic,” Lira said, but dialogue with the culture secretariat and children’s court were needed first, as well as a legal clause in the contract. “I’m not against freedom of expression and even less in favour of censorship,” Lira added.

In reply, Figueiredo posted an email from the France-Brazil House on Instagram about only allowing over-18s into the show. The email was from Thursday – three days before the performance was scheduled to take place. “It’s very strange,” he said.

On Monday, after És Uma Maluca announced they would stage the banned performance in front of the France-Brazil House at 6pm, a crowd of several hundred gathered. Five armed police stood guard to ensure that no nudity took place.

The crowd chanted leftist and anti-fascist slogans as they waited for the performance to begin. “Art should never be censored,” said Sebastiana Cesario, 68-year-old chemist, as she waited in the hot sun. “It is an unnecessary provocation.”