The residents were chatting outside when the police helicopter swooped over the polluted river at the end of their street in Rio’s sprawling Maré favela complex. They fled as the officers riding in it fired volleys of bullets during a raid to catch a renegade gang boss.

Controlled by two rival drug gangs and a paramilitary group, this roughshod community has grown used to violence and gunfights. But the police response was extreme even by those standards.

Four gang members sought refuge in a nearby house. Police found two in its entrance corridor, shouting: “I surrender.” A police officer cursed. “My order is to kill,” he said – and both were shot dead, a resident who witnessed the killings told the Guardian. Two more were killed on its rooftop terrace while a 15-year-old girl and a neighbour cowered in a bathroom, and four others who the police said were also gang members were killed nearby. Police seized weapons and arrested three people. The gang boss got away.

During campaigning last year, Rio’s new, far-right governor, Wilson Witzel, promised a “slaughter” of gun-toting drug gangsters using helicopters and snipers – leading to comparisons with the Philippines president Rodrigo Duterte’s bloody drug war. Now fears are growing that the policy is being implemented in Rio, fed by a record high of 434 deaths in confrontations with police in the first three months of this year.

This was the second alleged massacre of gang members in recent months. In February, 13 men connected to a drug gang were killed in the Fallet favela. Pedro Strozenberg, ombudsman of Rio’s Public Defender’s Office, called it an “emblematic” massacre with “with strong signs of execution after surrender”.

There are also eight cases of helicopters shooting into densely populated favelas and accusations that a sniper in a police tower overlooking the Manguinhos favela shot two men dead and injured another.

Facebook Twitter Pinterest Manguinhos favela. The white structure in the background is a police tower. Residents say two men were shot dead and one wounded by a sniper firing from it. Photograph: Dom Phillips/The Guardian

This indicates “a procedure orientated as a state-orientated policy”, said Strozenberg. “The issue is whether it is legal.”

Witzel – an ally of the far-right president, Jair Bolsonaro – rubbished complaints about the Maré operation. “If you complain about the police, it’s better not to have police,” he told reporters.

Days earlier, he had shared videos of himself on social media in a helicopter with police during a recent operation in Angra dos Reis, a seaside town 120 miles (200km) from Rio, promising to end “banditry”. The SBT channel screened more video shot during the operation over gang-controlled areas, showing a police officer firing towards a tarpaulin structure on a hillside. Locals told SBT it was a women’s toilet erected by an evangelical church. Nobody was arrested.

Renata Souza, the chair of the human rights commission at Rio’s legislative assembly, wrote to the UN rapporteur on extrajudicial killings that Witzel was “legitimising” police violence in favelas. In Maré, speaking anonymously for fear of reprisals, the resident who witnessed the killings said: “I can’t sleep at night because what comes into my mind are the shots and those guys dying.”

A 15-month military occupation that ended in 2015 failed to dislodge the gangs from Maré. The day after the operation, a man with a machine gun sped past on a motorbike in the area controlled by the Comando Vermelho (Red Command). A man with an automatic rifle stood in a busy intersection in the zone controlled by the Terceiro Comando Puro (Pure Third Command) gang targeted in the police raid.

Their presence leads many to assume everyone in favelas is involved in the drug trade, said David Vicente, 20, a violinist with the Maré Orchestra who led screaming children he was teaching out of range when the helicopter clattered overhead. “We’re not. We work. We pay taxes,” he said.

Facebook Twitter Pinterest David Vicente. Photograph: Dom Phillips/The Guardian

A spokesman for Witzel said police operations were carried out within the law, citing official figures showing that homicides in March had fallen 32% on last year to the lowest level for 28 years. Car and cargo thefts fell and 8,500 people were arrested in the first quarter of the year, a fifth more than 2018. “In operations in conflagrated areas, the primary goal is arresting criminals and seizing weapons,” he said in an email. “But often, the criminals opt for confrontation.”

He said operations involving aircraft followed a regulation issued last October by the state government’s secretariat of security, then controlled by the Brazilian army under a 10-month “federal intervention” during which police killings rose. Witzel has since closed the secretariat.

The regulation was introduced after the schoolboy Marcus Vinicius da Silva, 14, was killed in Maré in June 2018 after a helicopter strafed the favela during an operation. It says firearms on helicopters should be used in defence and only fire “intermittent” shots.

“The helicopter cannot be used as a shooting platform,” said Strozenberg.

Fogo Cruzado (Crossfire), an independent monitoring app, has counted eight police operations in Rio this year where shots were fired from helicopters – two in the Cidade de Deus favela.

The actor Jéssica de Sá, 18, was at home in Cidade de Deus in March when helicopters were used in a police operation. TV Globo showed an armoured helicopter carrying sharpshooters. “It was very low,” de Sá said. “I have never been so scared – and I have lived through gunfights.”

Two days before the Guardian visited Cidade de Deus recently, shots were fired from another helicopter that buzzed the favela, she said. “It was up above for 10 minutes, firing shots. There was no operation,” said Jefferson Alcântara, 23, a shop assistant. “With this new government they [the police] have free rein.”

Favela activists said police operations penalised and killed favela residents with no involvement in drugs, which are sold and used across the city.

“Our society has constructed the idea that the favela is inferior, that the people who live there are worth less,” said Raull Santiago, co-founder of the Papo Reto (Straight Talk) Collective, which monitors abuses in Rio’s Complexo do Alemão favela. In March, he broadcast via Facebook from his roof as bullets rained down from a police helicopter.

Killings of police officers are falling – 92 died in 2018, according to Rio’s Extra tabloid, 43% down annually. “We face narco-terrorists with heavy weapons,” said Anderson Valentim, a police sergeant who has worked in favelas. “In the favela they are treated like heroes.” Speaking privately, another police officer said a highly trained sharpshooter firing from a helicopter had “more precision over what he is shooting at”.

Drug gangs have dominated many Rio favelas for decades – while paramilitary mafias Witzel has called a lesser problem control areas where 2 million people live, the G1 website reported.

Facebook Twitter Pinterest A bullet hole in a wall after a helicopter fired shots in Maré. Photograph: Dom Phillips/The Guardian

In 2012, as part of a city-wide “pacification” programme before Rio hosted a World Cup final and Olympic Games, troops invaded Rio’s impoverished Manguinhos favela to install a police base. But “pacification” failed. There was no sign of the police on a recent morning, just men selling drugs on a trestle table.

A nearby street corner was overlooked by a concrete tower, located inside a walled police base. Police are investigating whether two men shot dead and one wounded at this spot in January were hit by a sniper lying on its roof. Fatima Pinho, 45, a housewife and campaigner who heard the shots, said residents were “absolutely sure” they came from the tower. She said three others had been shot last year in similar circumstances.

Carlos Eduardo Lontra, 27, was this year’s first victim. Speaking anonymously for fear of reprisals, a relative said he had served a prison sentence six years ago for drug trafficking but was working and bringing up his young son. There was no police operation when he was killed.

“If you did something wrong, you have to pay for it, but not with your own life,” the relative said. “They are treating a human being like a chicken that can be slaughtered.”