After surprising old fans in ‘Split,’ M. Night Shyamalan completes his long-brewing superhero trilogy in a new film starring Sarah Paulson, Samuel L. Jackson, Bruce Willis and James McAvoy.

M. Night Shyamalan’s career-reviving 2017 picture Split was a two-fer boon. On one hand, it gave thriller fans a lurid, pop-psychology-based captivity film that pushed all their buttons; on the other, its final scene linked it to 2000’s Unbreakable, seen by many of the director’s one-time fans as his last strong offering before a slide into increasingly laughable projects.

In Glass, the writer-director aims to complete an opus much more ambitious than his breakthrough ghost story The Sixth Sense — still his only film that nearly everyone agrees works. As a trilogy-closer, it’s a mixed bag, tying earlier narrative strands together pleasingly while working too hard (and failing) to convince viewers Shyamalan has something uniquely brainy to offer in the overpopulated arena of comics-inspired stories. Though satisfying enough to work at the multiplex, it doesn’t erase memories of the ways that even movies before the abjectly awful After Earth and The Last Airbender made us wary of the words “a film by M. Night Shyamalan.”

For a story named after the character Samuel L. Jackson originated in Unbreakable — the brittle-boned Elijah Price, a.k.a. Mr. Glass — Glass is around its midpoint before it allows the character to speak or act. (Jackson doesn’t even get top billing in the credits.) Things begin on the trajectory set in Split: Bruce Willis’ super-strong David Dunn, having learned of James McAvoy’s The Beast, is methodically hunting for clues to his whereabouts. Dunn has been an under-the-radar vigilante for years, assisted by son Joseph (Spencer Treat Clark, reprising his Unbreakable role), and is starting to be referred to online as The Overseer. But police seem almost as interested in catching the vigilante as they are in finding the serial-killing Beast.

(The Beast, you’ll recall, is one of many personalities sharing the body of McAvoy’s character. Known collectively as The Horde, some of these personalities support The Beast’s murders and some are appalled by them. McAvoy’s abrupt shifts from one persona to the next remain a draw here, even if the routine isn’t as fresh.)

In setting up the confrontation between the two superhumans, Shyamalan doubles down on Split‘s exploitation-flick vibe: Last time, The Horde abducted three teenage girls and found reasons to strip them to their underwear; this time there are four girls, and they’re cheerleaders in uniform. Thankfully, this episode ends before anybody gets stripped or abused onscreen.

And when it does, both the hero and villain are captured by the cops. They’re taken to the psychiatric hospital where Price has been imprisoned (and heavily sedated) since the end of Unbreakable, and all three are to be studied by Dr. Ellie Staple (Sarah Paulson), a shrink specializing in patients who believe they’re superheroes. Staple has devised clever gear to temporarily rob her prisoners of their superpowers. Or is that just a mind game? The doctor’s agenda is to convince the three men that their feats all have rational explanations; there’s no such thing as superhumans; and so on. Though she makes some headway with Dunn, at least, any viewer who buys her arguments hasn’t seen a Shyamalan film in a very long time.

We’re walking up close to the spoiler zone here. This review is free of them, but anyone hoping to experience the story as its maker intends should be very careful. You can’t even refresh your memory of Unbreakable on Wikipedia: Just the title of a page devoted to this trilogy tells you something you shouldn’t know yet.

The knowledge that Glass has surprises in store gives a strange flavor to appearances by some supporting characters. While Mr. Glass slyly plots the master-villain stuff he obviously has up his sleeve — we’ve known since 2000 that this scholar of comic books won’t be happy until good and evil have a very public battle — Dr. Staple is getting input from Joseph, from Elijah’s aged mother (Charlayne Woodard) and from Casey Cook (Anya Taylor-Joy), the only survivor of The Beast’s first atrocity. Are some of these characters going to turn out to have powers or agendas of their own? Scenes appear to have been directed with an eye toward ambiguity, but looking back after the credits roll, one wonders how much of the haziness is intentional.

Surely, Shyamalan’s dialogue has plenty of clumsy moments. Especially in lines assigned to Dr. Staple and Mr. Glass, we can hear the filmmaker himself, spelling out his thoughts about what comic-book mythology means and how the realists of the world explain away things they can’t understand. This is pretty obvious stuff and, at its worst, makes us snicker at Elijah, whose wrongheaded ideas are rooted in personal tragedy: As with other characters’ histories of personal suffering, the film is so intent on making sure we get it that it often prevents us from being moved.

Like Unbreakable and Split, Glass wants its extraordinary feats to be as grounded as possible in the real world. The tension between wish-fulfillment heroics and realism was tantalizing in Unbreakable. Here, it’s more confused. Those of us who have steered clear of gossip sites or promotional interviews may find ourselves, after the big showdown Mr. Glass has engineered, not certain what we have seen. Is Glass the least satisfying chapter of an often enjoyable, conceptually intriguing trilogy? Or is it an attempt to launch a broader Shyamalaniverse, in which ordinary men and women throughout Philadelphia and its suburbs will discover their own inspiring abilities? Marketplace realities make the latter more likely. Here’s hoping the former is the case.

Production companies: Blinding Edge Pictures, Blumhouse
Distributor: Universal
Cast: James McAvoy, Bruce Willis, Samuel L. Jackson, Sarah Paulson, Anya Taylor-Joy, Spencer Treat Clark, Charlayne Woodard
Director-screenwriter: M. Night Shyamalan
Producers: Marc Bienstock, Ashwin Rajan, M. Night Shyamalan, Jason Blum
Executive producers: Steven Schneider, Gary Barber, Roger Birnbaum, Kevin Frakes
Director of photography: Mike Gioulakis
Production designer: Chris Trujillo
Costume designer: Paco Delgado
Editors: Luke Ciarrocchi, Blu Murray
Composer: West Dylan Thordson
Casting director: Douglas Aibel

Rated PG-13, 128 minutes