There are a thousand ways to get a movie villain right. Some work through sheer cruelty, and that’s often a lot of fun: a purely evil villain who does evil because he enjoys it has enormous potential as spectacle. Not everything needs to be deep or explained. There are even slightly ridiculous villains, funnier than menacing, that we remember fondly. This piece is the first in a series, and it looks at one kind in particular: the villains who stay in our heads long after the credits roll.

What sets them apart? Not the body count, the powers, or the special-effects budget of the final destruction scene. A great villain of this kind has a coherent worldview, and he stands by it to the end.

Take Anton Chigurh in No Country for Old Men. He kills without anger and without any visible pleasure, according to a principle, almost a doctrine, embodied in the coin flip he forces on some of his victims. What’s terrifying is his absolute consistency: he never deviates from his code, even when it doesn’t suit him. An erratic villain scares you for five minutes. A villain who follows rules you gradually come to understand, and who never breaks them, is truly frightening.

Take Hans Landa in Inglourious Basterds. He barely believes in the ideology he serves, and Tarantino doesn’t shy away from showing him ready to switch sides the moment the wind changes. His logic is colder and simpler: he serves only his own interests, and he owns it. Add his intelligence, his charm, the almost childlike delight he takes in toying with his prey before springing the trap. We laugh along with him, and that’s the whole problem.

Take Heath Ledger’s Joker in The Dark Knight. His worldview comes down to one idea: a little anarchy is enough to topple the established order. That’s how he describes himself: “I’m an agent of chaos.” It’s a structured philosophy, argued with relentless logic in every scene. His madness never loses the thread, and once you accept his logic, it becomes very hard to refute.

None of the three sees himself on the wrong side, or even cares about it. Each one is, in his own head, the hero of a perfectly rational story. That’s what makes them unsettling.

Many great antagonists share another trait: their conflict with the hero is about a shared stake. In No Country for Old Men, Llewelyn Moss and Chigurh fight over the same briefcase, and the whole first half of the film revolves around that object. In The Dark Knight, Batman and the Joker are fighting for the same stake, the soul of Gotham. Batman bets that the city can stay standing, the Joker bets that it will crack, and he puts its people to the test, right down to the two ferries, to prove it. When hero and villain fight over the same thing, the conflict comes from two incompatible answers to the same question, and each forces the other to define himself. Plenty of villains pursue a goal unrelated to the hero’s (world domination, for instance), and their paths only cross at the climax. That works as entertainment, but the confrontation loses depth.

Next time a film introduces an antagonist, forget his destructive power. Ask yourself whether he could, without a trace of irony, explain to you why he’s right, and whether he’s fighting for the same stake as the hero. If so, you may be looking at a great villain. If not, you may be looking at a very entertaining one, which is a different kind of strength, and we’ll come back to it.