It’s always nice when a filmmaker directly confirms the suspicions you harbor about the inspiration for his movie as you’re watching it. Recently in “War for the Planet of the Apes,” for instance, Matt Reeves inserted a visual to let you know that, yes, his template was “Apocalypse Now.” Now Andy Muschietti uses a movie marquee to tell you that while you might be thinking of his version of Stephen King’s “It” as a scarier version of “Stand by Me” or even “The Goonies,” you should really consider “A Nightmare on Elm Street” as its progenitor. (Because the picture is set in 1989, he has to add “5” to the title on the marquee to get the date right, but we all know that it’s Wes Craven’s original of five years earlier that’s the touchstone). The victims may be younger and the sleep motif jettisoned, but the essence is the same. And, it might be added, “Nightmare” is a good model to follow, certainly one of the better slasher pictures of its era.

At more than a thousand pages King’s 1986 door-stopper, about a bunch of small-town childhood friends who are terrorized by a vicious entity that often assumes the form of a clown called Pennywise and then take it on a second time after they’ve grown up, was a natural for network mini-series treatment, a genre very popular at the time. A four-hour 1990 ABC adaptation, directed by Tommy Lee Wallace from a script by Lawrence D. Cohen (who had previously penned the screenplay for Brian De Palma’s version of “Carrie”), was a solid, workmanlike job that covered the entire tome, though with understandable excisions. Muschietti’s remake clocks in at only a bit over two hours, but there’s a catch: it adapts only the first half of the book, the kids’ story; the remainder will be taken up in a projected sequel—presuming that this installment doesn’t tank the way the recent adaptation of King’s “The Dark Tower” did, of course. The story has also been updated, set in 1989 rather than 1958, so that the proposed sequel will be contemporary.

Muschietti and his collaborators have little reason to fear. “It” will do extremely well, and their plans for the sequel are safe. That doesn’t mean it’s a great movie, or even a great horror movie. It is, however, a solid, well-made picture, one of the better King adaptations if not of the very top rank among them, even if its over-reliance on CGI effects grows tiresome by the close.

It also features capable young actors. “The Losers Club” of cursed Derry, Maine, where “It”—as we learn along with them—reappears every twenty-seven years to feast on the fear of the children it abducts, may be a pretty stereotypical group, but they’ve been nicely cast. The leader is Bill (Jaeden Lieberher), the brainy stutterer, who’s haunted by the disappearance of his younger brother Georgie (Jackson Robert Scott), whom we see taken by Pennywise as he plays with a paper boat on the street during a rainstorm. (The sequence of Georgie’s abduction, very faithful to the book, starts off the movie with a bang.) It’s the new kid in town and a recent addition to the posse, chubby Ben (Jeremy Ray Taylor), who bookishly works out the twenty-seven-year cycle of Derry disasters while Bill obsesses over searching the town’s sewer system looking for Georgie, who he hopes is still alive. Both Bill and Ben will also develop adolescent crushes on Beverly (Sophia Lillis), the spunky tomboy with a reputation as a “bad girl” in town, who becomes part of the pack and proves to be as courageous and determined as anybody. (Her reputation, of course, is undeserved.)

Bill’s long-time comrades-in-arms include Eddie (Jack Dylan Grazer), the asthmatic kid with his inhaler and pills always at the ready; Stan (Wyatt Oleff), the timid fellow preparing haphazardly for his bar mitzvah; and garrulous, wise-cracking Richie (Finn Wolfhard). During the summer of terror they will add another member to their number, home-schooled Mike (Chosen Jacobs), apparently the only black kid in the vicinity.

One of the things that joins The Losers together—and becomes a motif in the picture—is that none of them seem to have much adult support. Of the parents we actually meet, Bill’s father seems dismissive of his son’s grief, Stan’s dad looks impatient over his lack of studiousness, and Eddie’s mother keeps him under her control by telling him he suffers from all sorts of ailments. Mike’s grandfather (his parents are dead) forces him to become a man by killing sheep. And Bev’s father actually abuses her sexually. Even the librarian tries to order Ben around.

That sense of adult cruelty also explains the nastiness of the human villain of the piece, bully Henry Bowers (Nicholas Hamilton), who not only threatens the boys but, along with his equally thuggish pals, physically assaults them whenever he can. His warped personality is explained by the brutality of his policeman father, who regularly humiliates his son.

Presumably it’s the general vein of evil permeating the Derry population that also explains the presence there of Pennywise (Bill Skarsgard), whose tactic is to terrorize his young victims with visions of the thing each of them most fears, before literally consuming them and making them part of his underground collection. The effect is not unlike the nightmares Freddy Krueger visited up his young prey, except that here the nightmares are waking ones. The concept allows Muschietti and his team to fashion a regular chain of scare sequences, one of which—set in Bev’s bathroom—might well put you in mind of the prom from “Carrie.” They’re all done up well enough, but as they descend further and further into haunted-house territory they become less effective, especially since visual effects dominate them. That emphasis on CGI also lessens the power of Skarsgard’s Pennywise, which doesn’t manage to capture the gleeful malice Tim Curry brought to the character in the mini-series.

Pennywise’s taunting, in any event, has to share screen space with Bowers’ attacks, the emphasis shifting back and forth between them until, toward the close, they coalesce in a shift of rules that actually moves things in the direction of the later episodes of “Elm Street.” But King has always been ready to alter the rules he’s established in search of another shock.

In any event, the comparative ineffectuality of Skarsgard’s clown—and the other adult figures in “It”—is balanced by the juvenile performers. Lieberher and Lillis are outstanding in expressing their character’s emotional states, but the others aren’t far behind—Grazer is particularly engaging—even if Wolfhard comes on a bit too strong. Of course, the youngsters are fortunate that screenwriters Chase Palmer, Cary Fukunaga and Gary Dauberman have been adept in getting the patter among them generally on-target.

“It” is in every respect a class product—cinematographer Chung-Hoon Chung contributes elegant widescreen images, Claude Pare an effective period production design, and Janie Bryant spot-on costumes. One might wish that editor Jason Ballantine had been a bit more aggressive (in the final confrontation with Pennywise, for example), or that the effects teams had mustered a degree of restraint at some points (though the overall results are visually impressive). But by comparison to the usual run of horror films, this is obviously a superior piece of work. Benjamin Wallfisch contributes a score that’s nicely varied—an idyllic sequence at a quarry lake recalls Elmer Bernstein’s wondrous “To Kill a Mockingbird”—though the choice of period songs at a few points is questionable.

King’s fans should be more than satisfied with a first installment of “It” that might not match the quality of the best adaptations of his work—or the sheer audacity of Kubrick’s “The Shining”—but by and large is faithful and effective. And they have every reason to look forward to Part Two.