BOPE Captain Nascimento (Wagner Moura) explains how Rio de Janeiro’s police force and the city’s drug lords cooperate with each other.
Novice police officers André Matias (André Ramiro) and Neto Gouveia (Caio Junqueira) uses the telescope of a sniper rifle to watch officer Captain Oliveira (Marcelo Valle) and his colleagues reunite with drug traffickers. Neto accidentally shoots one of them, which provokes a deadly gunfight between police force and thugs as both sides are unaware of where the bullet came from. As Mathias and Neto flee the scene, Nascimento and his men head to the shootout to rescue the police officers.
Six months earlier, Nascimento and his wife Rosane (Maria Ribeiro) are pregnant with their first child. Unwilling to be an absent father, Nascimento begins searching for a worthy successor, which coincides with an operation at Morro dos Prazeres to secure the location for Pope John Paul II’s overnight visit at the Archbishop’s home near the slum buildings.
Meanwhile, long-time friends Neto and Matias share an apartment in Rio and have just completed admission process to the PMERJ. Both hold high moral grounds and rebuff everyday payoff offers, but are soon disillusioned to realize their superiors are corrupt. Neto begins working as a supervisor at the police auto mechanic shop, whilst Matias is responsible for registering and filing every police complaint in a small archive office with fellow other officers.
Matias also attends Law school, where he befriends classmates Roberta (Fernanda de Freitas), Edu (Paulo Viela) and Maria (Fernanda Machado), who are all members of a NGO sponsored by a senator. It operates in a drug traffic area run by “Baiano” (Fábio Lago), a major drug lord, who allows the NGO to operate as long as it doesn’t interfere with his business or bring police attention to his area.
Neto soon grows tired of the autoshop work and applies to another department, but his transfer is denied. Upon learning of the corruption practices carried on by police officers in a routine patrol with Captain Fabio (Milhem Cortaz), he devises a plan to steal the money from the bribes Oliveira periodically collects from drug lords money in order to fix as many police cars as possible at once, and asks Matias for help. They succeed in stealing the money, but Oliveira finds out about their involvement and demotes both to cooks at the battalion’s kitchen as punishment. Under the impression that both officers were following Fabio’s orders, Oliveira has him attend a false police report at the Morro da Babilônia during a community funk party; however, Fabio realizes it is an execution plan and warns Neto and Matias, who follow him and arrive at the vantage point from the first scene. When one of the dealers reaches for his gun, Neto precipitately shoots him, starting the gunfight. Neto and Matias, inexperienced and outgunned, are soon cornered by the thugs while Fabio escapes. Meanwhile, after being confronted by the mother of a teenager killed by the drug dealers (and whom he interrogated earlier), Nascimento is struck with guilt and gathers his men to search for the boy’s body. During the search, Nascimento is informed of the situation at Babilônia and is ordered to intervene.
After rescuing the officers, he meets Matias and Neto and orders them to bring the local lord’s body down to the base of the slum, during which Matias is photographed by the press. Soon after, Neto, Matias and Fabio apply for BOPE’s training program. Whilst Matias is motivated by his devotion to the police, Neto is avid for more action and Fabio is just trying to avoid Oliveira. At the NGO office, Baiano confronts Maria and her friends with a newspaper featuring Matias’s picture and threatens them to keep policemen out of his territory.
Meanwhile, BOPE’s training program proves to be a tough challenge as many candidates quit the program, including Fabio, but Neto and Matias reach the final stage, where they are brought into Nascimento’s final operation. The two successfully pass the course and Neto gets a BOPE tattoo. In college, Matias is rejected by Maria and her friends over the newspaper photograph, confronts Edu and orders him to arrange a meeting with Romerito (a boy he befriended at the NGO), to whom he had promised a new pair of glasses. However, upon returning home, Neto informs him of a job interview in a prestigious law firm that will conflict with his meeting with Romerito and volunteers to deliver the glasses to Romerito in his place. After Edu reveals Matias’s plan to Baiano, an ambush is set up to kill him, which results in Neto being mortally wounded upon arrival; however, when Baiano prepares to execute him, he notices the BOPE tattoo on his arm and realizes he has killed a BOPE officer. Fearing for his life, Baiano goes into hiding.
After Neto’s funeral, Matias, Nascimento and his men make daily incursions into Baiano’s slum, torturing several dealers into revealing his whereabouts. After one of them reveals Edu tipped Baiano, Matias storms in a peace walk, violently beats Edu and insults Maria and the others. When the BOPE team finally locate and corner Baiano, Nascimento holds him at gunpoint, but the drug lord pleads to not to be shot in the face. Angrily amused at Baiano’s pleading, Nascimento grabs a .120 shotgun, hands it to Matias and orders him to finish Baiano off as both a vendetta for Neto’s death and as a final rite of passage for himself. As Baiano continues to plead, Matias triggers the gun and the screen cuts to black as a shot is heard.