RIO DE JANEIRO (Reuters) - Police in Rio de Janeiro arrested more than 40 people on Thursday for their alleged roles in a murderous gang that extorted companies working for state-run oil company Petrobras and established a secret cemetery to dispose of rivals.

FILE PHOTO: A view of the petrochemical complex known as Comperj, is seen in Itaborai, Brazil, March 31, 2015. REUTERS/Ricardo Moraes/File photo

The arrests highlight how South America’s third largest city and suburbs have struggled with the growing power of so-called militias — criminal groups run by retired and off-duty police officers dominating distribution of utilities and basic goods for millions of residents.

The operation also underscores the threat of organized crime to Brazil’s fast-growing oil and gas sector. Investigators said the militia monopolized the distribution of cooking gas in the hardscrabble city of Itaboraí and extorted firms transporting workers to an unfinished petrochemical complex.

“We’ve managed to identify, up to now, at least 77 people in this organization -lawyers and police among them,” Rio police investigator Romulo Santos told journalists. He added that the group had likely committed at least 50 homicides.

“They acted to intimidate the population, executing rivals, criminal rivals, often during the day,” he said. Police noticed a string of strange disappearances over the past year and identified what could be a clandestine graveyard, Santos added.

Rio’s militias sprang up in recent decades to fight drug gangs, but now act as fearsome crime outfits in their own right. Their connections to local politicians and security forces have helped them take territory from other criminal groups, as they profit from activities ranging from protection rackets and contraband sales to illegal construction.

Brazilian President Jair Bolsonaro, who took power in January, has hailed the militias in the past as a preferable alternative to other criminals, but critics say their methods are little different than the groups they displace.

Police said the criminal organization in Itaborai had carried out a campaign of terror, often maiming and torturing victims, and was likely involved in a mass shooting at a bar in January that killed 10 people.

Itaboraí, a city of 240,000 located northeast of Rio city limits, is home to the Comperj refinery, where construction of the complex has stalled in recent years after it was caught up in a corruption probe. Petroleo Brasileiro SA, as Petrobras is formally known, has booked some 6.5 billion reais ($1.71 billion) in writedowns for overpriced works and services at the facility.

Petrobras is in talks with China National Petroleum Corp (CNPC) [CNPET.UL] to help finish a refinery at the site, although talks have moved slowly.

In a statement, Petrobras said it had not identified any extortion attempts at Comperj.

“The company, via its corporate security arm, works together with public security bodies and reports any security-related incident to these bodies,” a spokesman wrote in an e-mail.

CNPC did not respond to a request for comment outside business hours.

Police continued to pursue additional arrests on Thursday afternoon, saying that over 70 people were “targets” of the investigation, code-named Operation Savior. One leader of the group, they said, had escaped arrest by jumping through a fourth-story window.