This is an old film, but we just saw it last night. Pépé le Moko (1937) features Jean Gabin as a Parisian gangster holed up in Algiers, where he is protected by his legendary status in the Casbah. The police do not dare to go into the Casbah to get him, but he cannot leave. The film begins with a postcard-like presentation of the Casbah, voiced over by a police detective's description, as a place of diversity, intrigue and tradition.
It isn't a great film, certainly: there are some fine actors and wonderful photography, weighed down by truly awful dialogue and bountiful evidence that the scriptwriter did no research at all into the world of police and thieves. But the Casbah/city motif intrigues me, because it sheds light on the status of the gangster as folk hero. What Pépé depends on for protection is a cocoon of tradition and culture, a favor that he returns by appreciating the objects he steals. The city of Algiers offers the pleasures and opportunities of ascendant capitalism, and with it the possibility of returning to France, but he knows that if he goes there he is certain to be arrested or killed. There is not much need to give away the (in any case fairly thin) story to offer this as the center of the film.
So what is it that makes the gangster a folk hero? In this case, it is the embodiment of precapitalist values: charisma, sociability, embeddedness (of course the gangster as a defiant individualist is not the perfect precapitalist, but even then he evades the rational requirements of modern society). He can exist as a part of a traditional community on the margins, but the modern world of the city below is an atmosphere that cannot support him.
What I don't get is why the people of the Casbah seem so ready to accept the Parisian Pépé, who is clearly not of their universe. Something does not fit, like all those actors using stage techniques on cinema sets.