Malik El Djebena, a 19-year-old French youth of Algerian descent, is sentenced to six years in prison for attacking police officers. Alone and illiterate upon his arrival, he falls under the sway of Corsican mobsters, led by César Luciani, who enforces a brutal rule.
The prison is divided between two main factions: the Corsicans and the Muslims. Malik keeps to himself. When Luciani forces him to be the unwilling assassin of Reyeb, a Muslim witness in a trial, Malik gains the protection of the Corsicans despite his Arab origin.
Malik serves as a low-level servant to the Corsicans, who treat him with disdain. All the while, he is haunted by visions of the murdered Reyeb.
When most of the Corsicans are transferred or released, Luciani is forced to give Malik more responsibility. Having secretly learned Corsican, Malik acts as Luciani’s eyes and ears in the prison. When Malik earns the privilege of day-long furloughs outside the prison, Luciani relies on him to conduct Luciani’s criminal business outside.
Ryad, a Muslim friend, teaches Malik to read and write, and the two become close. Ryad teaches Malik about his own heritage, introducing him to two other Muslims, Tarik and Hassan, and increasing his power within the prison.
Malik also becomes involved with a prison drug dealer, Jordi. When Ryad gains an early release due to testicular cancer, the three partners organize a drug-running enterprise to sell hashish. But when Ryad is kidnapped by the drug dealer Latif, Malik tracks down Latif’s relative inside the prison. He kidnaps the relative’s family and forces Latif’s gang to release Ryad.
When Luciani discovers that Malik is using his day-releases for his own personal enterprise, he punishes him. Malik is sent to meet Brahim Lattrache in Marseille, another Muslim, who is involved in a deal between Luciani and the Lingherris, an Italian mafia group. Lattrache is bitter toward the Corsicans for the murder of Reyeb and holds Malik at gunpoint. When Malik spots a deer warning sign, he remembers a recent dream of deer running in the road. He tells his kidnappers that they are in danger of hitting wild animals, and they suddenly strike a deer. Lattrache is impressed by Malik, calling him a prophet and agreeing to conduct criminal business with him instead of Luciani, even though Malik admitted that he killed Reyeb.
Luciani believes there is a “mole” in his organization and decides to use Malik to assassinate Jacky Marcaggi, the don of the Corsican mafia, for secretly dealing with the Lingherris. But Malik and Ryad have their own plan for Marcaggi: they kill his bodyguards, kidnap him, and inform him that it was Luciani who ordered the hit before abandoning him in the city.
Malik takes refuge at Ryad’s house with his wife and young son. Ryad’s cancer has returned; his decision to forego more chemotherapy leaves him just six months to live. He gets Malik to promise to take care of his family when he’s gone.
Upon Malik’s return to the prison, he is placed in solitary for returning late – putting him out of reach of Luciani’s retribution – while Marcaggi uses his influence to wipe out much of Luciani’s faction. Once back in general population, Malik joins the Muslim faction in the yard. When a now powerless Luciani tries to approach him, two Muslims intercept and beat him.
On the day of his release, Malik is met by Ryad’s wife and son outside the prison. They walk off together, followed by a vehicle convoy carrying Malik’s new associates.