There are few modern directors more worthy of emulation than David Fincher, an iconoclast who can make an utterly black outlook seem like the most enjoyable two hours you’ve ever spent. So it is with great pleasure that I introduce you to James Wan, whose first film, “Saw,” is the work of a man who I daresay has seen “Seven,” “The Game” and “Panic Room” a few times and who has learned from them. Here’s a guy who can out-dismal David Fincher.

“Saw” is a movie of ideas — clever, diabolical ideas, often very well-executed and entertaining, in a macabre, grisly sort of way. It is not a movie of words, as the dialogue tends to be rather standard, nor is it a movie of supreme originality, as it has the same dumb cops who never call for backup and who find the clues in the same ways as all the movie cops before them.

But the ideas — ooooh, the ideas. We open on two men, Dr. Lawrence Gordon (Cary Elwes) and the young Adam (Leigh Whannell, who also scripted), each chained to walls opposite each other in a large, decrepit old bathroom in some kind of warehouse. Lying on the floor between them is a man who has evidently shot himself in the head. He holds a tape recorder in his hand. Playing back the tape, the men learn that if Lawrence does not kill Adam by 4 p.m., the person responsible for putting them there will kill Lawrence’s wife and daughter. How Lawrence is to murder Adam when they cannot reach each other and when weapons are scarce, I will leave for you to discover.

Adam is clueless who would put him here, or why, but Lawrence has an idea. This may be the work of the as-yet uncaught “Jigsaw Killer,” a murderer who places people in devious scenarios from which escape is possible but unpleasant, as a means of teaching them how wonderful it is to be alive. (In one glimpse, we see a woman who must fish a key out of a living man’s stomach in order to free herself from the device that will otherwise snap her jaw off.) Lawrence knows about this guy because the investigation, led by a detective named Tapp (Danny Glover), at one point led to him as a suspect. Why he and Adam should be targets now is a mystery to him.

See all the Saws:

“Saw” (2004) B+
“Saw II” (2005) C
“Saw III” (2006) B-
“Saw IV” (2007) C-
“Saw V” (2008) D
“Saw VI” (2009) C
“Saw 3D” (2010) C-
“Jigsaw” (2017) B-

In flashback, we see Tapp’s investigation, and some of the killer’s previous handiwork. It is during these scenes, particularly, that the film occasionally grows too ugly for its own good, where its cleverness and stylishness are not strong enough to outweigh the gruesomeness.

In general, however, the film is far more thrilling, suspenseful and outrageously entertaining than it is disgusting or horrifying. The story is fantastic, and if Whannell’s script doesn’t get all the talky parts quite right, he certainly nails the mechanics of telling the story: what to reveal, when to reveal it, and so on.

Wan’s direction is confident and even, surprisingly so for a first-time filmmaker. The pace is quick, the editing is sharp. It is a slick production, to be sure, and it works itself up to a whirling grand guignol of a finale that caused me and many around me to nearly soil our pants in surprise. A good soiling is a commendable way to end a film like this, and “Saw” does it. I think Fincher would like it, too.

B+ (1 hr., 40 min.; R, some harsh profanity, some brief partial nudity, some rather graphic violence.)