Across Osasco and in neighbouring Barueri, groups of gunmen struck in 11 locations on August 14, including another bar and a cafe, killing a 16-year-old boy. In about two hours, 18 people were dead.

De Paula, 72, lives in a favela, an informal settlement in a poor neighbourhood, and works as a maid. As she described the events of that tragic day, she showed little signs of grief.

She was bewildered at the seemingly random and senseless killing of her only son. She looked at the framed photo of Luiz, dressed in military fatigues and holding a rifle from his days in Brazil's armed forces, placed on the edge of a cabinet in the room.

"If it was a gunfight between police and traffickers, and he was hit by a stray bullet, I could understand," she said.

The main suspects in the Osasco massacre are off-duty police officers, allegedly avenging the killings of two policemen in the area days before.

Zilda Maria de Paula's son Luiz was one of the victims of a masscre at a bar outside of Sao Paulo in August [Tommaso Protti/Al Jazeera]

The violence in Osasco was among the worst of several incidents over the past year in Brazil, where police are responsible for about 2,000 deaths annually. Thirty-seven people were killed on one weekend in the Amazonian city of Manaus, and similar smaller-scale murders took place in the northern city of Belem and Uberlandia in the southeast.

Camera footage from one of the 11 Osasco killing locations shows three masked men entering a bar, lining up patrons against the wall, and shooting them before driving off.

So far, at least one policeman has been suspended from duty, while 18 others are currently under investigation.

The indiscriminate nature of the murders is a way for rogue officers to show their strength to local criminals, explained Major Sergio Olimpio Gomes, a Sao Paulo congressman, who served as a military police officer for 29 years.

To this effect, the day after the killings, local media reported that gang members from the First Capital Command (PCC) - Sao Paulo's most powerful drug-trafficking gang - were reportedly imposing a curfew across Osasco through intercepted WhatsApp messages.

"The rogue policemen feel the same sense of impunity that the street criminals feel, and they feel they can make their own laws," Gomes said.

"Certain police officers will say, 'The law doesn't work, so I'll make my own law. Kill one of my colleagues, I'll do the same with 10 of them, 50 of them, 100 of them.' It's extremely dangerous."

This attitude results in the deaths of innocent bystanders who have no association with the cycle of violence.

Juvenual Teixera Sousa - the 34-year-old owner of Bar do Juvenal, whose 19-year-old brother Thiago was killed along with seven others including Luiz de Paula - said "everyone who died here was a working man [and not a criminal], no one here killed a policeman or a civil guard".

Brazil has the highest number of murders in the world, with more than 50,000 in 2013. But just eight percent of cases are ever solved, compared to about 65 percent in the US and 80 percent in the UK.

According to Adilson Paes de Souza, a former military police colonel and author of the book Keeper of the City, the few criminals who are prosecuted and sentenced are treated as heroes, as Brazil's penitentiary system is controlled by organised crime.

De Souza interviewed police officers arrested for extrajudicial killings for his book. "Given the failure of the system, you have police that don't believe in the system, so they develop their own methods which, for some, is to go and commit a massacre," he said.

Paes de Souza added revenge massacres - which almost always happen in poor neighbourhoods - are a direct consequence of abandonment by the state.

"Sao Paulo is like two cities in one," he said.

Brazilian police usually come from poor backgrounds and often grow up, live and work in neighbourhoods with high crime rates, making them easy targets for criminals when they are off duty. Many are killed close to their homes or while working informal security jobs to supplement low salaries.

"You have the privileged parts, which are well-served by public services, including public security, and then you have the poor parts, which are abandoned. When there is an absence of the state, people will develop their own methods to resolve their conflicts," de Souza said.

Eight men were killed at Juvenal Bar in Osasco - among the 18 who died on August 14 [Tommaso Protti/Al Jazeera]

Impunity and tolerance

Police killings are a long-term problem that Brazil has failed to resolve. The Vigario Geral massacre in 1993 and Sao Paulo's crimes of May 2006 are of the most infamous.

Brazil's police are among the world's most violent, killing about 11,000 people between 2009 and 2013, and killing an average of six people a day while on duty, according to a study by the Brazilian Forum on Public Safety.

Most cases, however, end up being dropped because of weak evidence, intimidated witnesses, and cover-ups, as well as slow and inefficient courts. Suspects are rarely punished, which analysts say feeds a cycle of impunity.

In an interview with the local press, Marilda Pansonato Pinheiro, spokeswoman for Sao Paulo's Civil Police - who are charged with the investigation into August's killings - said she feared evidence would be compromised following a lack of cooperation from the military police force.

"Investigations are badly managed, and there has been for the last 50 years a certain corporatism and tolerance for crimes committed by police," said Bruno Paes Manso, a post-doctorate researcher at the University of Sao Paulo's Center for the Study of Violence.

The recent spread of social media use, particularly Whatsapp groups, has enabled rogue police officers to carry out highly organised revenge killings and celebrate in a macabre fashion, often sharing photos of dead victims, said Manso.

"There was even a case where photos were sent to the victim's family," Manso said.

As night time falls in Osasco, the streets become deserted.

Sousa, the bar owner, shuts down Bar do Juvenal at 9pm, he would normally stay open until 3am, saying apart from the trauma of losing his brother and seven friends, the murders are having a negative effect on his business.

"Normally the square is full at night. Families bring their kids here for ice cream. Who's going to do that now?"

Maria de Paula joined other mourners in remembering victims at a street altar set up after the killings [Miguel Schincariol/AFP/Getty Images]