With jarring tonal shifts, scenes that go nowhere, and mismatched performances by such stars as Oprah Winfrey and Reese Witherspoon, director Ava DuVernay’s “A Wrinkle in Time” is a mess.

But this adaptation of Madeleine L’Engle’s beloved 1962 novel is such a glorious and fascinating mess — teeming with visual splendor and imagination, and providing the weary world a hopeful message delivered by a spunky new heroine — that it’s worth buying a ticket to see for yourself.

Meg Murry (played by the amazingly named Storm Reid) is a 13-year-old student who spends more time in the principal’s office than in class. Principal Jenkins (André Holland) knows Meg’s academic potential, and also knows why she’s angry and withdrawn: Her father (Chris Pine), a brilliant scientist with theories about traveling across galaxies in an instant, disappeared four years earlier.

Meg is home one night with her mother (Gugu Mbatha-Raw) and her genius little brother, Charles Wallace Murry (Deric McCabe), when they are suddenly visited by a perky and somewhat strange woman (Witherspoon) who identifies herself as Mrs. Whatsit. Her appearance baffles everyone except Charles Wallace (as everyone calls him), and it seems the two of them have hatched plans for a grand adventure.

Meeting Mrs. Whatsit leads Meg, Charles Wallace, and Meg’s dreamboat classmate Calvin (Levi Miller, who played the title role in 2015’s “Pan”) to a nearby haunted house, where they meet Mrs. Who (Mindy Kaling), who is so wise she chooses to speak only in other people’s quotations. (She cites Rumi, Buddha, Shakespeare and Lin-Manuel Miranda, among others.) Mrs. Who and Mrs. Whatsit eventually bring in the matriarchal Mrs. Which (Oprah Winfrey), and the journey begins in earnest.

The three Mrs. W’s have the power of the Tesseract, the mysterious force Meg’s father hypothesized could carry people across the universe through folds, or wrinkles, in the space-time continuum. They teach this power to “tesser” to the three kids, so they can follow a distress call that they believe came from Meg’s father — who, they say, is in peril from a universe-spanning evil force called The It.

This news launches Meg, Charles Wallace and Calvin on a journey similar to quests through Wonderland or Oz or Narnia. There are wonders to see, traps to avoid and odd characters to encounter — including a seer called the Happy Medium (Zach Galifianakis) and a malevolent trickster called Red (Michael Peña).

DuVernay and screenwriters Jennifer Lee (“Frozen”) and Jeff Stockwell (“Bridge to Terabithia”) try to cram as much of L’Engle’s sprawling story into the movie as possible, and sometimes things get a little crowded and frenetic. Some set pieces fizzle out, while others — like the scenes on the sun-drenched planet of Uriel — dazzle with gorgeous spectacle and inventiveness.

Putting Winfrey, Witherspoon and Kaling in elaborate costumes and glittery makeup and hair is a high-wire act that threatens to throw the narrative out of balance. Thankfully, DuVernay has found in Reid a plucky and intense young actor who commands the screen even with all the bells and whistles going on around her.

Reid also must carry the potentially heavy baggage DuVernay lades onto “A Wrinkle in Time,” with Meg urged to “be a warrior” and become the light that will destroy the darkness spreading from The It. But DuVernay guides Reid with assurance, as they deliver the movie’s hopeful message without stumbling into mawkishness.

★★★

A Wrinkle in Time

A 13-year-old heroine must travel the universe, and keep from being blown off the screen by the star power of Oprah, in this cluttered by visually fascinating adventure.

Where • Theaters everywhere.

When • Opens Friday, March 9.

Rating • PG for thematic elements.

Running time • 109 minutes.