Spoilers for Star Wars: The Last Jedi follow below.

If you’re reading this, you better have seenStar Wars: The Last Jedi, because we’re about to get real spoilery. Yoda’s back! Yes indeed, in a film packed with twists and turns and surprises galore, one of the biggest reveals is the return of Master Yoda as a Force Ghost. His arrival coincides with Rey (Daisy Ridley) leaving Ach-To to go try and turn Kylo Ren (Adam Driver) to the light, with Luke (Mark Hamill) feeling somewhat defeated.

In a moment of frustration, Luke decides to end it all by burning down the ancient Jedi tree and, with it, the sacred Jedi texts. But Yoda appears, knocks some sense into him, and then burns the tree down anyway (although keen-eyed viewers will notice that Rey took the texts with her when she left).

star-wars-the-last-jedi-luke-mark-hamill

Collider’s own Steve Weintraub recently spoke withThe Last Jediwriter/directorRian Johnsonat a press day for the film, and he asked about the inclusion of Yoda. As Johnson explains, it was the character that made the most sense for that particular moment:

“Yoda, I came to the realization pretty early, once I realized Luke’s arc, that Yoda would be able to play a great place in it. The reason he’s in it, though, is because he has a relationship with Luke going back, and he can speak truth to power. He can come in and set Luke straight. And the truth is, Anakin would, I guess, beHayden[Christiansen] who would be young Anakin, who Luke never had a relationship with that version of Anakin, so there would not be that emotional connection there for Luke. Similar with Obi-Wan. I would have loved to have broughtEwan[McGregor] in, but the truth is, Luke never had a relationship with young Obi-Wan, it was withoutAlec Guinnessand I didn’t want to create a digital version of Alec Guinness. So, Yoda was the obvious go-to in terms of if Luke is going to have a point of connection to the past that’s going to kind of kick his butt, then we can recreate Yoda and we can bringFrank Ozin to do it, and besides, that’ll be really fun.”

The result is a straight-up delight, and Johnson and his team used the originalEmpire Strikes Backmolds to create the Yoda puppet, so he would be as similar to that appearance as possible. And as Johnson says, it was not only a joy to see Yoda back to his impish self, but the scene serves an emotional, thematic purpose as it gives Luke the final push to get out of his funk and help his friends.