Five undercover cops—Doca (Otávio Müller), Danilo (Gabriel Braga Nunes), Carlinhos (Marcello Melo Jr.), Branco (Milhem Cortaz) and Samuel (Caio Blat)—operate inside Complexo do Alemão, a district that blends several slums and is considered one of the city’s most dangerous zones in Rio de Janeiro. Their mission is compromised when the government signals a raid with military vehicles, prompting the drug lord Playboy (Cauã Reymond) to sever all communications and cut the lines that could connect them to their boss, Samuel’s father the sheriff Valadares (Antônio Fagundes). With contact cut off, the five officers shelter in the basement of Doca’s pizzeria, which becomes their basically improvised base of operations as the danger closes in around them.
The pressure mounts when Valadares’s assistant Pixixo (Izak Dahora) is nearly killed in a confrontation, and a briefcase he drops reveals the names of all infiltrated officers inside the slums. The group manages to converge at the pizzeria, escaping from hostile gunmen, though Carlinhos arrives last and Branco immediately brands him a traitor, leading to his temporary handcuffing. Carlinhos is also the lover of Leticia, sister of Senegal (Jefferson Brasil), Playboy’s right-hand man.
Meanwhile, Mariana (Mariana Nunes), a local cleaner who slips in with her own key to claim her service money, is captured in the basement by Branco. Even after Doca explains that she’s innocent and has a son, Branco keeps her locked inside, fearing she may reveal their location, especially once he learns her son’s father is Playboy.
As the government gathers military forces for the raid, Playboy’s men intensify their interrogations of people on the streets and in homes to extract information about the infiltrated cops. Knowing Carlinhos’ feelings for Leticia, Playboy convinces Senegal to use his sister as bait, placing Leticia in a car and broadcasting threats across the slum to reach Carlinhos wherever he hides. Carlinhos is finally allowed by Branco to go rescue Leticia, and Branco also moves to protect Mariana after hearing Mariana’s remark that police officers always abandon their partners in danger. Senegal then launches a raid on the pizzeria with a gang of gunmen; the ensuing firefight leaves no survivors besides Leticia and Mariana.
Pixixo eventually reaches Mariana by phone and places her in contact with Valadares, who collapses in grief when he learns there were no officers left alive. The film closes with a montage of real-world events, pairing scenes from the raid with footage of the 2010 Complexo do Alemão operation and the 2013 protests that followed in Brazil.