AFTER a spell on the sidelines, Spike Lee could not have chosen a better time for a return to form with BlackKklansman.

Based on the true story of an African-American detective who infiltrated the Ku Klux Klan, Lee’s comedy-drama manages to be as funny as it is angry, and this is one furious picture indeed.

The extent of Lee’s ambition is evident from the off as he opens with a clip from Gone with the Wind, Hollywood’s epic take on the Civil War. Scarlett has arrived at the train station to look for Dr Meade among the wounded. As the camera pans upwards, we see that there are thousands of casualties, enough to fill a battlefield. By the time the camera halts its rise, Scarlett is but a mere detail in a wider calamity.

Ron Stallworth’s story, being a small part of the sorry tale of America’s centuries-long maltreatment of its black citizens, might have gone the same way if not for the detective’s book, and now Lee’s film. What a tale it is.

Stallworth (John David Washington, son of Denzel) joins the Colorado Springs police in the early 1970s, the first black officer on the force. Sent to the records department, he looks set to spend his career in uniformed obscurity, only to land a break when Stokely Carmichael comes to town. The police want to know what the Black Panther leader says, so along goes Stallworth and earns a promotion.

His next move is part genius, part insanity. Seeing an ad in the paper for the local Ku Klux Klan, he calls the number, poses as a racist, and is invited along to a meeting. There is one obvious problem. With Stallworth unable to attend in person, a white colleague, Flip Zimmerman (Adam Driver) goes along in his place.

So now we have a “phone Ron” and an “in person Ron”. Soon, in person Ron is in deep with the local Klan, learning about the violent acts the group is planning. Meanwhile, phone Ron is upping his game, talking to the old Grand Wizard himself, David Duke (played with creepy glee by Topher Grace). The situation lends itself to grim farce, and Lee has a lot of fun with it, from having Stallworth “train” his fellow cops how to see the world from where he stands, to cat and mouse games in which Stallworth and Zimmerman are almost caught out.

As the film goes on, Lee starts to dial down the comedy and increase the jeopardy. The Klan members are portrayed as flat out morons, but one or two have enough rat like cunning to make them dangerous.

The politics begin to be amped up, too, as when Stallworth tells a fellow cop that “America would never elect someone like David Duke president”, only to be be told by a white colleague, “Coming from a black guy that’s pretty naive. Why don’t you wake up?” Lee’s drawing of connections between 1970s America and the US of today is done with sledgehammer subtlety, but it hardly matters.

Lee lets the tale get away from him in a baggy middle section in which he is juggling the Stallworth/Zimmerman relationship with that of Stallworth and a black woman activist (Patrice Dumas). One fears he is going to allow his film to putter out. Wrong. He delivers not one but two powerhouse closing acts. The first, bringing the Stallworth story to an end, has all the pace of a heist movie, but it is the second, featuring footage from the Charlottesville rally of a year ago, that takes the breath away. There are not many directors who can take an audience from laughter to stunned silence. Lee is one. Just like that, and just in time, he is back.

If you are in Glasgow over the weekend don’t miss Voyageuse (PG)****, the new feature from Scots filmmaker May Miles Thomas, showing at the GFT till August 26 with a Q&A on Sunday evening. The Zelig-like story of her late mother-in-law is told in a mesmerising series of images while Sian Phillips narrates. Wonderful.