Marcelo Freixo has the show-business vote in his race to become the next mayor of Rio de Janeiro. That's an important constituency in a city that hosts Brazil’s biggest TV network and most of its cinema industry.

The state deputy, however, seems to have become caught up in his persona as a crime-fighting hero, immortalized in the 2010 Brazilian film Elite Squad 2. He accused the incumbent, Mayor Eduardo Paes, of responsibility for the growth of the criminal militias of police and firemen that illegally control many of the city’s poorer districts and slums. The allegation has boomeranged on Freixo.

In 2008, Freixo headed an inquiry into militias by the Rio state legislature that ultimately resulted in the indictment of about 200 people, including police officers. Left-leaning members of Rio's middle class have described Freixo, a socialist, as a rare, honest and courageous politician whose election would open a new chapter in the city's politics. Last year, Freixo initiated an investigation of arms trafficking that resulted in threats on his life, prompting him to leave the country for a few months.

Writing in the Rio newspaper O Globo, columnist Francisco Bosco argued that a Freixo victory could put back on track the social reforms begun by the Workers' Party of President Dilma Rousseff and her predecessor Luiz Inacio Lula da Silva, to which Mayor Paes belongs. The benefits of their success, Bosco argued, had come at the price of too much corruption.

Freixo represents the chance for a radical transformation of the political mentality, not just in Rio but in the country. His proposal, in essence,  is very simple: to engage in true politics, guided by the interests of the republic and not for the maintenance of the privileges of the eternal owners of power.

However clean and true he may be, Freixo has the disadvantage that things are going rather well in Rio under Paes, who became mayor in 2009. After decades of neglect, Rio faces many problems: inadequate infrastructure, transportation, public health, education and sanitation. But as it prepares to host the 2014 World Cup Final and 2016 Olympic Games, the city is spending billions on public works.

It is building new stadiums and sports facilities, extending its small metro system and constructing new roads. A public-private partnership is restoring the derelict port area. This has brought a palpable sense of energy to the city. A program of arming police bases to pacify slums has also reduced crime and improved the public's sense of security.

Even mayoral candidate Aspasia Camargo of the Green Party conceded the positive changes. “I know and can’t deny that Rio de Janeiro emerged from a deep crisis. It spent two decades virtually abandoned, decapitalized,” she told O Globo in an interview. "Admittedly, there was investment in works, and nobody can deny that. I think people have the feeling that things are going well.”

The situation left Paes with 54 percent of the vote in a recent poll, and Freixo badly trailing with 18 percent. Then a photo began bouncing around Facebook showing Paes in a 2009 meeting with leaders of collectives that run Rio’s informal mini-bus networks. Some were later arrested for membership in militias.

Freixo pounced. In a televised debate, he accused Paes of having militia links. Paes responded that he did not vet every person who came into his office and that not even Freixo's political party knew whom the militia members in Rio were.

That was a reference to photos that had emerged of Freixo and Rosemberg Alves do Nascimento, a candidate for city councilor on Freixo’s party slate. A man referenced only as Rosenberg had been named as having militia links in Freixo’s parliamentary inquiry. Did Freixo have a militia member in his own party?

The Rio tabloid O Dia called Paes' response “a strong counterblow.” Freixo's party moved to expel Rosemberg, although he denied any militia involvement and noted that he spelled his name with an "m," unlike the alleged militiaman Rosenberg.

Still, Freixo hadn't had enough of the subject. He later tweeted a link to a 2006 television interview in which Paes appeared to defend security improvements in the Jacarepagua district following intervention by what he called a "policia mineira," a common nickname for militias. Paes said action by a group of police officers and firemen had brought "tranquility to the population" of an area that had been one of the most violent in the city.

Jefferson Moura, a candidate for city councilor representing Freixo's party, asked in a Twitter posting: “Now is it clear why militia areas only have adverts for Eduardo Paes?”

Commentators questioned Freixo’s strategy of focusing on the militias. A post on the blog Rio Politics run by journalist Miguel de Rosario, political scientist Theofilo Rodrigues and candidate for city councilor Igor Bruno, a communist, argued:

Freixo lowered the tone, in various ways, by focusing his discourse on the issue of the militias, perhaps thinking he would gain because of the film Elite Squad 2.

The post continued:

Eduardo Paes could have all the defects in the world, but to accuse him of being a militia member is frivolous.

Try as he might, Freixo wasn't getting traction against Paes. Writing on the website UOL after the mayor appeared on a platform to answer  journalists' questions, columnist Plinio Fraga argued that his biggest enemy was himself, in particular his arrogant manner. “This somewhat bitter and provocative tone is only possible when you have an advantage that is twice your competitor's, and with twice the volume of funds raised also,” said Fraga. “It is not for nothing that Paes said with full lungs: ‘I am the happiest mayor in the world.’"

With the election Oct. 7, Freixo will need more than a concept for Elite Squad 3 to unseat him.

(Dom Phillips is the Rio de Janeiro correspondent for World View. The opinions expressed are his own.)

Read more from World View, Bloomberg View's emerging markets blog.

To contact the writer of this blog post: Dom Phillips at domphillips23@gmail.com.

To contact the editor responsible for this blog post: Lisa Beyer at lbeyer3@bloomberg.net.