The seventh film in the “Alien” franchise had an out-of-this-world debut at the box office Friday, paving the way for a projected $40 million opening weekend. Sci-fi fans invaded theaters to see “Alien: Romulus,” which takes place between the first two installments in the 45-year-old series. It raked in $18 million in its first night, according to The Numbers.

The film, which The Post called the franchise’s “best sequel in years,” was produced by original “Alien” director Ridley Scott, and co-written and directed by Fede Álvarez. The $80 million film goes back to the basics of isolation, paranoia, survival and tactile creatures, instead of “unwieldy” extraterrestrial mythology, movie critic Johnny Oleksinski wrote. Tthe sci-fi/horror flick follows space colonizers in a derelict space station coming face to face with “the most terrifying life-form in the universe” and stars Cailee Spaeny, David Jonsson, Archie Renaux, Isabela Merced, Spike Fearn and Aileen Wu.

The hit is another win for Disney, which has dominated the summer box office with films including “Deadpool & Wolverine” and “Inside Out 2.” Marvel Studios’ “Deadpool & Wolverine,” which had a three-week run in the No. 1 slot, was knocked down to No.

2. The Ryan Reynolds smash, which surpassed “Joker” as the highest-grossing R-rated film ever, earned $8.1 million on Friday after clearing $520 million in North America and $1 billion worldwide this week.

Reynolds’ wife Blake .