Police arrested a community leader from Rio de Janeiro’s biggest favela, in a reminder of the ambiguous role that such figures have been forced to play, acting as intermediaries between drug gangs, residents and politicians.

Police say that William de Oliveira, leader of a Residents’ Association (Associaçoes de Moradores – AM) in the Rocinha favela, was caught on tape negotiating an arms sale with a local drug boss.

In the video, distributed by O Globo and reportedly recorded in 2010 (see below), Oliveira and another community leader are sitting at a table with Antonio Bonfim Lopes, alias “Nem.” Oliveira’s companion is seen handling an AK-74, then Bonfim Lopes counts out a stack of money and hands it over.

After police arrested Oliveira on December 2, a local councilor said they had further evidence of Oliveira’s connections with arms and drug trafficking.

According to O Globo, Oliveira maintains that the money seen in the video was a campaign contribution made when he was running for state representative that year, and was later returned.

Rocinha is Rio de Janeiro’s biggest favela and the most recent to receive one of the city’s pioneering police pacification units, known as UPPs. The government’s security surge in this neighborhood was well publicized long before the scheduled take-over date on November 13. Just before the government forces arrived, gang leader Bonfim Lopes tried to escape the neighborhood in the trunk of a car, but was captured.

Like other gang leaders in Rio, Lopes made sure he could operate with impunity in Rochinha by buying the tolerance of the locals. This meant providing social services, like hosting huge block parties or sponsoring the youth soccer team. It also meant doing other jobs the government did not: cracking down on petty crime and giving money to the vulnerable, including drug addicts and prostitutes.

In an interview with Epoca magazine just before his arrest, Bonfim Lopes presented his role in the favela as a twisted Robin Hood figure. He showed sympathy for the plight of a young drug addict, and boasted, “Here in Rochinha no one steals anything.”

Bonfim Lopes played a warped version of the role traditionally performed by figures like William Oliveira and his residents’ association. Favela residents first began organizing these associations, known as AMs, in the 1950s in response to the need for basic services — trash pick-ups, electricity, cable — absent in favela neighborhoods like Rocinha.

In the 1980s, many of these civic organizations had to learn to co-exist with the increasingly powerful drug gangs. AM leaders who were not cooperative were killed or driven out of the favela. Drug traffickers often used corrupt police officers to enforce their mandate against the AMs, which made residents even more skeptical about the government’s legitimacy. This helped figures like Bonfim Lopes become more accepted as local enforcers of public order. The AMs, meanwhile, saw their power diminished, as the drug gangs were frequently called upon to resolve neighborbood disputes.

As leader of a Rocinha AM, Oliveira would have faced a tough balancing act. The AMs often have to play the role of intermediary between drug traffickers and corrupt politicians seeking votes in a given neighborhood. Many AMs still peform important services for the favelas, and in many cases are the only forum where residents can formally petition the government. But many AMs have now been co-opted by either drug gangs or violent militias.

Given the roles played by Oliveira and Bonfim Lopes in Rocinha, it’s practically inevitable that the two would interact. It is up to the state to prove that Oliveira is guilty of further collaboration with Bonfim Lopes’ crew, like helping them with gun or drug sales, as the police maintain.

There may be more cases like Oliveira’s as Rio’s police pacification units try to assert themselves as the new authority in the favelas. The entrance of the UPPs to Rio’s favelas already appears to be upending the balance of power among the drug gangs, who are forced to redistribute themselves in other neighborhoods with less security presence. The residents’ associations will also have to start questioning what the role they should play in a changing city.