One year ago, the eyes of many Brazilians were glued to the TV as a bloody battle raged for control of one of Rio de Janeiro’s largest favelas, Rocinha. The drug lord Rogério 157 and his men took on soldiers loyal to another, known as Nem. The death toll surpassed 50, but the true total is still unknown. Since 2005, Nem had controlled the drug trade of the entire favela — despite being behind bars for much of that time — and, until recently, he was Rogério’s boss and friend. Both men and their armies had belonged to a group called Amigos dos Amigos, or Friends of Friends, one of Rio’s oldest and most powerful drug cartels.

To most Brazilians, this incident looked like just another chapter in Rio’s increasingly violent criminal narrative. As TV news channels broadcast dramatic live coverage from the favela, calls for a full military takeover of the state’s public security apparatus grew louder. That intervention did come to pass, but the shootouts and the bloodshed across Rio only intensified. The government’s ineffective tactics are partially to blame, but something else was brewing that only became clear in hindsight: the wholesale restructuring of organized crime in the city that would push the Amigos dos Amigos to the edge of extinction.