As Mel Brooks' 2000-Year-Old Man famously said, "Tragedy is when I cut my finger. Comedy is when you fall into an open sewer and die."

Which is one of the reasons that "The Death of Stalin" plays like a rip-roaring farce. The film concerns the events immediately before and after the death of Josef Stalin, Hitler's contemporary and kindred spirit, in March 1953. It's an absurdist depiction of a brutal dictatorship that works wonderfully, in part because it happens at a safe distance.

It's based on appalling events from 65 years ago and half a world away in Soviet Moscow. Even more important, it's often raucously hilarious, neatly crafted, sometimes visually striking, packed with excellent performances and abrasively profane dialogue. Most significant of all, it's true.

Co-written and directed with precision craftsmanship by Armando Iannucci (creator of HBO's Emmy-winning political comedy "Veep"), its focus is the ensuing power struggle between seven henchmen in Stalin's brain trust. It gives us sharply detailed portraits of such well-known historical figures as Communist Party secretary Nikita Khrushchev (Steve Buscemi), foreign minister Vaycheslav Molotov (Michael Palin) and secret police chief Lavrenti Beria (Simon Russell Beale).

They're all jockeying to succeed the dictator after patiently watching him expire following a stroke after four days with scant medical care. Their petty battling to succeed the dictator resembles egotistical bit players fighting for the main role in a tragedy after the star collapses.

How they exercise power against citizens is worse. Beale, a longtime star of London theater, is grimly funny as the sadistic Beria. By far the most despicable of this band of villains, he sends one of his soldiers on a murder mission against a married couple with meticulous orders: "Shoot her before him. Make sure he sees it."

The handsomely produced film is a treasure trove of solidly documented historical details that feel too ludicrous to be true. We meet Stalin's dopey son Vasily ("Homeland's" Rupert Friend), who ran the Soviet hockey team, killed them all in a plane crash when he ordered them to fly through a storm, then tried to cover it up by getting together a terrible amateur team to take their place.

We watch the terrified Radio Moscow staff, who had just broadcast an evening's live Mozart program, learn that Stalin wanted a copy of the performance and had a courier on the way to pick it up. They hadn't recorded one. They imprison the concert hall's orchestra, snatch another conductor (in his pajamas) to replace the first who had fainted from shock after Stalin's call and fill the hall with a captive audience to applaud on cue. "Don't worry, no one's going to get killed," shouts the production director (Paddy Considine). "This is just a musical emergency." At least they were safer than the party leaders, who secretly signed death warrants targeting each other.

The international cast members play their parts with mismatched accents, from Cockney to Brooklyn, because Stalin's inner circle came from all across the Soviet Union and had different dialects. When something you see here can't possibly be real, it's real.

It takes a special brand of genius to find the comic sweet spot in this material. It also requires a tightrope walker's sense of balance. Iannucci keeps his comic moments focused on the destructive idiocies of individual men tripping each other, and themselves, in a race for control.

Palin shows Molotov as a textbook lackey, with no principle higher than twisting party orthodoxy to preserve himself at all costs — including agreeing to have his wife dragged off for execution. Jason Isaacs (lately the captain on "Star Trek: Discovery") is an utterly shameless braggart as Field Marshal Zhukov, his pristine uniform covered in medals nearly as big as his ego. Buscemi's Khrushchev is the best of the group, displaying the comparatively progressive attitudes that followed Stalin's nightmarish reign.

Granted, none of this seemed funny at the time. Iannucci is well aware that while satirizing bullies is good, gags about their victims is not so humorous. When his camera moves outside the halls of power, amid bodies dropping left and right on the streets, it's harrowing. Luckily, the film is mostly focused on bureaucrats turning against one another like scorpions in a bottle. It's uproarious, ironic gold.