Anton Chekhov’s rule of drama was that if you introduce a gun as a prop in Act I, it needs to be fired before the end of the play. David Mamet, a playwright and filmmaker who knows as much about the intricacies of drama as Chekhov did, reverses that rule in his new film “Redbelt.” The gun is fired in Act I — it’s the effects of that gunshot that complicate things in Act III.

In fact, most of what we need to know about the film’s themes and plot line are introduced not just in the first act but in the first scene. The movie’s very first image is of two white marbles and a black one, used by jiu-jitsu instructor Mike Terry (Chiwetel Ejiofor) to determine which fighter will be “handicapped.” (If you draw the black marble, you have to fight with one arm tied behind your back.) As two of his students grapple, Mike shouts encouragement that proves to be prophetic: “Who imposes the terms of the battle imposes the terms of the peace.” “Improve the position.” “There’s always an escape.” “Control your emotions.”

Mike is a calm, philosophical teacher, a black-belt who has never fought competitively because to fight for money would be a dishonor to the Brazilian master who taught him. It would ruin the purity. This blitheness toward finances is vexing to Mike’s wife, Sondra (Alice Braga), a Brazilian beauty who handles the bookkeeping for Mike’s not-very-profitable Los Angeles jiu-jitsu academy. Her brother Augusto (John Machado) is a mixed-martial-arts fighter who’s making a fortune in gimmicky, televised battles. Her other brother, Bruno (Rodrigo Santoro), manages him. Bruno would love to put Mike on the undercard of an upcoming pay-per-view event, giving him a shot at $50,000. Mike, who isn’t sanctimonious about his beliefs — he has no problem with other people fighting professionally — smiles and says no thank you.

Mike’s best student is a cop named Joe (Max Martini). One night after class a skittish woman (Emily Mortimer) enters the academy, miscommunication ensues, and Joe’s gun is fired. A plate-glass window is the only casualty, but a police officer can’t fire his gun without it being noticed. The subsequent chain of events unfolds so casually that we barely realize Mamet, ever the manipulator, has contrived it all from start to finish: Mike needs a loan from Bruno to repair the window; he goes to the nightclub Bruno owns; while there, he intercedes in a barroom brawl and probably saves the life of Chet Frank (Tim Allen), a tough-guy movie star who was in over his head; Chet shows his gratitude by inviting Mike and Sondra over for dinner; Mike’s martial-arts expertise is useful in the war movie Chet is currently shooting; and Chet’s producer Jerry Weiss (Joe Mantegna) wants to bring him on as a consultant.

I have told you several things that happen in the film, yet I’ve barely scratched the surface. All of the established elements come into play later with some legal intrigue (good thing that skittish woman is a lawyer), and ultimately Mike finds a good reason to fight competitively — a nod, perhaps, to more formulaic fight pictures, where there is always a reluctant hero. “Redbelt” is the sort of martial-arts movie you would expect David Mamet to make: focused on characters and story rather than fights, full of memorably quirky dialogue (“Let’s financialize the problem,” says fight promoter Ricky Jay in an attempt to solve a conflict), and enlivened by double-crosses and sleight-of-hand. It has some terrific fights — Mamet’s stories have always been masculine, muscular affairs whether they had much “action” or not — but don’t go in expecting “The Karate Kid.”

It’s easy to see Mike as an avatar for Mamet. Both men work in a field where art is often overshadowed by commerce, and perpetual outsider Mamet’s frustrations with the Hollywood machine are well-documented. (His “State & Main” is a fine parody of showbiz lunacy.) To Mike, jiu-jitsu is about honor and discipline; to Mamet, supposedly, filmmaking and playwriting are about ideas and artistic expression.

Nonetheless, they both know how to put on a good show when it comes down to it. “Redbelt” twists and turns with the best of them, with a story line that comprises so many elements it’s impossible to guess which direction it’s going to head next. As Mike Terry, Chiwetel Ejiofor is smooth and controlled, with a tough, Zen-like exterior that seems imperturbable, right up to the moment that he is finally perturbed. His indignation is righteous, his wounds unjust, and we’re eager to see things righted.

Tim Allen is surprisingly good in a non-hammy dramatic role (I suspect the word “surprisingly” will appear in many reviews), marking the first time he has ever been not-funny on purpose. Also in the mix are well-oiled turns by Ricky Jay, Joe Mantegna, and David Paymer (as a loan shark), as well as more serious turns by Max Martini, Cathy Cahlin Ryan (as Joe the cop’s wife), and the exotic Alice Braga. Even Mamet’s minor characters can be pivotal. Part of the fun of a meaty, intrigue-packed flick like this one is trying to figure out on which details the story will ultimately turn. Or better yet, don’t try to guess. Just pay attention and let Mamet entertain you.

B+ (1 hr., 39 min.; R, scattered harsh profanity, some martial-arts violence.)