As they buried the 100th Rio de Janeiro policeman killed this year, current and former officers sounded an almost apocalyptic warning for Brazil's second-largest city.
"Society is bleeding. Society needs to understand that the police are the last barrier -- and that this barrier is breaking," said Andre Lopes, a former police sergeant and current city councillor.
"Rio de Janeiro is worse than places run by Islamic State," he said.
If that sounds over the top, it doesn't feel like it to law enforcement members locked in a brutal and intensifying struggle with drug gangs.
On Sunday, they gathered in Our Lady of Bethlehem cemetery in Rio's rough north side to bury Fabio Jose Cavalcante, a 39-year-old officer gunned down outside his father's house the previous day.
With 100 casualties already this year -- deaths that usually garner barely a few paragraphs in local newspapers -- the police are effectively in an undeclared, low level war.
And in the minds of many of the approximately 300 mourners bidding farewell at the side of the flag-draped coffin, this is a war Brazil's corrupt, cash-strapped state will not let the police win.
"How many Cavalcantes will have to die before Brazil changes?" shouted one man.
Rio's police have been accused by Amnesty International and other human rights organizations of systematically falsifying evidence, shooting before asking questions and in some cases deliberately murdering suspects. Over the last decade, some 8,000 people have died during police actions, according to official figures.
But the officers say they are the victims, literally hunted down by their foes, who control swaths of the impoverished favela neighborhoods and come armed with automatic weapons.
Since 1995, the Rio Military Police -- ordinary street cops who in Brazil are formally part of the military -- have lost 3,000 officers. Last year the toll was 146.
An even more startling statistic is that a majority of those being killed are not on patrol or in uniform. They are at home or in their private cars or otherwise off duty.
In some cases, this is explained because officers are assaulted in an ordinary robbery, then shot dead when the assailants realize who they are. In other cases, officers are apparently followed to their houses and targeted.
The killers may be convicts looking for revenge. "Some get out and return to crime and many probably want to get back at those who arrested them," said Lieutenant Colonel Ranulpho Souza Brandao, who commands Cavalcante's former battalion.
"The criminals know where the police live... and if they kill one it raises their standing in the favela," said retired officer Sergio Luiz da Silva, who was a friend of Cavalcante.
For overstretched police, the violence is symptomatic of deeper problems in which the police feel abandoned.
Despite the frequent allegations of human rights abuses leveled at Rio's force, several at the funeral complained that the justice system gives suspects too much leeway.
"The police arrest people and the Supreme Court lets them go!" shouted one mourner.
"Not one of those human rights campaigners came" to the funeral, Lopes said bitterly. He said he will be voting for hard right candidate Jair Bolsonaro when Brazil holds presidential elections next year.
Federal legislator Sostemes Cavalcante, from the right-wing DEM party and not related to the dead officer, said Rio's economic mess is a big part of the law enforcement crisis. But he added that the problems extend much further to Brazil's borders and a failure to stop the flow of powerful guns.
"We got to today's situation because of unguarded borders," he said.
Luiz Machado, a member of the investigative Civil Police sporting a waist-length black beard and cowboy hat, said politicians are not just weakening the police but the whole state. "They're finishing off Brazil," he said.