The film starts in medias res, 13 years after Baiano's death in the first film. Former BOPE Captain (now Colonel) Roberto Nascimento (Wagner Moura) exits a hospital and enters his car when the vehicle is suddenly blocked and gunned down by unknown gunmen.
Four years prior, Nascimento, now promoted to lieutenant colonel in BOPE and divorced from Rosane (Maria Ribeiro), arrives at Bangu Penitentiary Complex to put down a prison riot started by gang boss Beirada (Seu Jorge), who demands that human rights activist Diogo Fraga (Irandhir Santos) come in to negotiate. After Fraga convinces Beirada to release the hostages taken during the riot, Nascimento's protégé Captain André Matias (André Ramiro), having hold Beirada at gunpoint, executes him against Nascimento's orders, causing the operation to go awry. Fraga, currently husband of Nascimento's ex-wife, subsequently expresses his outrage over the situation to the media.
When Nascimento hears that PMERJ commander Formoso (Rodrigo Candelot) plans to dismiss him over the controversy, he goes to a restaurant to personally confront him, only to be greeted by cheering diners who approved of drug dealers' execution. Guaracy (Adriano Garib), Rio de Janeiro's State Secretary for Public Safety, exploits the situation by promoting Nascimento to State Subsecretary of Intelligence and expelling Matias from BOPE, demoting him to the state police. Nascimento tries to convince Matias he can settle the situation, but Matias rebukes him and goes to tabloid journalist Clara Vidal (Tainá Müller) to give her an interview about disregard of BOPE and the government's corruption practices, leading to his detention. Meanwhile, Fraga leverages his influence to become a state representative in Rio's State Assembly and convinces Nascimento's son Rafael that his father is a bad influence on him.
Nevertheless, Nascimento continues to focus on his work. He has BOPE and its arsenal expanded, increasing the staff number from 100 officers to 390 officers and funding them with armored vehicles and helicopters, enabling him to eliminate drug cartels from multiple favelas. Although he theorizes that this would also bankrupt corrupt cops in the process, a group of corrupt cops led by Major Rocha (Sandro Rocha) realize that they can extort money from the entire favelas instead of just dealers. Rocha's group forms a militia, using BOPE to clean out the dealers. They finance cable TV, water supplies, banks, internet services and deliveries, forming a racket of money extortion from the favelas to amass money, acquiring political and public support as they are cleaning the favelas from drug dealers.
Four years later, a group of disguised militia break into a police station in Tanque, one of the few remaining strongholds of Rio's drug trade after Nascimento's interventions, and steal a number of police rifles as part of a plan devised by corrupt policemen and associate politicians to create an excuse to raid the slum and get rid of local drug dealers. After listening to 300 hours' worth of tapped phone calls, Nascimento assures Secretary Guaracy there is no evidence that the dealers have taken the weapons. Corrupt Lieutenant-Colonel Fabio Barbosa (Milhem Cortaz), however, states that an informant of his indicate the dealers as culprits, and the raid is authorized by the Governor.
Matias, brought back into BOPE by Rocha's influence, orders to replace corrupt officers in a police station in an escape route to catch the fleeing dealers by surprise. After shooting them dead and torture drug lord Pepa (who tried to escape, but was cornered by the group), Matias watches as Rocha and his men arrive and kill Pepa; demanding explanations about the info on the guns and their fellows' misconduct, Matias is shot in the back by Rocha and his men after confronting them.
Devastated by Matias' death and vowing revenge, Nascimento, aware Fraga has been investigating the militia activity, taps his phone. Meanwhile, Clara goes into one of Rocha's favelas with a photographer to collect information about corrupt officers for a scoop, only to find promotional material for the Governor's re-election hidden in a deposit. As she calls Fraga and reveals what she has discovered, they are caught by Rocha and his group, and Fraga overhears Rocha's voice right before he rapes and murders Clara and the photographer. Nascimento listens to the recording of the talk and deduces Fraga is the next target. Since Fraga is with Rosane and Rafael, he records the data, takes it with him and goes after his family. Just after he leaves, Formoso finds out about his tapping of Fraga's phone and warns the corrupt officers about this. Nascimento heads for Fraga's apartment while trying to phone Rosane, but she deliberately ignores the calls. As Fraga, Rafael and Rosane arrive, two men in a motorcycle try to murder Fraga in a drive-by shooting, but end up hitting Rafael in the chest instead. After Nascimento shoots back, but misses.
After Rafael is taken to the hospital, Nascimento sets up a police roadblock near the Secretary's house and brutally beats him up in a fit of rage. The following day, the President of the Legislative Assembly decides to open an investigation over Clara's possible murderer (due to the lack of bodies, the police is treating the case as kidnapping), and Nascimento is forced to step down as Subsecretary for Public Safety for illegally tapping Fraga's phone in an effort to have Nascimento humiliated. The assumption is that the illegal tap had been made with the intention of spying on his ex-wife.
However, the Secretary and his allies decide not to kill Nascimento, as his death during the trial would make him a matyr for human rights and implicate them, causing a national scandal; Rocha, knowing that, if Nascimento testifies, blame will fall on his militia and, by extension, himself, decides to proceed with the assassination despite his superiors' orders not to.
That night, Nascimento arrives at the hospital, where Rafael is slowly recovering after his surgery. He tells Rosane to call him anytime she needs him, and then leaves the hospital, as shown in the opening sequence. As he leaves, a man with a radio informs Rocha about his departure, while another car follows Nascimento. Rocha arrives with his convoy and starts shooting at Nascimento, but the other car's occupants exit and start shooting at Rocha's men, revealing themselves to be BOPE officers shadowing Nascimento, who had predicted the attempt on his life. Despite losing the gunfight, Rocha escapes.
The next day, Nascimento is called to the State Assembly and testifies with Fraga for over three hours at the court, implicating many politicians and policemen. In the aftermath, Gregorio Fortunado (André Mattos), a state representative and local TV presenter who sides with the militia, is sentenced to prison; many corrupt officers and their allies are murdered as their leaders try to silence them, and Fabio himself lures Rocha to his boat and then murders him and his posse. The governor, however, manages to be reelected, and Guaracy is elected state representative for Rio de Janeiro in the Chamber of Deputies, as is Fraga; the two start a rivalry. Nascimento ends his narration with a reflection over the influence of politicians on the social issues of Brazil, while aerial images of Brasília are shown. In the final scene, he visits his son in the hospital just as he first wakes up from his coma.Wagner Moura as Roberto Nascimento, Lieutenant Colonel of the PMERJ and State Subsecretary for Public Safety.
Irandhir Santos as Diogo Fraga, a History teacher who becomes a State Representative after the Bangu I controversy. Rosane's new husband, he is a left-wing politician who runs for state representative in the Federal Chamber of Deputies. Fraga's role was inspired by real life politician Marcelo Freixo.
André Ramiro as Captain André Matias, a BOPE officer.
Maria Ribeiro as Rosane, ex-wife of Nascimento current wife of Fraga.
Pedro Van-Hel as Rafael, the teenage son of Nascimento and Rosane
Sandro Rocha (article on Portuguese Wikipedia) as Captain/Major Rocha, one of the main antagonists of the film. Rocha had a small role in the first film, being one of the sargeants under Fabio's control.
Milhem Cortaz portrays Lieutenant Colonel/Colonel Fabio Barbosa.
Tainá Müller plays Clara, a journalist. In the film, Matias reads her interview on the scrapping of the BOPE, after being expelled from the same battalion because of the events in the rebellion in Bangu I and then assists the Deputy Diogo Fraga in investigating of the militias.
Seu Jorge as Beirada, a convict responsible for the Bangu I uprising.
André Mattos as Fortunato, state representative and host of a tabloid TV show.
The first member to be acknowledged was Wagner Moura, who returns with his character Roberto Nascimento, now promoted from captain to lieutenant colonel. In Elite Squad: The Enemy Within, Nascimento is 40 years old and has a slightly grayer hair. André Ramiro is also back as Captain André Matias (promoted from Officer Cadet); the actor was prepped by professionals from the CATI-SWAT to give orders to the cops on-screen. Musician and actor Seu Jorge (who played Mané Galinha in City of God) was invited by director José Padilha to act as one of the antagonists, Beirada; Maria Ribeiro is also back as Roseane, who is no longer married to Nascimento, but to a left wing Congressman. Tainá Müller, who was not in the first film, plays Clara, representing the media. Sandro Rocha, who had little on-screen time during the first film, has a bigger role now, playing Major Rocha, known as Russo (Russian), boss of the militia.
Between November and December 2009, before recording for the film started, every actor - except Maria Ribeiro, pregnant at the time - had a training routine, led by Fátima Toledo. Part of the cast also went through a boot camp in Rio, coordinated by Paulo Storani, security adviser, and with the participation of members from BOPE and CATI. André Ramiro said, "They treated us like real cops. No 'I'm-too-important'. I also had to say 'No, sir. Yes, sir'". Wagner Moura had Jiu-Jitsu lessons from fighter Rickson Gracie. The training helped bring a degree of reality to the film; actors had to learn the proper techniques to handle weapons and also action strategies in risk-zones, besides a strong fitness program, laid heavy on those who weren't in the first movie.
Filming started on January 25 of 2010, with the participation of eighty real cops as extras. On February 1, recording took place at Morro Dona Marta, in the Botafogo borough, with the use of two helicopters and heavy guns, leading to next-door neighbors thinking it was a real shoot-out. For the scenes happening at the Bangu 1 prison, forty professionals worked during two months constructing a 500m² detention center, based on notations from art director Tiago Marques about the place, since they didn't get clearance to take pictures of the real building. The scenes at the prison were recorded during the four days of the 2010 carnival. One of the film scenes would be shot at the House of Congress in Brasília, but production couldn't get permission. A fake Ethics Committee was built inside the Federation of Industries of Rio de Janeiro, recording took place at April 15. Filming was done in the same month and the film went to post-production.
After the first film leaked and got in the hands of millions of people before the official release date, the Elite Squad 2 crew created a strategy to avoid the same thing happening to the sequel. Before production began, Marcos Prado informed that, "This time we will have a special security scheme. We will have a security team watching over the editing, transporting the reels, and paying close attention to every little detail. The raw material will be preserved". Director José Padilha concluded, "We won't outsource any of the steps. We are doing the whole post-production at our company, inside our 'caveirão'". The script was sent to the National Agency of Cinema under the title "Organized crime" and was printed with red ink, to avoid photocopying. The production unit rented an apartment, monitored by cameras, where editing took place. Four people had access to the place, only through passwords, and no means of accessing the Internet. Another strategy used was the marking of each copy sent to the theaters; that way if any of the copies was illegally recorded, they would know where it came from. Military policemen from São Paulo also helped in avoiding the leak. The final picture, still with no sound, was put in a safe.
Elite Squad: The Enemy Within was critically acclaimed. Based on 42 reviews, the film received a 93% approval rating on Rotten Tomatoes. At Metacritic, which assigns a weighted average score out of 100 to reviews from mainstream critics, the film received an average score of 71 based on 18 reviews, indicating "generally favorable reviews".
Elite Squad: The Enemy Within broke national opening weekend records in Brazil, with more than 1.25 million spectators during its first weekend. This opening was the 5th biggest in Brazilian history and the biggest one for a Brazilian film, so far. A total of 696 theaters are screening the film about 8 times each day. In three weeks, the film surpassed the mark of R$ 60 million in gross revenue and over six million viewers becoming the most successful Brazilian film of the 21st century so far on local theaters. In just nine weeks, the film surpassed 10 million viewers on theaters throughout the country becoming the highest box office of a local film in Brazilian history.
Elite Squad: The Enemy Within was released in the UK by Revolver Entertainment on August 12, 2011.
The film held its United States premiere in January 2011 at the Sundance Film Festival. Since, it has screened at several festivals, including Austin's Fantastic Fest. The film was released in New York City on November 11, 2011, and in Los Angeles on November 18, 2011.