When first announced, the title of the ninth Star Wars did not seem to make much sense—after all, Luke Skywalker (Mark Hamill) had died in the previous film, The Last Jedi. However, in the finale, we learn that The Rise of Skywalker referred not to Luke but to Rey, who has taken on the name Skywalker to indicate that she has chosen the side of the light rather than the dark side of the Force that is in her DNA (or whatever the equivalent of DNA is in this galaxy far, far away).

The revelation about Rey’s link to the dark side came earlier in the film, when she learned that Emperor Palpatine (Ian McDiarmid) is her grandfather. She meets her grandfather at the end of the film in an epic confrontation where she uses both Luke and Leia’s (Fisher) lightsabers, a representation of the pure good force of the Jedi, to defeat Palpatine, though she too dies in the process.

Luckily, however, Ben Solo (the murderous ruler formerly known as Kylo Ren) has turned good after Rey impales him with a lightsaber then heals him. He resurrects Rey by healing her, though it drains his life force away in the process. This is similar to what happens to his mother Leia earlier in the film, who uses the last of her energy to reach out to her son one final time.

With Palpatine defeated, Rey pays her respects to the fallen Luke and Leia by burying their lightsabers together at Luke’s home on Tatooine. After these have sunk into the sand, she brandishes her own lightsaber, in a shade of yellow gold. As anyone well-versed in Star Wars lore knows, building your own lightsaber is a right of passage, showing she is fully one with the Force and a true Jedi.

She meets an old woman in the end scene who asks her name, to which she replied “Rey Skywalker,” the final sign that she has managed to get away from the dark side. This also serves to help bring the Star Wars franchise to a neat conclusion by making it the story of three generations of Skywalkers: Anakin, Luke and now Rey.

As she does it, the ghosts of Luke and Leia appear to her, in a direct reference to Return of the Jedi, where Obi-Wan Kenobi (Alec Guinness), Yoda (Frank Oz) and Anakin Skywalker (Sebastian Shaw in the original movie, Hayden Christensen) in the remastered version) appear to Luke. The movie then pays tribute to both A New Hope and Revenge of the Sith, as Rey and BB-8 head off into the twin sunset, bringing the Star Wars trilogy of trilogies (a nonology) to an end. For now.

Star Wars: The Rise of Skywalker is in cinemas now.