Rogue One could have been a very different film. Reports of extensive reshoots persisted during its production, and the fact it underwent severe story surgery is backed up by shots seen in the trailers that didn’t make it into the final film. We may never know what the first version of the first Star Wars spinoff looked like, but director Gareth Edwards — who spoke to movie magazine Empire this month — has confirmed that Rogue One’s original ending was one such cutting-room casualty.

Major Rogue One spoilers are coming below, stop reading now if you haven’t seen the movie yet and want to stay in the dark.

A totally changed ending could hint at a fundamental misunderstanding between director and studio, but rather than a sop to a playing-it-safe company that wanted a softer conclusion, Rogue One’s ending was tweaked to make it darker. Edwards says the original script had the main characters survive, rather than die during the battle of Scarif — not because he wanted to keep them alive, but purely because he had assumed Disney wouldn’t let him kill them off.

Edwards had assumed Disney wouldn’t greenlight his planned ending

Speaking in the now-pulled podcast (which Empire says will reappear online on December 26th), Edwards says that after reading the script, the production staff saw only one way out for Jyn and friends. “Everyone read that and there was this feeling of like, ‘They’ve got to die, right?’ And everyone was like, ‘Yeah, can we?’” But with the famously family-friendly Disney in charge, Edwards originally looked for another, lighter, more survivable ending.

That was, until Disney gave him the green light to kill everyone. “We thought we weren’t going to be allowed to but Kathy [Kennedy, president of Lucasfilm] and everyone at Disney were like ‘Yeah it makes sense. I guess they have to because they’re not in A New Hope,’” Edwards told Empire. From then on, he had his license to kill, and the survivor ending wasn’t even filmed. “I kept waiting for someone to go, ‘You know what? Could we just film an extra scene where we see Jyn and Cassian, they’re okay and they’re on another planet?’” Edwards says. “And it never came. No one ever gave us that note, so we got to do it.”

It’s a good example of a studio giving a director space to work

It’s something of an indictment on the Hollywood studio system that Edwards assumed he wouldn’t have the freedom to kill his leads, but it’s a good example of a studio giving a story and a director space to work on their own terms: rather than a change for the worse, the tweak to the script actually brought Rogue One closer to Edwards’ original vision. The result is a gut punch that works as a powerful ending — something pop culture has been particularly bad at lately.

The silly original opening to The Force Awakens