Opening with a Civil War scene from “Gone With the Wind” (1939) and closing with footage from the Charlottesville riots (2017), Spike Lee’s “crazy, outrageous, incredible true story” about Ron Stallworth is both historical and relevant.

In the early 1970s when Ron Stallworth (John David Washington) became the first African-American detective in the Colorado Springs Police Department, he wanted to go undercover. His chance comes when he’s assigned to surreptitiously record a speech by former Black Panther leader Stokely Carmichael (Corey Hawkins), a.k.a. African nationalist Kwame Ture.

After making friends with the event’s organizer, righteous Colorado State Black Student Union leader Patrice Dumas (Laura Harrier), rookie Stallworth picks up the phone and calls the local Ku Klux Klan, inquiring about joining what’s referred to as “the Organization.”

When a meeting is arranged. Stallworth enlists Jewish colleague Flip Zimmerman (Adam Driver) to pose as him. To be convincing, Flip hangs out with Klan members at the local pool hall, spewing racial slurs.

When the national director of the “Organization,” David Duke (Topher Grace), visits Colorado Springs, Stallworth is ordered to be his bodyguard during a screening of D.W. Griffith’s “Birth of a Nation” (1915), celebrating the Klan.

Based on a book by Ron Stallworth, it’s scripted by Charlie Wachtel, David Rabinowitz Kevin Willmott and director Spike Lee, who treads a delicate line, juxtaposing the overt, institutional bigotry in the ‘70s with the racist behavior of some Americans since Donald Trump was elected President.

As opposed to exploitative, it’s emotionally effective, particularly when the white supremacist horror is peppered with comic relief. And, yes, two Klansmen worked at North American Aerospace Defense Command (NORAD) with top-security clearance.

John David Washington (Denzel’s son) and Adam Driver play off each other brilliantly, and Harry Belafonte scores as an elderly activist who describes witnessing a friend’s lynching when he was a child.

“BlacKkKlansman” won the Grand Prix at Cannes and will, inevitably, surface again at Oscar-time.

On the Granger Movie Gauge of 1 to 10, “BlacKkKlansman” is a timely 10, cleverly constructed and visually cathartic.