In fiction, religion is often cast as technology’s dark other: irrational, tradition-bound, and baroquely complex. Speculative fiction writers can’t look away. If technology represents humanity’s transcendence through reason, religion implies its eternal submission to mystical entities. But SFF tends to be conflicted about its imaginary religions. Fictional religions are often anti-science, they attract charlatans, they prey on ignorance—and yet there’s usually a kernel of real mystery at their heart, and the workings of the religion are often the coolest things about a book. Perhaps it’s no surprise. After all, sci-fi and fantasy writers create entire worlds; many of them feel that no imaginary world would be complete without an imaginary religion.

Here are five of my favorites.

Lovecraft’s bizarre cult of Louisiana yokels worshipping a malevolent, vaguely reptilian alien is the most influential imaginary religion, with the possible exception of Frank Herbert’s space Islam. This is religion at its anti-humanist extreme: the veneration of a being sublimely indifferent to anything of merely human scale. The most disturbing aspect of the tale, to me, is Lovecraft’s evocation of a religion without even a shred of hope for an afterlife or salvation. Just to know that Great Cthulhu “waits dreaming” is enough…

Gene Wolfe, The Book of the Long Sun

Leave it to Wolfe to create the most complex and profound imaginary religion. In fact there are not one but two religions in the world of the gigantic generation spaceship on which Wolfe’s tetralogy takes place. (The “long sun” of the title refers to the glowing strip that provides illumination for the residents of this Massachusetts-sized starfarer.) The first religion takes the form of a kind of Greek pantheon based on the archived personalities of the family of the tyrant who originally built the ship. The second is centered on a mysterious god known as “the Outsider.” Given what we know about Wolfe’s own Catholic faith, the book presents us with a classically Wolfean paradox. Do the beliefs and rituals that slowly grow up around The Outsider constitute an imaginary religion with a real god?

Alastair Reynolds, Absolution Gap

Reynolds is one of the best world-builders in sci fi, and what he captures best is the look of history. Too many writers create streamlined technological worlds. They forget the strange thing called the past, which causes the objects and practices of a culture to rise from primordial time like stalagmites. The functions of a realistic imagined world’s things should come encrusted with the husks of previous technological stages, earlier cultures, obsolete knowledges. In this novel Reynolds brings us to the ice planet Hela, where we encounter a train of massive vehicles known as Cathedrals, which endlessly circle the planet, tracking the movement of a mysterious—and occasionally disappearing—gas giant across the sky. Gradually we learn the history of these fantastic Cathedrals and the religion they support, which, in fine baroque space opera fashion, involves indoctrination viruses, alien cloaking technology, and a mad genius founder.

Ok, this religion is only partly imaginary. Atwood’s dystopian future society does worship Jesus. But the land of Gilead mixes its Christianity with a proto-steampunk fetish for Victorian times, a patriarchal communism (“from each according to her ability, to each according to his needs”), and a completely unhinged attitude towards sex. When it’s impregnation time, for example, the wife holds the handmaiden’s hands as the latter’s field is plowed by the elderly master on a giant canopy bed. While this novel clearly takes aim at the Evangelical movement of the nineteen eighties, the weird touches Atwood adds to her imaginary religion betray that fascination with religion’s uncanny logic that partially seduces even the sternest critic of faith.

Neal Asher, Dark Intelligence

There are two basic ways to be against religion. You can think religion is bad because it holds humans back from fulfilling their great potential. Or you can think religion is bad because it shows how humans are bad, petty, deluded creatures, incorrigibly prone to doing very stupid things. Asher is the second kind of anti-religion writer. The utopian side of his Polity universe is ruled by benign A.I.’s. The dark side, explored by this novel, takes place in a demilitarized zone between the AI and human Polity, and a voracious, warmongering empire of giant alien insects known as the Prador. A kind of religion has sprung up among some of the human inhabitants of this zone, focused on worshipping and imitating the Prador. Adherents engage in incredibly costly and debilitating body modification surgery to look more like the beings they imitate, and flock to a world rumored to contain a buried Prador ship. The Prador themselves, meanwhile, absolutely loathe all humans, and delight in killing them. A subplot shows the benevolent AI’s trying to save some of the Prador worshippers from the murderous instincts of their gods. If you’ve always kind of thought that Jonathan Edwards’ “Sinners in the Hands of an Angry God” was a great sci fi premise, then Asher is the writer for you.

Michael W. Clune’s new book exploring a childhood shaped by computer games, Gamelife, is out from Farrar, Straus and Giroux. His memoir White Out: The Secret Life of Heroin was chosen as a “Best Book of 2013” by The New Yorker, NPR’s “On Point,” and other venues.