How could a black man become a member of the Ku Klux Klan?

In 1979, it happened — sort of. Spike Lee’s unforgettable new movie “BlacKkKlansman” tells the true story of an undercover African-American police officer, Ron Stallworth (John David Washington), who poses as a prospective Klan member to bring down the white-supremacy group’s local chapter.

It gets weirder.

So as not to blow his cover, Stallworth, who contacts the Klan by phone, enlists a reluctant Jewish detective, Flip Zimmerman (Adam Driver), to play him in person. Together the pair presents a composite “Ron Stallworth” to the Klan, and learns about its inhumane plots. Amazingly, the plan works.

The tale is so bizarre that it’s sometimes comical, and often disturbing. The unrelentingly intense “BlacKkKlansman” can be very hard to watch.

Starting a new job as the only black cop in Colorado Springs, Colo., Ron is initially handed minor tasks in the records room. Bored, he asks to go undercover, and is assigned to hear Kwame Ture, a k a Stokely Carmichael (Corey Hawkins), speak at a local college. Ron is smitten with the student group’s president, Patrice (Laura Harrier). Just one problem: She loathes cops, and calls them “pigs.”

In the first of the film’s many surreal moments, Ron eyes a small newspaper ad for the Klan, as if it’s for a store or lawn service. He calls the number and, with Zimmerman’s help, begins infiltrating the small group that holds secret meetings in members’ living rooms. Flip, a non-practicing Jew, adopts their backward lingo and prejudices with the skill of Laurence Olivier. It’s during those meetings that the light, fleet-footed caper turns into a horror film.

The three main Klansmen (Ryan Eggold, Jasper Pääkkönen and Paul Walter Hauser) spew racist bile in a casual monotone, as if they’re talking about the Broncos. They shoot at offensive cartoons as target practice. The wife of one, Connie (a game Ashlie Atkinson), flirts with her husband in bed as they discuss how they’ll kill black people. The performers commit wholly, and the characters aren’t turned into caricatures.

The top Klansman, Grand Wizard David Duke, shows up too — in the person of Topher Grace. The low-key actor is good in this very different ’70s show.

“BlacKkKlansman” also asks deeper questions about law enforcement, as Ron and Flip begin to have identity crises on the job. For Ron: Is this just another case, or a righteous rule-breaking crusade? Is Patrice right about cops — and him? For Flip: He’s never had pride in his Judaism before, until coming face to face with his oppressors. Is he compromised? Washington (son of Denzel) and Driver, coy actors who are careful not to give away too much, let their turmoil bubble in an Instant Pot. And we watch the pressure build.

Lee heightens the nervy tone with strong visuals, juxtaposing a ’70s blaxploitation aesthetic with the Klan’s suffocating suburban décor. The jumps keep you off balance, and engaged.

At a moment in which policing — even fictional policing — is a divisive topic, Lee treats cops fairly. The station has good officers who work hard to serve justice, and bad ones who act above the law. What he’s made with “BlacKkKlansman” is an important tribute to small-town heroes — cops, activists and good neighbors — arguing, using news footage of the 2017 Charlottesville, Va., white-supremacist rally, that the world still needs more people like them.