Today crime experts argue that militias have become Rio's biggest security threat, with methods that are being copied in other areas of Latin America's largest nation.
The latest scheme works like this: Brazilian paramilitary groups buy boxes of cigarettes in neighbouring Paraguay for 14 cents a pack and then smuggle them back home, where prices and taxes are much higher, and sell them for up to US$2.15.
The cigarettes offer the militias the lion's share of an estimated US$330 million in profits and add to a portfolio of illicit operations the groups have honed over two decades, including imposing surcharges on cable service, electricity and transportation. The groups are also known to conduct extortion and summary executions.
But while investigating the smuggled smokes, authorities found other evidence they deemed more troubling: cameras, online monitoring systems and signs of possible connections between militias and members of Red Command, Rio de Janeiro's most powerful drug gang.
Those, authorities say, are indications that the militia groups which used to be minor players in the Rio underworld are now becoming shot callers — and not easily controlled.
"It's like a cancer," anti-piracy police investigator Mauricio Demetrio said. "It won't stop."
Confront what the State could not
Beginning in earnest in the 1990s, the militias were mainly made up of former police officers, firefighters and military men who wanted to combat lawlessness in their neighbourhoods. For years, they were even lauded by politicians, including President-elect Jair Bolsonaro, a former Army captain who as a congressman called for their legalisation in 2008.
In theory at least, the groups were helping to confront what the state could not, even if the trade-offs included tolerating illicit businesses and sometimes murder. Along the way, their brutal methods and control expanded. Today some crime experts argue that militias have become Rio's biggest security threat, with methods that are being copied in other areas of Latin America's largest nation.
"Militias have a head for business," said Marcelo Freixo, a state legislator who is accompanied by a half-dozen plainclothes bodyguards because of his work to combat the groups.
Militias, he said, have so completely taken over parts of Rio that confronting them would require gathering street intelligence, deploying state services and using physical force.
"If you just send in troops, you won't find anybody there," Freixo said.
Unlike drug-traffickers who can be seen brandishing automatic weapons, militia members blend into the background, running things behind the scenes. When necessary, they mobilise in ways that underscore commando-like training: they dress in all black, with faces covered, carry weapons and backpacks, and move in formation.
One of the only ways they are seen by the larger public is by chance: when news helicopters, in the course of covering something else, capture them on the move. That has happened a few times in recent months, as militias have been fighting with drug-traffickers for control of large areas of western Rio.
'We are in the middle'
"There is a war between militia and traffickers, and we are in the middle," said a resident of a slum in western Rio that, after years of being controlled by a militia, was recently overtaken by Red Command.
The woman, who agreed to speak on the condition that her name not be used, described how the militia had controlled many aspects of daily life.
Cable television cost US$15 a month. Running water, parking a car and "security" all cost US$12 a month. Not paying up can mean getting beaten — or worse. Complaining to authorities means certain death.
The woman also witnessed what experts have noted in the last couple of years: militia members are becoming involved in the drug business, a far cry from the days when a large part of their focus was fighting trafficking.
"My dream is to leave here," she said. Residents "feel abandoned, impotent. It seems like we don't exist to the state."
The state's Security Ministry estimates that militias now control about a quarter of the sprawling state of Rio de Janeiro, or about 4,247 square miles (11,000 square kilometers).
Besides terrorising residents in areas they control and expanding illegal businesses, they are also becoming increasingly sophisticated in their operations.
In March, black city councilwoman Marielle Franco was shot and killed in her car along with her driver. Franco was popular among many Rio residents for outspoken criticism of police brutality in poor neighbourhoods.
Investigators believe militias were behind the hit because of its precise planning, right down to making sure surveillance cameras were shut off on the block where she was shot.
"Everything indicates it was one those groups," General Richard Nunes, the state's public security secretary, told The Associated Press.
Last week, Nunes told the Estadão newspaper that the latest in the investigation is that militia members killed Franco because they saw her as a threat to their attempts to take over lands in western Rio.
To date, nobody has been charged.
Taking them on
Authorities have periodically tried to take on militias, only to return to the status quo, or worse.
In 2008, Rio's state legislature undertook a major investigation of militias and their tentacles throughout society. The report called for the indictment of 225 people, including politicians at the state and city levels, police officers, firefighters and prison officials.
Dozens were arrested and convicted, while militias showed how they dealt with anybody who cooperated.
Freixo, the state legislator who oversaw the commission, recounted poignant testimony from former councilman Josinaldo Francisco da Cruz, known as "Nadinho," who was cited in the report. Da Cruz testified about militia activity in Rio das Pedras, a low-income area in western Rio that many consider the birthplace of modern-day militias.
"After he finished testifying, he said, 'I am going to die,'" Freixo recalled. Soon after that, da Cruz was shot 10 times and killed.
The commission made 58 recommendations, from increasing intelligence to investing in social welfare programs, to wrest back control of services that should be provided by the state.
"Very little was done," Freixo said, adding that today areas of hardscrabble northeastern states like Ceara, Rio Grande do Norte and Bahia have militia-type activity.
Part of the challenge of combating militias is their deep connections in law enforcement ranks. Those ties originated in Brazil's 1964-1985 dictatorship, according to Jose Claudio Sousa Alves, an expert on militias and a sociology professor at the Federal Rural University of Rio de Janeiro.
Sousa Alves said "extermination groups," made up of police officers, military members and firefighters executed dissidents and criminals, all with the tacit approval of the dictators.
When Brazil transitioned to democracy in the 1980s, the practice remained, but civilians were increasingly mixed into such groups. By the early 2000s, the growing civilian presence led to militias to put forward candidates for local and state offices, which helped control the agencies responsible for security.
In practice, that means people living in militia-controlled areas rarely turn to police because there is a good chance that any particular officer is involved.
"That would be suicide," said Sousa Alves, whose university is in the western Rio city of Seropedica, an area controlled by militias.
The fear is palpable among residents in militia-controlled areas, which from the outside seem like normal neighborhoods and cities.
"They come, put out their hand and leave," said a store owner in the Baixada Fluminense area, where militia members charge him US$15 a week. "If you say 'No,' you don't know what can happen."
Looming over the issue is the question of how, or whether, Bolsonaro's administration will try to take on militias.
After repeatedly defending them earlier in his career, Bolsonaro, who takes power January 1, distanced himself during the recent campaign.
"Today nobody supports militias," Bolsonaro told O Globo newspaper in July.
Still, security experts believe some of Bolsonaro's campaign promises could strengthen the militias' hands. For example, he wants to shield police from prosecution in the case of on-duty killings, loosen gun laws so more average people are armed and in general crack down on violence with brute force.
Claudio Ferraz, a former police investigator on a task force focused on militia cases, said he senses a certain "accommodating" of militias in the current political climate. He warns that complacency would be a mistake.
"The tiger doesn't climb on top of you," he said. "The tiger eats you."
by By Peter Prengaman and Sergio Ramalho, Associated Press