Spike Lee’s BlacKkKlansman lights up like a pinball machine, pinging and flashing and clattering with N-bombs, blaxploitation tropes, strategic anachronisms and unsubtle premonitions of the New Trump Order. That’s a rephrasing gag-tactic – meaning that at one point someone actually talks about finding “the means for America to reclaim its former greatness”.

The movie is a broad satirical comedy of the 70s race war in the United States, a tale of passing for black and passing for white, and all based on the true story of Ron Stallworth, the black Colorado police officer who masterminded the infiltration of a local KKK chapter by posing as a white bigot over the phone and sending in white officers for face-to-face work.

The movie kicks off with a shrill, harrumphing cameo from Alec Baldwin, the great SNL Trump ventriloquiser himself, playing a white-power extremist. But the film’s acrid, patchily maintained comedy finally gives way to direct rhetoric as Lee replaces his period drama with video footage of the present-day Charlottesville far-right violence, and the president’s later claim to detect “very fine people” in their ranks – rather in the way that Lee began his Malcolm X biopic with the infamous Rodney King beating. The director may well wish us to remember this, and ponder how very little has changed in a quarter of a century.

John David Washington plays Stallworth, a young black man in Colorado Springs who wishes to join the police force, encouraged by a state-wide affirmative action drive. After a humiliating stint in the records department, in which officers repeatedly ask him to pull the file on “toads”, Ron is moved to undercover work, where he has to spy on a Black Panther meeting, wearing a wire, and hating himself, even as he falls for a beautiful activist, Patrice (Laura Harrier).

The experience humiliates him, but also weirdly radicalises him, inspiring him to use the undercover tactic in a new direction. Ron realises that he has a strange talent for mimicking the sonorous voices of white men, a concept also explored by standups such as Richard Pryor and Eddie Murphy (and soon to be explored further in the movie Sorry to Bother You, whose creator Boots Riley has criticised BlacKkKlansman for naively misrepresenting police infiltration.)

Ron also has a need to confront his colleagues with what their unconscious racism sounds like when spoken out loud. He calls the KKK chapter, pretending to be a bigot and rashly uses his real name. Partly out of embarrassment, the police feel they might as well give Ron’s KKK-infiltration plan a try and send in a white Jewish officer Flip (Adam Driver) to win their trust. Flip is hardly less conflicted than Ron.

Facebook Twitter Pinterest Topher Grace as David Duke. Photograph: David Lee/Focus Features/Kobal/REX/Shutterstock

The ironies, combined with the incessant, nauseating racist talk, creates a strange miasma for this movie, like an animated tattoo, or 3D bumper sticker. There are punchy moments that do not hesitate to create thumpingly significant contrasts. As the hour of a planned racist terror outrage against black people draws nigh, Lee intercuts between a scene in which Harry Belafonte has a cameo as a veteran activist addressing his audience, and a sequence in which the KKK hold a creepy sub-Masonic ceremony to induct new members. It concludes with explicitly juxtaposed cries of “White power!” and “Black power!” It’s an implied equivalence that makes the drama very self-conscious.

BlacKkKlansman sometimes seems to be striving for a savvy bizarreness not unlike David O Russell’s American Hustle – but also for a kind of Brechtian alienation, a Lehrstücke that pointedly uses clips from Gone With the Wind and Birth of a Nation.

Topher Grace has a sinister small role as KKK chief David Duke, imagined as a petty desk-bound pen-pusher, although this film certainly gives this ridiculous man plenty of oxygen publicity, in both his fictional and factual forms.

Lee hits his targets effectively: again and again. They keep popping back up like the targets in a fairground shooting gallery, and get shot back down again with a clang. In this movie, serious and funny bash into each other like WWE wrestlers. The brilliant tonal balance in something like Jordan Peele’s satire Get Out leaves this looking a little exposed, but it’s entertaining. BlacKkKlansman responds fiercely and contemptuously to the crassness at the heart of the Trump regime and gleefully pays it back in its own coin.