One of the best parts of Rogue One: A Star Wars Story was at the end when Darth Vader showed up and brutally wrecked havoc on the Rebels. It turns out that epic sequence was a last-minute addition to the film and was shot about three months before the film hit theaters.

Director Gareth Edwards talked to Fandango about how the addition of Darth Vader came about and how he was originally never going to board the Rebel ship:

“He arrives and obliterates the Calamari ship, and then the blockade runner gets out just in time and he pursues the blockade runner. And then Jabez was like, ‘I think we need to get Darth on that ship,’ and I thought, yeah, that’s a brilliant idea and would love to do it, but there’s no way they’re going to let us do it. It’s a big number and we had, what, like 3 or 4 months before release. Kathy [Kennedy] came in and Jabez thought, f*ck it, and pitched her this idea, and she loved it. Suddenly within a week or two we were at Pinewood shooting that scene.

“Because it was my last chance to do Star Wars, and because you know it’s the end, we really were very careful with it. We storyboarded absolutely everything and tried to have no regrets.

“It just felt right; it felt like the right thing to do. It really is just the greatest hits of Darth; that corridor. And we really didn’t want to do anything you haven’t seen him do so it didn’t throw people off. We kept it to what had been established.”

The director went on to say that the stunt team “came up with a whole shopping list of ideas. 70% we used, and maybe 30% felt a little too extreme. They were things you hadn’t seen him do before.”

It’s crazy that this amazing scene wasn’t planned out from the very beginning. It’s exactly what the movie needed, and it ties everything together so perfectly and fantastically links it directly to A New Hope. I’m so happy that Edwards and the creative team moved on it and got it done before the movie was released. I don’t even want to imagine what the movie would be like with out that scene.