The ending of Alien (1979) gives viewers exactly what they want to see. After nearly two hours of tension and horror, Ellen Ripley (played by Sigourney Weaver) wins one last battle by blasting a stowaway Xenomorph into space. This end sequence (which you can watch below) paved the way for more Alien movies and helped make Ripley one of the most beloved sci-fi characters of all time—but according to the film's director, it almost didn't happen.

As Entertainment Weekly reports, Ridley Scott initially had a much different vision for the final minutes of Alien. In his original concept for the ending, a Xenomorph would have snuck onto Ripley's getaway ship as it did in the version we know. Ripley and the alien would have duked it out, but this time, things wouldn't have worked out for our heroine.

Scott told Entertainment Weekly, “I thought that the alien should come in, and Ripley harpoons it and it makes no difference, so it slams through her mask and rips her head off.” Instead of ending with Ripley filing a captain's log entry and drifting into hyper-sleep, the Xenomorph would have been the one making a recording. “It would mimic [Tom Skerritt's] Captain Dallas saying, ‘I’m signing off,'" Scott said.

Alien pushed the boundaries of a commercial blockbuster in many ways, but this dark turn was too much for studio executives. After he pitched the idea to 20th Century Fox, Scott was visited by one of the executives on set within 14 hours. He threatened to fire Scott unless he came up with an ending that was easier to stomach. Scott agreed, and we ended up with a triumphant ending for Ripley and three more movies starring Sigourney Weaver.

Alien went through several big changes from conception to final cut. Ripley was written to be a man, and Ash wasn't in the original script. Here are more facts about the science fiction classic.

[h/t Entertainment Weekly]