In the early 2000s, M. Night Shyamalan had a streak of movies so good, Newsweek hailed him as the “next [Steven] Spielberg.”

Then he started a streak of movies so bad, they stopped including his name in trailers. His filmmaking career has been so tainted, that today, there’s a meme in which he makes terrible movies with outlandish twist endings. Yet with his latest film, “Split,” Shyamalan has returned to his horror-thriller roots and draws on his directorial and writing skills with great effect to create unnerving dread and suspense.

“Split” is about three teenaged girls who are kidnapped by a man with dissociative identity disorder. Because of this, he has 23 distinct identities, and one of the personalities’ goals is to prepare the girls for the arrival of “the beast,” a monstrous 24th identity.

The star of the movie is James McAvoy, and his incredible performance as Kevin, the antagonist. In truth, Kevin is only one of several characters that he plays, as he is so convincing in his portrayal of several different personalities within one man. When McAvoy performs as a different personality, he becomes that person completely, changing his voice, facial expressions and body language.

After meeting all of the personalities, one can tell which identity McAvoy has adopted before he even says anything. There are also scenes where he changes personalities and it is remarkable to watch as one character leaves and another emerges before our eyes in a split second.

The two other noteworthy characters of the movie are Casey, played by Anya Taylor-Joy, and Dr. Fletcher, played by Betty Buckley. Casey is one of the kidnapped girls around whom the plot revolves.

Taylor-Joy had a breakout year as a horror actress in 2016, starring in both the criminally underrated film “The Witch” and the understandably underrated “Morgan.” In “Split,” she plays the captive and walks the line between being composed and fearful, admirably portraying the resourceful prisoner. Dr. Fletcher is Kevin’s therapist, an expert in dissociative identity disorder that wants to help him and to better grasp the effects of his mental disorder. Her character is there mostly to give exposition, but she gives a valuable performance allowing us to understand Kevin and his condition.

Shyamalan creates a truly terrifying and claustrophobic movie that’s psychological in every sense of the word. He is almost “Hitchcockian” in his creation of suspense, building the scenes slowly with increasing amounts of dread. One of the best aspects of the film is that it is not only smart, but it trusts that the audience is smart, allowing it to absorb and draw its own conclusions on the implications that the story delivers.

Despite its high points, the film has plenty of issues. “Split” is peppered with flashbacks to Casey’s past, giving context to why she acts the way she does in her situation. The scenes do a good job of building her character, but ultimately are too detached from the main story and come off as distracting. Another issue is how the film handles the complex issue of mental illness. The portrayal of Kevin’s condition is greatly exaggerated and violence-prone, and some have found this insulting to those struggling with dissociative identity disorder or other disorders.

“Split” is a fantastic comeback film for Shyamalan, showcasing his ability to craft a thrilling horror scene while delving back into the subtleties of filmmaking that made his career in the first place. Featuring a talented cast, led by McAvoy, the movie delivers a frightening look into the human mind, and the relationship between captor and captive.