One fundamental difference one might point out between gangsters and terrorists is that terrorists are motivated by religion or ideology while gangsters, if they have an ideology or religion, may use their beliefs to justify or redeem their actions but essentially their work is unrelated to their spiritual life. 2009's Un prophete (A Prophet) is primarily a story about gangsters with a central character who happens to be a Muslim Arab. His two identities end up relating in ways neither a terrorist or a gangster would likely have been able to predict. With more than a few nods to Goodfellas, this film isn't as complex or realistic but it's not bad.
Malik (Tahar Rahim) has been in juvenile detention facilities most of his life for unspecified reasons when we meet him at the beginning of the film. We're introduced to him as he's introduced to prison, now being of age to graduate to proper incarceration.
He doesn't seem to fit in with the Muslims in the prison. One of their leaders, a man named Reyeb (Hichem Yacoubi), offers to get Malik hashish in exchange for oral sex, a deal the homophobic Malik refuses angrily. It occurs to the Corsican gangsters, led by Luciani (Niels Arestrup), that Malik would be a valuable ally. They use beatings and connexions in the prison staff to convince Malik to kill Reyeb.
Malik becomes member of the Corsican crew, even operating for Luciani outside of prison when permitted to go on furlongs. There's no indication that Malik feels any particular connexion to the religion he was evidently raised in but he watches the Muslims praying with curiosity and forms a friendship with Ryad (Adel Bencherif), an Arab prisoner dying of testicular cancer.
But Malik has visions. He's visited by Reyeb, the first man he killed, frequently in his cell so that his conversations with him become quite casual. Reyeb quotes prayers and makes observations about Allah, at one point spinning in place with his head back, calling to God repeatedly.
Mostly the film is a straight forward gangster tale told with competence. Tahar Rahim has the sort of posing coolness of Clive Owen in Croupier or Ray Liotta in Goodfellas. Malik's visions are the only really thing outside the box about the picture and what precisely they're meant to mean isn't clear. Perhaps it's simply to say that the truly chosen of God can't spotted by their upbringing, affiliations, or religious observance.
There is an innocence about Malik. He marvels unabashedly at beach sand and air travel. It's no surprise considering how long he's been locked up. So maybe he is chosen by God. It's interesting, then, that his loyalty to his friends has the flexibility typical for any gangster.