True crime stories don’t come much wilder than this. In the late 1970s, Ron Stallworth, an ambitious policeman in Colorado Springs, saw a recruiting ad for new members to join the local chapter of a growing fraternal organization, the Ku Klux Klan.

Stallworth was eager to sign up, which he did with the support of almost every officer on the force, including the chief. Spouting a fervent creed of prejudice, white nationalism and personal anxiety, Stallworth applied to join the city’s cross-burning, sheet-wearing bigots. He was clearly an ideal follower, with his application impressing no less than David Duke, a national Grand Wizard of the Klan. The leader and the new recruit shared friendly telephone chats to muse about the perils threatening Western Christian civilization, race mixing and long-discredited theories of racial differences.

Because his contacts with the Klan were all handled by phone, the dark fringes of the religious and racial right didn’t realize that Stallworth was black and infiltrating them undercover. And that’s just the beginning of the story.

In “BlacKkKlansman,” director Spike Lee turns this unlikely occurrence into a sensational film echoing the look of a pulpy 1970s B movie. It’s a crazy, memorable, messy bombshell in classic bell-bottoms, hippie dresses, disco shirts and dashikis. It combines standard themes from police procedural dramas, fabled scenes lifted from 1939’s “Gone With the Wind” and 1915’s “The Birth of a Nation,” romance, spit-take comedy and harrowing video footage from American hate crimes too recent to forget. It is viscerally exciting, fun and saddening all at once.

Stallworth is played by John David Washington, who made his film debut with a blink-long appearance in Lee’s “Malcolm X” alongside his father, Denzel. His casting is no case of Hollywood nepotism. Washington has his own command of character and physical presence. He gives his flexible role as the tough, likable, increasingly radicalized policeman a density rarely seen in true-blue cop roles.

In scenes about his early days on the force, stuck in a going-nowhere evidence room assignment, he crosses the floor at a snail’s pace when disrespectful colleagues give him a hard time. When they offer their final insult and close the door behind them, he leaps into kung fu acrobatics that would impress Bruce Lee. Washington’s years of stiff-arming blockers as a running back on the St. Louis Rams practice squad haven’t gone to waste.

Adam Driver plays his white undercover colleague, Flip Zimmerman, who stands in and copies Stallworth’s voice when the Klan needs to meet him in person. Since the Klan is as anti-Semitic as it is racist, his part in the operation becomes increasingly personal. Like almost all of the individuals in Lee’s film, he’s someone we get to know better as the story goes on. Is he resentful as Stallworth’s assignment grows in importance beyond his drug busts? Will he be a colleague or a competitor? He may not know himself, and it’s fascinating to watch him pretend to be a man who is pretending to be a different man.

The supporting cast can’t receive enough praise, playing not-especially-good old boys who value hanging out, wearing fancy costumes and complaining about the country going to hell. It’s a breathtakingly good ensemble that may reach its peak with Ashlie Atkinson as the ditzy wife of a Klan member who seems to have memorized his dogma because it accompanied a marriage. Topher Grace is wonderfully polite and self-possessed as David Duke, the camera-ready promoter of ancient biases.

There are other notable actors well used in character roles, but they’re best discovered among the film’s many marvels. Suffice it to say that there are furious shocks and delightful wonders that I would like to discuss, but they should wait to be revealed.

It’s always surprising how much Lee can surprise us. A creative thinker with lots of colors in his paint box, he never delivers the same old, same old. Here he gives viewers important lessons about American history, a key decade in the civil rights movement, and today’s ways of conveying old messages in new code. There seems to be a creative neck-and-neck race to lead the current gold rush of thrilling, saddening, interesting black films, and as of now, Lee is the uncontested front-runner.