In talking about Louis Napoleon’s seizure of power in France in 1851, following the precedent of his uncle in 1799, Karl Marx famously wrote that history repeats itself, the first time as tragedy and the second as farce. Armando Iannucci puts that dictum into practice in “The Death of Stalin,” recasting the very serious events that played out after the Soviet dictator’s 1953 demise in comic terms. He can’t obliterate the essential nastiness of the episode he’s sending up, however, and for that reason the film is more of a tragicomedy, with scenes that are likelier to cause you to cringe than laugh, and if the mixture of brutality and wackiness doesn’t always gel, Iannucci earns points for audacity alone. Any movie that’s been banned in Putin’s Russia is worth seeing, if only because it highlights the corrosive effect of authoritarian government.

The film begins with its most straightforwardly funny sequence, one based on actual rumor (if not fact)—Stalin (Adrian McLoughlin) requesting a copy of a broadcast of a Mozart concerto played by Maria Yudina (Olga Kurylenko) that unfortunately wasn’t recorded. The panicked radio director (Paddy Considine), fearing for his life, orders the concert repeated with a new conductor (to replace the one who’s collapsed) and an augmented audience. But Maria insists on including a note with the resultant record, indicating her hatred of Stalin for killing her family. It’s that little missive that will cause the dictator to suffer a stroke. He winds up lying on the floor all night, to be discovered only when his housekeeper brings in his breakfast.

The note is scooped up by murderous security chief Beria (Simon Russell Beale), who’s first on the scene; later he will use it, in typical fashion, to threaten Khrushchev (Steve Buscemi), head of the Party in Moscow who has rushed over still wearing his pajamas, simply because Yudina had once given his niece piano lessons. Others shortly to arrive are Stalin’s second-in-command Malenkov, portrayed by Jeffrey Tambor as an inept buffoon, as well as Bulganin (Paul Chahidi), Mikoyan (Paul Whitehouse), and Kaganovich (Demot Crowley), all craven Politburo members terrified over what might follow. Foreign minister Molotov (Michael Palin) is not among them, since his wife has recently been arrested on charges of treason by Beria and he may be next.

What follows is an unseemly jockeying for power even as the state funeral, preparations for which are fobbed off on an unwilling Khrushchev, is being planned. Beria seems in the driver’s seat, since he has dirt on everyone and seems able to manipulate dopey Malenkov to suit his needs. But Khrushchev tries to mobilize the others, including Molotov (whose wife is suddenly freed), against him. Added to the mix are Stalin’s daughter Svetlana (Andrea Riseborough), frantic to have Beria resurrect another of his victims, and her brother, the perpetually drunk Vasily (Rupert Friend), who rages at the either doddering or inexperienced doctors summoned to treat his father—since Stalin had either exiled or executed all the capable ones in Moscow for supposed crimes.

Ultimately, though, the person who makes the biggest difference is Marshal Zhukov (Jason Isaacs), the bombastic World War II hero par excellence, who arrives ready to take decisive action while everyone else dithers. Particularly because his army has been sidelined by Beria’s security forces in controlling the capital—a decision that has, because of a struggle between Beria and Khrushchev, resulted in the slaughter of more than a thousand would-be mourners coming into the city—Zhukov decides to take on, and take out, the security chief, dragging along the others in his wake. It’s not a pretty ending, but it is a conclusive one—except, as a witty postscript shows, it too will be but a temporary solution to a constitutional question the USSR never really succeeded in resolving.

In the course of relating these very unedifying events—a mixture of history, spoof and pure imagination—the film has some hilarious moments of berserk, over-the-top humor, a few of subtle witticism and many that are more likely to choke off whatever laughter might be rising in your throat. Though Isaacs’ blustery Zhukov dominates the “final solution” to the succession problem, for example, and he’s quite funny, what actually happens is extremely brutal and portrayed as such, without apology. There are other episodes that have a similar effect, and while one might simply describe them as black comedy, it remains that they come across as more black than comedic.

The same distinction is present in the performances. Some of them (like Isaacs’ Zhukov and Tambor’s Malenkov) are farcically broad, and others straddle the line between funny and serious (Buscemi’s falls into that category). But it’s difficult to find much humor—except of the very darkest sort—in Beale’s Beria. Stalin’s merciless enforcer was a monster of sadism, and some of his orders about how and in what order people should be tortured and shot have a grimly funny edge to them. But overall the performance is gruesomely straightforward—even his pedophiliac inclinations are noted, though thankfully not overemphasized. That doesn’t mean that Beale is ineffective, just that from a comedic standpoint he’s too effective, his maniacal grin as his fusses about trying to outmaneuver everyone else so genuinely terrifying that it’s difficult to laugh at him. That’s a perfect example of why it’s wrong to refer to “The Death of Stalin” as a comedy. It has its funny moments, but ultimately what’s happening is far too awful to be mere farce; it’s a burlesque of a true tragedy of history.

Beale, Buscemi and Isaacs are the linchpins among the cast, all doing stellar work. The others fill the venal, cowardly boots of their characters mostly with aplomb; only a couple disappoint—Friend, whose Vasily comes across as too much the pompous ass, and Tambor, who seems too egregious a stooge. But they are all shown in settings that are extraordinarily vivid, thanks to Cristina Casali’s rich production design and Suzie Harmon’s right-on costumes, both captured in Zac Nicholson’s surprisingly staid but lustrous camerawork. Peter Lambert’s editing is similarly traditional in pacing and rhythm.

One might have expected something more purely antic from Iannucci, but he seems to have understood that the manically comic attitude he brought to his previous work about government goofiness on the big and small screens would not work in this case, where the stakes of the events being portrayed were so high in terms of life and death. “The Death of Stalin” is, therefore, a dark comedy, but one with a heart that recognizes the true barbarity of the regime it’s satirizing.