ON THE sweltering afternoon of March 18th some 2,000 people crammed the narrow streets of Maré, a favela in the north of Rio de Janeiro, to protest against the murder of a friend. Marielle Franco, a city councillor who grew up in Maré, was shot dead four days earlier in the city’s centre (along with her driver) after a meeting she had organised for young black women. “She was killed for trying to make things better,” said Diony, a supermarket employee watching the protesters parade slowly through Maré.

The assassination of Ms Franco, a young, black, gay activist, has reverberated far beyond her birthplace. It was the subject of 3.6m tweets in 34 languages in less than two days. Thousands of people marched in cities across Brazil. In February the president, Michel Temer, made Rio’s crime a national issue when he ordered the army to take control of the state’s police, prisons and fire services until the end of this year. This is the first such intervention since the end of military rule in 1985. Ms Franco’s murder will help keep crime uppermost in Brazilians’ minds when they vote in elections scheduled for October.

Seventeen of the world’s 50 most violent cities are Brazilian, according to Security, Justice and Peace, an NGO. In poor neighbourhoods, drug gangs battle for turf while the state stands by. In 2016 the number of murders nationwide was a record 61,600. Measured by its murder rate, the city of Rio does not even rank among the top 30 in Brazil. But the state of which it forms a part is uniquely dysfunctional. Three of its past four governors have been charged with corruption. Its government could not pay its bills in 2016 and was bailed out by the federal government.

Rio’s “military police”, its crime-prevention arm, says it has 2,000 fewer officers than it needs. Just half its fleet of patrol cars are in service. A community-policing scheme, which helped cut the murder rate in 2015 to its lowest level in 25 years, has been gutted. The state’s penury weakens a police force already compromised by corruption. “There’s practically no serious crime in Rio without police participation,” says Luiz Eduardo Soares, a former federal secretary of public security.

Last year, with competition among drug gangs increasing, 6,731 people were killed in the state of Rio, the highest number since 2009. The city itself has ten times as many murders as London but less than half its homicide investigators.

Mr Temer, weakened by allegations of corruption, has offered himself as Rio’s saviour. In the past the army has reinforced police forces, but it has never before commanded them. Now Walter Braga Netto, a general, is in charge of Rio’s security. The state is “a laboratory for Brazil”, he says.

The deployment of the army made political sense. It allowed the federal government to avoid humiliation in a congressional vote on its most important economic measure, a constitutional amendment to reform the pension system. (Such amendments cannot be voted on during federal interventions.) Sending the army looked like a way to undercut support for Jair Bolsonaro, a demagogic congressman from Rio who believes that “a good criminal is a dead criminal.” He is the second-most popular contender to succeed Mr Temer as president (after Luiz Inácio Lula da Silva, a left-wing former president who has been convicted of corruption and may not be able to run). Three-quarters of Brazilians support the army’s intervention.

But there is scant reason to believe that the army will succeed where Rio’s police have failed. It has “limited training in arrests, crowd control or street-level operations that minimise casualties”, says Robert Muggah of the Igarapé Institute, a think-tank. Reluctant to brave the gangs, the army has so far mainly patrolled the streets by day. In one favela, Vila Kennedy, it has removed barricades put up by gangs to allow state services to enter. To do much more will require extra money. The federal government has said it will provide the army with 1bn reais ($300m) to police Rio; the army says it needs 1.5bn. Its deployment does nothing to reform the police. Four-fifths of Rio’s residents say that the army has made no difference so far.

Ms Franco, a member of a small left-wing party, was a fierce critic both of the army’s deployment and of the police. She was a member of a city-council commission that oversees the intervention and she accused the police of abuses in the weeks before her murder. On the day before she died she tweeted her suspicion that the military police had killed a young black man, Matheus Melo, as he left church.

Many suspect that the murderers of Ms Franco are members of “militias” controlled by serving and former police officers, which run extortion rings in some favelas. In 2011 Patrícia Acioli, a judge who jailed around 60 police officers belonging to militias and death squads, was shot dead. Six military-police officers were convicted of the crime.

Ms Franco’s murder, and the suspicion that police may be the culprits, have changed the tenor of Brazil’s debate about crime. Mr Bolsonaro has said nothing about the killing, presumably because in its wake his harsh rhetoric would alienate centrist voters whose support he will soon need. Mr Temer’s military response is starting to look simplistic. Rio, along with other cities and states, needs healthier finances, better-run police and schools and services that steer children away from crime. With luck, voters will demand that from the politicians they elect in October.