Set thirteen years after the first film, former BOPE Captain (now Colonel) Roberto Nascimento is leaving a hospital when he is ambushed.
Four years before, Nascimento arrives at Bangu Penitentiary Complex to quell a riot started by gangleader Beirada, using weapons smuggled in by a corrupt cop. After murdering some imprisoned rival gang members, and seeking to kill others, Beireda says he will negotiate through Diogo Fraga, a human rights activist. Nascimento is happy to let the criminals kill each other but Fraga insists in entering. Although Fraga convinces Beirada to release the hostages, Captain André Matias, Nascimento’s protégé, shoots Beireda against Nascimento’s orders to ensure Fraga’s safety and suppresses the revolt with multiple deaths, whereupon Fraga protests to the media.
Nascimento learns that PMERJ commander, Formoso, plans to dismiss him due to the bad publicity and confronts him, only to be cheered by other diners for his tough line. The public mood is recognised by Guaracy, Rio de Janeiro’s State Secretary for Public Safety, who promotes Nascimento but transfers Matias to the ordinary police as a scapegoat. Nascimento promises Matias his help, but Matias informs journalist Clara Vidal of governmental corruption and lack of support for BOPE, leading to a jail term. Fraga is elected to Rio’s State Assembly. Nascimento’s ex-wife, Rosane, who Fraga married, and Nascimento’s son, Rafael, also criticise Nascimento’s approach.
Nascimento expands BOPE’s arsenal, personnel, armored vehicles and helicopters, enabling them to eliminate drug cartels from favelas, hoping this will reduce police corruption. However, corrupt cops led by Major Rocha form a militia, which eliminates trafficking while extorting money from businesses and building a political machine.
Four years later, disguised militiamen steal rifles from a police station in Tanque, one of the last drug strongholds, giving their corrupt allies a pretext to demand the authorities expel the heavily armed dealers, allowing the militia to take over. Nascimento, suspicious, listens to phonetaps of dealers and assures Guaracy they are uninvolved; however, corrupt Lieutenant-Colonel Fabio Barbosa claims an informant has implicated them and the raid is authorized. Matias, returned to BOPE by Rocha, occupies the corrupted police station and ambushes the fleeing dealers,torturing captured drugleader Pepa to learn where the stolen arms are. Rocha and his men, curious about proceedings, arrive and shoot Pepa, eliminating him as a witness. Matias, now suspicious, demands the name of Fabio’s informant, but Rocha shoots him.
Devastated by Matias’ death, Nascimento, aware Fraga has been investigating the militia, taps his phone. Vidal, also investigating, enters one of Rocha’s favelas and finds the Governor’s re-election material. She tells Fraga by phone but is caught by Rocha’s group, who kill her and her photographer. Nascimento listening in, realizes Fraga is now a target and goes after him, taking the recording, but Formoso discovers the phone tapping and warns the militia. As Nascimento waits outside Fraga’s building, Fraga, arriving with Rafael and Rosane, is attacked in a drive-by shooting. Nascimento shoots the assailant, but Rafael is wounded. As he is taken to hospital, Nascimento detains and assaults Guaracy, warning he will kill everyone involved if his son dies.
With Nascimento’s evidence delivered by Fraga, the Assembly opens an investigation into the journalists’ disappearances. However, Nascimento is accused of tapping Fraga’s phone to spy on Rosane, forcing his resignation. Despite his impending testimony, Guaracy and his allies decide not to kill Nascimento, as this would martyr him and implicate them; however, Rocha, believing his militia will be scapegoats, disagrees. After Nascimento leaves a visit to Rafael, they ambush him. However, Nascimento, expecting an attack, is escorted by BOPE officers. They shoot some of the assailants, but Rocha escapes.
Nascimento, testifying, implicates the Governor, Guaracy and many others. Gregorio Fortunato, a legislator and TV presenter who supported the militia, is imprisoned, and many corrupt officers and associates are murdered to prevent them testifying. The Governor, however, is re-elected, and Guaracy becomes representative for Rio. Nascimento ends by reflecting that “as long as the conditions for the system to live remain, the system will remain”. He visits Rafael, waking from his coma.