RIO DE JANEIRO — The team of law-enforcement agents deployed by the mayor to “defend the family” descended on the international event and scoured the grounds for their target: copies of a comic book featuring two young men kissing.
“Books like this need to be packaged in black plastic and sealed,” the mayor of Rio de Janeiro, Marcelo Crivella, said in a video posted on Twitter. The agents, he said, were ordered to seize all copies of the comic book from the city’s International Book Fair because it had “sexual content for minors.”
As it turned out, the police came up empty on Thursday in their two-hour search for kissing comic characters, though they did find “lots of books,” Col. Wolney Dias, who headed the raid, told the newspaper Folha de São Paulo.
The raid also kicked up lots of backlash for the mayor — from festival organizers, publishing houses, comedians and, finally, a Brazilian court, which on Friday barred Mr. Crivella from further seizure efforts or any attempt to withdraw the festival’s permit.
The comic book in question, published in 2010 under the title “Avengers: The Children’s Crusade,” shows the superheroes Hulkling and Wiccan, who are boyfriends, kissing. The book, which had sold out by the time the agents arrived, tells the story of Wiccan’s efforts to control his reality-altering powers.
Festival organizers tried a bit of reality altering themselves on Friday when they took the mayor to court, winning an injunction from Judge Heleno Ribeiro Pereira Nunes against further efforts to bar the book. The judge cited the organizers’ constitutional right to free expression.
The brushback was more colorful outside court. The comedian Felipe Neto, one of Brazil’s most popular YouTube stars, said he would distribute thousands of books with gay and lesbian characters at the festival. The books, he said, would come with a red label saying they were “inappropriate for backward, retrograde and prejudiced people.”
Then, on Saturday, the publishing house Faro set up a stand at the festival under the banner “Books That Are Forbidden by Crivella” and featuring a host of volumes on issues involving gay and lesbian people. The stand became a selfie magnet, the newspaper O Globo said.
Mr. Crivella’s order also served to remind local newspapers and TV stations of other things the mayor could be doing, like fighting poverty. The local unemployment rate hit 15.3 percent in the first trimester of this year.
“Crivella, This Is What’s ‘Inappropriate,’” read the headline in the newspaper Extra, atop a photo of a homeless woman and her children sitting on cardboard on a sidewalk.
The mayor, who is also an evangelical preacher, was unbowed. In a video posted on Friday, Mr. Crivella said he was trying to protect families.
“This can’t be induced, be it in schools, in a book, or wherever,” the mayor said, apparently referring to gay and lesbian issues. “We will always continue to defend the family.”
But the mayor “forgets there are quite old Supreme Court decisions that say same-sex families also deserve protection,” said Rodrigo Azambuja of Rio’s public defenders’ office, which had joined with festival organizers in their court appeal.
“Under Brazilian law,” he said, “all families are equal.”