Go ahead. Blame H.G. Wells. Sure, for centuries people have looked up at the sky and wondered what’s out there in the vastness of space. But it was Wells, in “The War of the Worlds,” his 1898 novel about a Martian invasion of Earth, who put a horrific face on extraterrestrial life. Technologically superior. Incredibly ugly. Scary and merciless as all get-out.

“ ‘War of the Worlds’ is a classic alien invasion story; it set the bar, so that everything that followed it was influenced by it,” says Adam Swiderski, editor-in-chief of Syfy’s Syfy Wire.

“Wells foresaw a day when technology could be a frightening thing,” adds John Logan, co-screenwriter (with Dante Harper) of “Alien: Covenant,” opening May 19, the latest in the franchise. “It was such an exceptional novel, and influential in creating a fear of the unknown.”

There is, in fact, a through-line from “War” to the “Alien” flicks, which encompasses everything from “The Thing” to “Invaders From Mars,” “Invasion of the Body Snatchers” to “Transformers.” On one level, they’re all about conflict with the great unknown, a feeling that the gods are toying with us. But on another level, when we think about evil things from outer space, all of these pictures are really reflecting fears about humanity.

“Science-fiction films say less about what we think about space, and more about what we think of ourselves,” says Gerald Sim, a professor at Florida Atlantic University whose film classes frequently feature science fiction. “These films talk more about who we are, and how we use science, than they are about other worlds. The invasion movies from the 1950s, for example, are allegories for the Cold War. We were afraid of an extinction event coming from the sky, from nuclear weapons.”

This metaphoric context is especially apparent in the first two “Alien” films. The 1979 classic is essentially a haunted house horror flick — set on a spaceship, of course — but in its memorable imagery of an alien baby bursting from actor John Hurt’s chest, it is also a metaphor for infectious disease, and all sorts of body horrors. And in its sequel, “Aliens,” the feminist context is about a creature — known as a Xenomorph — protecting its eggs, and a woman, Sigourney Weaver’s Ellen Ripley, protecting a child.

advertisement | advertise on newsday

Plus, there’s the concept of aliens planting an embryo in humans or, as in “Invasion of the Body Snatchers,” totally inhabiting their bodies and walking around looking completely normal. Which, says Logan, reflects “this threat in modern America that is around the corner and looks just like us.”

There is also in these films what psychologists call transference, in which creative types take human experience and place it in an alien context. “There’s always an ebb and flow in the human imagination about aliens,” says Swiderski. “A lot of it feeds back into our perception of ourselves and human history, a pattern of behavior that when a technologically superior society comes into an area inhabited by a less technological society, you see the superior one taking over.”

Sure, there are films about benevolent outer-spacers — last year’s “Arrival,” featuring good guy extraterrestrials trying to communicate with us as a way to help humanity being a perfect example. But, says Sim, films about nonthreatening aliens “tend to be more philosophical. There is no opportunity for hinging the climax on action sequences, which only happens when the aliens are enemies and you have to fight back.”

No need to worry about too much philosophizing in the new “Alien” flick, however. Logan, who won an Oscar for his “Gladiator” screenplay, says he and director Ridley Scott wanted to reference the original a little bit. “What’s provocative in ‘Alien’ is these were normal people, working on a garbage scow in outer space, having to deal with this nemesis,” he says. So in the new film, “the crew of the Covenant are not space invaders, they’re colonists. They’re trying to find a home, and you have a family unit being frightened. With ‘Alien: Covenant’ I wanted to create a horror movie, dark and frightening, with that roller-coaster structure. We tried to make it very frightening, the way the original was.”