First things first: if you haven't watched Fritz Lang's M, beware! This post will be stuffed to the gills with M spoilers.
M is a difficult film to classify, genre-wise. It contains elements, among others, of police procedural, gangster movie, courtroom drama, kitchen-sink drama, crime thriller and horror. However, as this is a horror blog, it's on the horror that I shall focus.
A brief outline of the plot (for those unacquainted with the film and unperturbed by spoilers) goes thus: there is a murderer of children at large, and a sense of underlying panic in the general public. The police are desperate to get leads, and instigate a crackdown on known criminal hangouts, resulting in losses of custom for the proprietors. The underworld bosses decide they have to catch the killer before the police ruin their businesses, and begin an investigation of their own running parallel to that of the law. Both yield clues, but it is the criminals who locate the murderer first. They take the culprit, Hans Beckert, to a disused distillery and try him in an ad hoc courtroom. Beckert is confronted with his crimes, but he and the man appointed to act as his defence lawyer argue that he is not responsible for his actions as he is irresistibly compelled to murder. The vast majority of those present call for Beckert to be executed, feeling that he will be forever a threat to children if he was handed to the police and incarcerated, but subsequently released. At this point the police arrive at the distillery, having been tipped off by a criminal they earlier apprehended. Beckert is arrested and goes to trial.
The influence that M has had on horror films can be widely seen. For example, Beckert plays a cat-and-mouse game with the police by sending a taunting postcard to them via a newspaper - similar behaviour (though to a lesser extent) to that of Hannibal Lecter in The Silence of the Lambs and John Doe in Seven. The themes in M of vigilante justice and a general distrust of official law enforcement are also recurrent in the genre. Police tend to be well-meaning but sceptical (e.g. The Blob); absent or unreachable (The Blair Witch Project, The Texas Chain Saw Massacre), or inept (Psycho, Scream) - it is a rare horror-movie cop who is able to save the day, or even live to tell the tale. The safety net of police protection is whipped away from the protagonists one way or another, and they are obliged to face the threat on lawless terms.
Just as the final girls of slasher flicks are able to confront and defeat the psychopaths that terrorise them only after officialdom had been denied them or rejected, so the criminals in M can succeed in confronting Beckert with his crimes while the police cannot. In the clip below, an underworld boss shows the accused photographs of his victims:
The killer breaks down only when faced directly with the images of his those he has killed. He sees not only his victims, but himself as he truly is. This moment of self-realisation is presaged by an earlier scene in which Beckert is seen staring intently at himself in the mirror, pulling at the corner of his mouth and seeming as if he does not fully recognise the person staring back.
The wide-eyed, manic expression on Beckert's face when reality finally dawns on him resembles that of a movie victim only just realising the full horror of their fate. For him, the terror is compounded by having to face extreme malignancy within himself. Beckert's dark side had been stalking him quietly - now it leaps out from the shadows. Like the terrified victims in countless horror films to come, he flees - screaming.