Bacteria are not known for their ability to stir the imagination, but there is at least one reliable exception: bacteria from Mars. In 1996, a NASA study caused a sensation when it announced the mere possibility of fossilized bacteria in a meteorite believed to be from the Red Planet. Thirty-six years after the Viking landers collected soil on Mars, scientists can still make news by declaring that the samples indicate the presence of microbes. Although conclusive evidence for life on Mars (or on any other foreign planet) has yet to turn up, humans are an impatient species. And so we have invented extraterrestrials of every conceivable kind. There are fictional aliens that resemble little green men, mollusks, insects, plants, and minerals. Sometimes they have no bodies at all.

For all their diversity, these creatures tend to fall into one of two groups: those we can live with and those we can’t. This summer, Hollywood franchises espousing each view will be delivering their newest installments. The genial “Men in Black” movies suggest that freaky-looking extraterrestrials already live among us, undetected by most citizens and overseen by an agency made up of weary bureaucrats and blasé field officers. The films are an extended pun on the alternate meaning of “alien”: immigrant. Far grimmer is “Prometheus,” the latest “Alien” movie; the series features an implacable foe that uses our bodies as nests for its young, and likes to chase us through hideous, dripping corridors while baring its hideous, dripping fangs.

Before the nineteenth century, if authors depicted the inhabitants of other planets the aliens were essentially human. The suave Saturnian described by Voltaire in a satirical 1752 story, “Micromégas,” looks like an earthling, except that he’s six thousand feet tall. (And he has a Continental spirit, keeping a mistress—a “pretty little brunette, barely six hundred and sixty fathoms high.”) The Saturnian’s primary fictional purpose, as he visits our planet, is to marvel at the relative puniness of humankind, whom he examines with a very large microscope.

It was only after Jean-Baptiste Lamarck’s and Charles Darwin’s theories of adaptation and natural selection gained wider acceptance, in the nineteenth century, that writers began to speculate in earnest about the sorts of creatures that might flourish in environments beyond Earth. According to Brian Stableford, writing in the Encyclopedia of Science Fiction, the definitive reference on the genre, Camille Flammarion was the first author to present a popular fictional portrait of truly alien life-forms. Flammarion was a French astronomer whose metaphysical interests, if he were pursuing them today, would be labelled New Age. (These beliefs damaged his scientific reputation, but they did lead to a friendship with Arthur Conan Doyle, who shared a fascination with spiritualism.) In 1864, Flammarion wrote a nonfiction book, “Real and Imaginary Worlds,” expressing his conviction that there was life on other planets, and eight years later he produced “Lumen,” a peculiar fictional work in which the title character, a scholar, relates the myriad wonders of the universe to a disciple.

“Lumen” belongs to the least congenial of literary genres: the philosophical dialogue. Vast swaths of it are given over to explanations of how Lumen, having died, has become a being of pure soul who is able to witness events in the past. Not only can he zoom in on choice historical figures and incidents on Earth; he can also see life on other worlds.

Eventually, Lumen’s gaze is directed to a distant planet called Virgo. Alien beings, he explains, “are the result of elements special to each globe, and of the forces which regulate them.” This observation aligns with Lamarck’s theory of adaptation and, by extension, with the serene rationality of French positivism. According to this pre-Darwinian notion of evolution, animals were thought to shape themselves to match their environments. Life worked its way up a hierarchical ladder of complexity, becoming more “advanced” with each rung; mankind was seen by many thinkers as standing at the top of the ladder.

Although this isn’t a theistic view of the universe, it is a stable, orderly, and knowable one, calling to mind the medieval belief that all creation is organized in ascending rank, from the grossest of matter all the way up to God himself. There’s something premodern, too, in Flammarion’s depiction of the creatures on Virgo. The aliens are a pell-mell combination of human features—rather like the mythical headless Blemmyes, whose faces, according to Pliny the Elder, were in their chests. Lumen’s aliens have three thumbs instead of five fingers, and three toes growing out of the heels of their feet; if there’s an adaptive reason for this, it is never explained. They have only one ear, “in the shape of a cone, which is placed on the upper part of the skull like a little hat.” They are without gender, reproducing “spontaneously.” Though they lack wings, they can fly.

As Lumen’s all-seeing eye zips around outer space, he spies mermanlike aliens swimming through a rose-colored ocean, a planet populated by “intelligent vegetable races,” and another where the inhabitants—“neither vegetables nor animals”—resemble mobile cacti. Flammarion was a reincarnation enthusiast, and on each planet Lumen locates his own incarnation among the natives, a conceit that allows the narrator to conjure what it’s like to be such strange creatures. Disappointingly, the aliens’ florid bodies are mere candy coatings; on the inside, they all have the sentimental morality of a nineteenth-century Frenchman. As a conehead, Lumen savors “fraternal confidences” with an “intimate friend.” On another planet, where Lumen inhabits a fantastical form that resembles a fig tree, he tenderly bestows a blossom from one of his own branches upon a grateful, leafy child.

Every alien society in “Lumen” offers a critique of life on Earth. By eliminating sex or nations or nepotism, each illustrates a finer, more peaceful and rational way of doing things. This is one of the oldest professions practiced by fictional characters: illustrating how humans ought to behave. Extraterrestrials, it turns out, are as good at that job as any of the bizarre races encountered by Lemuel Gulliver during his travels. These are not only aliens we can live with but aliens who can teach us how to live, since obviously we’re making a hash of things on our own. And if some extraterrestrials are perched even higher on the Lamarckian ladder than we are, why not give ourselves a boost by following their example?

Although the idea of aliens allowed writers like Flammarion to construct utopian fantasies, in others it prompted dark visions. In the nineteenth century, the thrilling possibility that we have company in the universe was, for most people, overshadowed by an existential crisis. It now seemed that, rather than being created by God, we probably just happened. With a slight change of circumstances, we could just as easily unhappen.

In France, this less comforting view of a universe filled with alien life was adopted by an enigmatic Belgian who wrote under the pseudonym J.-H. Rosny. Born Joseph Henri Honoré Boëx in 1856, he shared the Rosny pen name with his younger brother. The elder Rosny—a protégé of the writer and publisher Edmond de Goncourt—also wrote naturalistic novels, published a manifesto in Le Figaro attacking Émile Zola, and otherwise inhabited the role of fiery saloniste.

Rosny’s “scientific romances”—as the genre was called until the nineteen-thirties—won him the esteem of some French scientists, according to Danièle Chatelain and George Slosser, the translators of the recently published “Three Science Fiction Novellas: From Prehistory to the End of Mankind” (Wesleyan). Today, Rosny is best known as the author of the novel that is the basis for the 1981 film “Quest for Fire.” In the new collection’s bold introduction, Chatelain and Slosser champion the relatively obscure Rosny, over Jules Verne and H. G. Wells, as the true “father of hard science fiction”—a term used to describe narratives in which science, not human concerns, determines how the story unfolds. Rosny, they assert, was the first to attempt fiction in this “neutral, ahumanistic manner.”

Rosny’s stories have a stripped-down, lunar quality, and are subject to disorienting shifts in tone. His first alien yarn, titled “The Xipéhuz,” was published in 1887. It begins as a prehistoric adventure (a popular genre at the time), and is related in the solemn, archaic cadences of a fable. A wandering tribe on Earth comes across a clearing occupied by a “large circle of bluish, translucent cones,” each with a “dazzling star” near its base. Close by, the tribesmen spy “strata-like forms . . . somewhat like birch bark” and a few “nearly cylindrical” objects, all of which begin to “undulate.” These are the mysterious Xipéhuz. Suddenly, the aliens attack, killing the humans, in a hazily described manner that causes the victims to be “struck down as if by the sword of lightning.” Priests approach the Xipéhuz with offerings, acknowledging their status as gods, but that only results in more casualties.

Where do the Xipéhuz come from? Capable of shape-shifting from cone to strata to cylinder, they certainly seem otherworldly, but Rosny offers no explanation for their presence. In a story that he published two decades later, “The Death of the Earth,” the beleaguered remnants of humanity confront an even stranger species. In the distant future, Earth is racked by massive earthquakes and water shortages. In the wastelands beyond the few surviving settlements, a new life-form emerges: the ferromagnetics, sentient metallic beings that glow in the dark. (Rosny was big on bioluminescence.) Although the creatures are not manifestly hostile, they will vampirically leach the iron from the blood of any human who spends too much time around them. The hero, at the story’s conclusion, is the last human alive, and he decides to lie down among ferromagnetics so that a trace of his own species will be preserved in Earth’s inheritors.

In an introductory essay, Chatelain and Slosser praise the “transhumanity” of Rosny’s perspective, asserting that he tried “as hard as any writer can who uses words and addresses a human audience to decenter humankind, to make it part of a larger system of life in evolution.” Like Flammarion, Rosny was a species pluralist, and believed that human beings are no more entitled than any other creature to reign supreme. He would have felt right at home among the Men in Black.

So great were Rosny’s alien affinities that, when he wrote a novel of Mars exploration, “Navigators of Infinity” (1925), he had his narrator fall in love with a Martian female. A far cry from the bikini-clad babes who eventually turned up in pulp science fiction, Rosny’s Martian presents “the possibility of beauties perceptible to us and yet completely foreign to our environment and evolution.” Another hodgepodge of humanoid features, she has three legs, six eyes, and no nose or ears. Fortunately, the narrator is an eye man who has always considered the “soft protuberance of the mucus-producing nose” and the “ridiculous appendages of ears” unappealing. As for the Martians’ “nuptial caress,” it is “extraordinarily pure” and “somewhat immaterial.” Whatever that means.

Rosny’s Martians have reached the “decadent” stage in their species’ history. For all their grace and “greater abstract agility,” they lack initiative, and have let a mindless, pancake-shaped creature take over their habitat, resigning themselves to eventual extinction. Their leader tells the narrator, “Our forefathers knew that our race was bound to disappear. That no longer saddens us; we only wish to disappear without violence.” This melancholy vision of tragic refinement—of exquisite, enervated aliens overcome by the vigor of more primitive beings—seems very French but not very Darwinian. The story of a decaying empire, it’s more politics than biology.

But can the two be separated in a Darwinian universe? H. G. Wells didn’t bother to try in “The War of the Worlds.” Published in 1898 (and in print ever since), the book is written with the economy and the precision of the best journalism, which makes the terror and despair it conveys only more persuasive. Orson Welles’s radio adaptation of the novel, in the form of a mock news broadcast, shows a shrewd understanding of its effects.

You will find no nuptial caresses in this account of a Martian invasion of England. The narrator is kept apart from his wife for most of the action, and these Martians are definitely not the caressing kind. Like Rosny’s aliens, they are “advanced” creatures, but they’re hardly passive: they are the prototype for the rapacious octopoid aliens that abound in later science fiction, from the novellas of H. P. Lovecraft to modern films like “Independence Day.” Wells’s Martians reproduce via a kind of parthenogenesis, “just as young lilybulbs bud off.” Their repulsive, bulbous bodies consist mostly of brains. Sixteen “slender, almost whiplike tentacles” operate the sophisticated technology with which they mercilessly conquer the human race. The Martians’ machines are like the shells of mollusks: without them, the aliens’ bodies are vulnerable and ineffectual. At the time that Wells wrote his story, deep-sea explorers were making major discoveries, adding thousands of bizarre creatures to the Book of Life; the imprint of the aquatic is still felt in many fictional conceptions of aliens.

Although “The War of the Worlds” was the first great alien-invasion story, Wells was vamping on a popular genre called invasion literature: hypothetical fiction in which Europeans (usually Germans) use superior weaponry and sneak attacks to seize control of a complacent Britain. The initial impulse behind invasion literature was patriotic and militaristic. George Tomkyns Chesney, whose “The Battle of Dorking” kicked off the craze, in 1871, worried that Britain was neglecting its armed forces. It’s not difficult, however, to detect the guilty conscience of empire speaking through these nightmares of attack and subjugation.

The narrator of “The War of the Worlds” calls the arrival of the Martians “the great disillusionment,” an interplanetary bulletin delivering the bad news of humanity’s fragility and inconsequence. A “philosophical writer,” he has the misfortune of getting stuck for eight days in a claustrophobic hideout with a mentally disintegrating curate. This useless spokesman of religion can only wail over the betrayal of his faith. He asks, “Why are these things permitted? What sins have we done? What are these Martians?” The narrator pointedly responds, “What are we?”

Whether your preferred variety of exceptionalism is religious, ethnic, or species-based, the Martians are here to tear it down. The aliens feed on human blood, but after the narrator discovers this ghastly fact he muses that “an intelligent rabbit” would surely find our own carnivorous appetites equally appalling. Are the aliens really any worse than the imperial power they’ve chosen to attack? The Tasmanians, the narrator notes, “were entirely swept out of existence in a war of extermination waged by European immigrants.” There is a heavy, if unspoken, sense that the British are getting a taste of their own medicine.

Wells was a socialist and, for a while, a member of the Fabian Society—which is to say, a kind of optimist. But in this work, and in scientific romances to come, he offered little hope that humanity could peaceably coexist with extraterrestrials. According to Stableford, early British science-fiction writers were more prone than the French to picture the encounter between humans and aliens as a brutal clash from which only the fittest would emerge alive. This was, he implies, how Britons saw most social relations. Margaret Thatcher’s remark about there being no such thing as society comes to mind.

At the end of Wells’s novel, Britain is saved not by military prowess but by natural selection: the Martians succumb to a bacterial infection. They lack the resistance that humanity has acquired over millennia, an immunity that we have paid for with “the toll of a billion deaths.”

The narrator of Wells’s novel may describe the Martians as “the most unearthly creatures it is possible to conceive,” but he comes to suspect that they have descended from a species that was a lot like human beings. In other words, they aren’t doing anything to us that we haven’t done countless times to one another. Why should we anticipate anything different?

If catastrophe and hostility are what we’re expecting, our yearning for extraterrestrial contact seems perverse. The aggressive aliens that skittered, slithered, and oozed through the twentieth century were, to a remarkable degree, prefigured in the very first ones imagined in print. Exemplary aliens did enjoy a brief heyday in the dreamy nineteen-sixties, when they demonstrated new ways of thinking about religion (Robert A. Heinlein’s “Stranger in a Strange Land,” 1961) and gender (Ursula K. Le Guin’s “The Left Hand of Darkness,” 1969). But the majority of outer-space creatures have been like Wells’s Martians: up to no good. For every kindly E.T., there must be a dozen fiendish Body Snatchers. These aliens may not all be made in the image of their creators, but each one is a child of our psyche. We go on staring, Lumen-like, into the farthest reaches of the cosmos. What we most often find out there is a reflection—and it’s not a pretty sight. ♦

Laura Miller, the author of “The Magician’s Book: A Skeptic’s Adventures in Narnia,” is a books and culture columnist for Slate.