The story is well-known, as such things go: how, adapting the serious-as-cancer thriller Red Alert into a screenplay (the book's author, Peter George, and satirist Terry Southern also worked on the script), Stanley Kubrick got to thinking that the fact that all of humanity, in the 1960s, was being held back from nuclear annihilation only by the good judgment of people venal enough to go into politics and the upper-level military was so demented and absurd that you could only possibly laugh at it. Because the opposite to laughing was to take it seriously, and then you might as well give up living altogether, since there was plainly no hope that Those In Power might actually be worthy of the unbelievable authority they had been handed; they were just humans after all, and humans, Kubrick's filmography was quickly making clear, were not people that the filmmaker held in very high esteem. He had already made more than one film on the theme that complex systems are only primarily good at breaking down when the human element gets involved; Dr. Strangelove would be his most damning work yet in that direction, with the breakdown involving the end of all life on Earth.

This line of reasoning led to the blackest black comedy ever made by a major Hollywood studio, and one of the funniest handful of films made in English: Dr. Strangelove, or: How I Learned to Stop Worrying and Love the Bomb, a film whose beastly ironies only begin with its most snarling and giddily sarcastic of titles.

In the most literal sense, the film is about the hair-trigger tensions of the Cold War, and thus belongs in the same dustbin with dozens and dozens or even hundreds of other films from a 40-year period of history - some of them truly great works of cinematic construction, some of them forgettable programmers, all of them yoked intractably to geopolitical circumstance so very specific in so many ways that they can only ever function as time capsules, windows into another way of life. This is not, however, how the film plays out in practice. I can only imagine what it felt like when it was brand new in 1964, but 50 years later the film's satire has lost not an ounce of its currency, for what Dr. Strangelove is attacking isn't the Cold War mindset that led to the insanity of Mutually Assured Destruction as a relatively broadly-accepted concept, but the whole notion of military and politics and the kind of deranged people that would want to be part of that system anyway. More specifically, it's about the one thing that will never go away as long as weaponry and power are with us: the male sex drive. It's not exactly hidden that Dr. Strangelove is, basically, 94 straight minutes of viciously mocking the link between political influence, military power, and sex; just a glancing tour of the character names makes that clear, from the outright smuttiness of Buck Turgidson to the slightly obscure slang of Merkin Muffley to the high-minded allusion of Alexi de Sadesky, a huge percentage of the named cast has been given monikers that in some way refer aberrant sexual behavior, or simply to the desire to have as much sex as possible.

Hell, even that's deeper than we need to go. This is a film bookended by erect cocks - in the opening, footage of a mid-air refueling of a long-range bomber scored with lilting, romantic music as a rigid tube juts out of one plane and plunges into waiting hole of another, both vessels rocking up and down from the perspective of a distant camera. And then, when the deed is done, the refueling nozzle pulls out and visibly droops down. It's amazing what you can do with stock footage and the right piece of music. At the end, of course - it is among the most famous images in a film of famous images - a man hoots and hollers as he plunges to earth with an H-bomb between his legs, the biggest piece of manhood ever devised, landing with an orgasm that destroys humanity. Sometimes, it's irresponsible not to see the phallus imagery when it's about to slap you in the face, especially in a film where the very plot springs from feverish sexual psychology. The whole plot, never forget, comes about because one rogue general, Jack D. Ripper (Sterling Hayden), finds a way to exploit every loophole in the military rulebook to trigger nuclear war between the United States and the Soviet Union, because of his theory that fluoridation is a Communist plot which explains his post-coital refractory period.

For there to exist a movie that suggests without blanching that all war is just an expression of frustrated men jerking off on a global scale is impressive; for it to have been made in 1964, and to have been cranked out of the Hollywood studio system (though it was shot in England; the first of Kubrick's films to be entirely made out of America, if I am not mistaken) with so much A-list polish, is an outright miracle. And not just because it is so openly, enthusiastically smutty, either: this is a hellaciously bleak comedy, the film that pays off the experiments made two years earlier in Lolita, finding a way to make the most irresponsible, awful behavior seem utterly hilarious, and not even by amping up the outright comedy. It's shocking, in fact, to realise just how much of Dr. Strangelove doesn't appear to be playing as funny at all: the scenes on the bomber, led by Slim Pickens in a role that he wasn't even informed was taking place in a comedy, are amusing almost solely because they are too straitlaced to take seriously, with the urgent, increasingly ridiculous humming and pulsing of "When Johnny Comes Marching Home" on the soundtrack and virtually every single action performed, down to the most indistinguishable flipping of switches, punctuated by a frenzied zoom on the camera. Of Peter Sellers's three roles, only one is really openly funny at all: his stuffy RAF Captain Lionel Mandrake (the most obscure sexual reference of any name - mandrake root was once thought to be a fertility aid) is comic for being so blandly British and upper class, and his president Muffley is the film's designated straight man, reacting with seriousness and sternness to the madness around him. Which is almost certainly why he's the source of some of the film's funniest moments: the classic one-liner "Gentlemen, you can't fight in here, this is the War Room!", and his patient, fatherly telephone conversations with the unheard, unseen, drunk Russian premier. Indeed, the latter of these are the unsung triumph of Dr. Strangelove, the most willfully bizarre and surreal touches in the movie.

That said, the third of Sellers's characters, the titular German scientist (a scathing parody of the Soviet and American attempts to cherry-pick Nazis to help win the space and arms races so pulverising as to be definitive), is an iconic figure and cinema, and rightly so. Maybe the best, and certainly the weirdest of the many live-action cartoon figures in the comedian's career, Dr. Strangelove is a fantastic mix of notions too outrageous to be anything but hilarious, and too indisputably menacing to be anything but terrifying - not for nothing did Kubrick cut away to a shot of the doctor as nothing but a shadowy figure in the gloom right after the words "angel of death" are spoken. It's a freakish balancing act that Sellers carries off flawlessly, and that's even without bringing into it the never-matched physical comic performance of his final scene, when his Nazi subconscious, controlling his ruined right arm, starts to seriously compete for control.

There are other great performances: George C. Scott's work as Turgidson is often unfairly overlooked, simply not showy enough to pull focus from Sellers. But he's very nearly at the same level, and the performance is one of the best examples of Kubrick's manipulation of actors that was ever filmed: Scott didn't want to play the part too big, but the director knew that a certain ebullient messiness was necessary to depict the brash, hyper-masculine warrior psychology that the film planned to skewer, and so filmed what he told the actor would just be warm-up exercises. And even more overlooked, I've always had a soft spot for Peter Bull as the easily horrified, embarrassed, and angered Ambassador de Sadesky (Hayden's gung-ho psycho, I assume, needs no defense from me).

What makes Dr. Strangelove so damn brilliant, though, isn't just the quality of its acting, nor of the acting in concert with the savage script, but that it is, first and above all, a real movie. Too often, dating all the way back to the dawn of the sound era (I find it much less of an issue among silents), the idea seems to be that film comedy just has to be funny, and if the cinematic construct built around that funniness is a bit shabby, it doesn't matter. People still laugh. And this is true even of some of the great comedy masterpieces of all time: the great Marx brothers films at Paramount, all choppy editing and bland lighting, leap to mind. But the secret to Dr. Strangelove is that it acts in every way like a super-serious thriller, with grim chiaroscuro lighting (the credited cinematographer was Gilbert Taylor), and stunning sets designed by Ken Adam, who had by then already begun his career-defining work on the James Bond series. And I'm not just thinking of the legendary War Room set, a vision of terribly stark light against a black background with giant electronic boards dwarfing the humans inside; the heavily detailed and function-driven interior of the bomber is just as impressive, and if the War Room creates a sense of weighty grandeur, the bomber creates an even more important sense of physically tangible authenticity.

It's that utterly straightforward focus and sincerity that allows Dr. Strangelove to be so unendingly funny: nobody onscreen has any idea that the situation containing them is ridiculous and impossibly absurd (and, in '64 more than today, unpleasantly plausible), and since they're not able to laugh at themselves, we have to do it in their place. Too little comedy understands that, but it is vital to humor; even more vital to great satire, of which Dr. Strangelove is an exemplar; almost certainly the best filmed satire in English, maybe in all of cinema. And that is because it is direct, violent and cruel: "look at these utter disasters of humanity we have in power on both sides", the film flatly declares, "look at them and laugh, because that's the only way to strip them of their power". A half-century later, the boobs are still in control, as they probably always will be; that doesn't make it any less important to mock them for it and let them know that we know, and it is the focused intensity with which it disrespects the gravity and dignity of self-appointed authority that makes Dr. Strangelove totally indispensable and timeless.