From the opening proclamation that “Dis joint is based on some fo’ real, fo’ real sh*t,” Spike Lee’s latest incendiary comedy-drama, BlacKkKlansman, promises to provoke – and succeeds in the most profound fashion.

It follows the true story of Ron Stallworth (John David Washington), the first black cop in the Colorado Springs police department, who decides to infiltrate the local branch of the Ku Klux Klan. He telephones them to establish contact, but for obvious reasons must be impersonated by a white colleague, Flip Zimmerman (played with typical quiet intensity by Adam Driver), who in turn must hide that he is Jewish as he operates undercover.

It’s a story that is rendered by turns comic and horrifying, as Ron and Flip respond to the manifold intolerances necessary to navigate their mission. Plenty of fun is poked at white supremacists: from a scathing, hilariously inept opening monologue on “white genocide” delivered in a deliciously repulsive cameo by Alec Baldwin to the Tarentino-esque comic mundanities of Ron and Flip’s attempt to gain their KKK membership.

While Ron phones up David Duke himself (played with pitch-perfect polite bigotry by Topher Grace), who ironically claims he can tell Ron is white by the sound of his voice, Flip finds that “ropes and hoods [cost] extra” on top of his membership fees, to which a fellow KKK member interjects: “Fucking inflation.”

Perhaps one of the most surprising elements of BlacKkKlansman is how cineliterate it is, and how Lee uses the history of cinema to inform the film’s thematic poignancy. Lee has transplanted the events of the film from 1979 to 1972 partly in order to capitalise on the imagery and themes of Blaxploitation films from the 60s and 70s, spiking the film with rallying cries for black empowerment.

When contrasted against sparing but powerful invocations of Gone with the Wind and horrifying footage from D.W. Griffith’s The Birth of a Nation, Lee weaves a complex tapestry that keeps the viewer alert, demonstrating the agency and complicity of cinema and, by extension, the viewing audience, in perpetuating harmful stereotypes of African-Americans through history.

Lee has a lot of fun with the period setting – particularly during a hilarious conversation where three lead characters profess their undying admiration for OJ Simpson – but the setting serves more serious ideas too. Another effect of the film’s slight time shift from the true story’s setting is the concurrent re-election of Nixon, which was widely considered to be aided by support from the Klan.

Subtly placed posters of Nixon throughout the film remind the viewer that tactics such as the Southern Strategy and dog-whistle politics only work if there are swathes of intolerant voters to draw on. This fact is not-so-subtly underscored by reminders that David Duke had serious designs on public office, and on dialogue exchanges that tragi-comically underline how little has changed between Lee’s portrait of 1972 and today.

The film is dedicated to Heather Heyer, a counter-protestor who died during the Charlottesville “Unite The Right” rally last summer. Lee seems to have taken her final Facebook post and made it the mantra around which the whole film is based: “If you’re not outraged, you’re not paying attention.” David Duke in the film talks about what needs to be done “for America to achieve its greatness again”; Ron almost turns to the camera at one point as he says, “America would never elect someone like David Duke President of America.”

Lee’s righteous anger hasn’t diminished over the 30 years he’s been making films; it has simmered in the crucible of systemic injustice long enough for Lee to refine it into a form as seething as it is measured. As in Malcolm X, he ends BlacKkKlansman with a wrecking ball of righteous anger which smashes through the fourth wall and demands that the audience not be lulled into complacency by the film’s period setting.

Drawing a clear line between the white supremacy evident throughout BlacKkKlansman and the neo-Nazi protests we saw a year ago, Lee closes the film with shocking footage from the protest itself, and Trump’s limp condemnation of the violence “on all sides.”