“Star Wars: The Last Jedi” opens this week. (Invision/AP)
Matthew Gabriele is a professor of medieval studies in the department of religion and culture at Virginia Tech and has published widely on religion and violence in the Middle Ages.

What can we expect from the next installment of Star Wars? “The Last Jedi” won’t be released until Thursday night, so we don’t have all the details. But we have seen the trailers, which feature a young Jedi-in-training with a wise master, an imperial armored attack against an entrenched rebel base, the Millennium Falcon being pursued through debris, a hero tempted and a hero captured.

All of which sounds … familiar. In fact, it’s basically the plot of “The Empire Strikes Back.” And that’s almost certainly on purpose.

That’s because Star Wars works within a cycle, always looping forward. That story is compelling to us — it pulls us in because the substance is so familiar, even if the specifics vary. But it’s not just the substance: Star Wars also relies on a style that originated with the Bible and then was filtered through centuries of tradition, reaching perhaps its fullest expression in the Middle Ages. And while the Middle Ages may not seem terribly relevant to a story that takes place a long time ago in a galaxy far, far away, the storytelling of that era can help us better understand the repetition — and the power — of the world George Lucas built.

The comforting familiarity of recent Star Wars movies derives, at least in part, from nostalgia. When “The Force Awakens” was released in 2015, director J.J. Abrams said he structured the film to “borrow familiar beats so the rest of the movie could hang on something that we knew was Star Wars.” And if that were the only cycle in the series — audiences finding pleasure in something familiar from their childhoods — then we could stop there.

But even within the Star Wars universe, the characters seem trapped in a cycle of repeating events, events they themselves remember. The core story repeats again and again. The first stories of the trilogy, the prequels and the sequels map perfectly: A young child on a desert planet, unsure of their parentage and powerful with the Force, suddenly plucked from obscurity by a group in desperate need of help, realizing their potential and defeating a threatening evil.

The one notable difference? Each time around, the cycle improves on the last — Luke is a better person than Anakin, and Rey (so far) seems to be better than them both.

That arc of cyclical history matches the one followed by medieval thinkers as they traced sacred history and God’s relationship with his chosen people. The events and people populating the Bible were read by medieval Christians as allegories, foreshadowing first the New Testament and then the end times. But medieval thinkers did not put this down to history simply repeating itself. They believed that things improved as the cycles moved toward the second coming of Jesus and the last judgment — producing potentially explosive claims.

The stories medieval thinkers told about their world embodied these Star Wars-style cycles. Shortly after the year 1000, Bernard of Angers, a schoolmaster from what’s now northern France, traveled south to the monastery of Conques and compiled a list of the miracles ascribed to that monastery’s patron saint. In “The Book of Sainte Foy,” Bernard went out of his way not just to describe the miracles of healing and punishment (which are often fun and weird to us modern readers) but to explain why those miracles matter.

He did so by linking Sainte Foy’s life to the cycle of sacred history. Bernard explained that the events he described had been foretold in the Book of Psalms. Later, he described Gimon, one of the monastery’s monks, as if he were a new prophet, protecting God’s people by picking up a sword and fighting off his enemies. Bernard even concluded by writing that all of the miracles he described were superior to those described in the Gospel of John.

That’s a pretty stunning claim — to suggest that the miracles supposedly performed by a long-dead saint and recorded by an 11th-century monk were “better than” those of Jesus. Yet that’s precisely what Bernard did, which only makes sense if he were thinking allegorically, as if the events of his time were further along on the looping path of sacred history, and so “superior.”

If we apply this model to “The Last Jedi,” suddenly we might have a spoiler guide for the film. We can be pretty certain Rey will not complete her training, because she’ll have to rush off to save a friend. There, her connection to her friends will lead her to be tempted by the dark side, as was Anakin, as was Luke. Anakin was led to the dark side. Luke resisted. Will Rey chart a new path as the cycle loops toward its final conclusion? Will this trilogy see the end of the centuries-long war between Jedi and Sith? All signs point to yes — a conclusion that won’t just satisfy our nostalgia but will also satisfy the medievalist in all of us.