Space Western is a subgenre of science fiction that uses the themes and tropes of Westerns within science-fiction stories. Subtle influences may include exploration of new, lawless frontiers, while more overt influences may feature literal cowboys in outer space who use rayguns and ride robotic horses. Although initially popular, a strong backlash against perceived hack writing caused the genre to become a subtler influence until the 1980s, when it regained popularity. A further critical reappraisal occurred during the 2000s due to critical acclaim for Firefly.
A space Western typically emphasizes space exploration as "the final frontier". These Western themes can be explicit, such as cowboys in outer space, or they can be a more subtle influence in space opera.: 3–4 Gene Roddenberry described Star Trek: The Original Series as a space Western (or, more poetically, as "Wagon Train to the stars"). Firefly and its cinematic follow-up Serenity literalized the Western aspects of the genre popularized by Star Trek: it used frontier towns, horses, and the styling of classic John Ford Westerns. Worlds that have been terraformed may be depicted as presenting similar challenges as that of a frontier settlement in a classic Western. Six-shooters and horses may be replaced by ray guns and rockets. The term is often synonymous with "science fiction western". The idea is that the vast distances of space have formed barriers, forcing people to become independent or even restricted. Popular themes within the genre are new frontiers in the galaxy and trying to "control" the vast expanse of space. The stories focus on the hardship and adventure of the unexplored space frontier.
Space Westerns intertwine with space opera and military science fiction and is generally placed within the science fictional space warfare sub-genre thematic. Specifically written space Western fiction, movies and TV series are often based on such established space opera franchises with respective expanded universes of Star Wars and Star Trek and the military science fiction miniature war game Warhammer 40,000, which has spawned spin-off media such as novels, video games and an ongoing TV adaptation based on books by Dan Abnett. They often consider and view an interstellar war and oppression of a galactic empire as a backdrop, with a focus on lone gunslingers in space wielding a raygun with fantastic fictional technologies in a futuristic space-frontier setting.
Westerns influenced early science-fiction pulp magazines. Writers would submit stories in both genres, and science-fiction magazines sometimes mimicked Western cover art to showcase parallels. In the 1930s, C. L. Moore created one of the first space Western heroes, Northwest Smith. Buck Rogers and Flash Gordon were also early influences. After superhero comics declined in popularity in 1940s United States, Western comics and horror comics replaced them. When horror comics became untenable with the Comics Code Authority in the mid-1950s, science-fiction themes and space Westerns grew more popular.: 10 By the mid-1960s, classic Western films fell out of favor and Revisionist Westerns supplanted them. Science-fiction series such as Lost in Space and Star Trek presented a new frontier to be explored, and films like Westworld rejuvenated Westerns by updating them with science-fiction themes. Peter Hyams, director of Outland, said that studio heads in the 1980s were unwilling to finance a Western, so he made a space Western instead. Space operas such as the Star Wars film series also took strong cues from Westerns; Boba Fett, Han Solo and the Mos Eisley cantina, in particular, were based on Western themes. George Lucas attributes the character of Boba Fett to the Man with No Name in the DVD commentary on The Empire Strikes Back. Han Solo's original costume and charming rogue gunslinger mannerisms also reflects the Western's influence on Star Wars. These science fiction-films and television series offered the themes and morals that Westerns previously did.
This frontier view of the future is only one of many ways to look at space exploration, and not one embraced by all science-fiction writers. The Turkey City Lexicon, a document produced by the Turkey City science-fiction writers' workshop, condemns the space Western as the "most pernicious" form of a pre-established background that avoids the necessity of creating a fresh world. Galaxy Science Fiction ran an advertisement on its back cover, "You'll never see it in Galaxy", which gave the beginnings of make-believe parallel Western and science-fiction stories featuring a character named Bat Durston. The genre of space Westerns has been informally—and often derisively—known as "Bat Durston" stories since. Such scathing attacks on the subgenre, along with further attacks on space operas, caused a perception that all space Westerns were by definition hack writing and not "true" science fiction. Although the underlying themes remained influential, this bias persisted until the 1980s, when the release of the film Outland and children's cartoons such as BraveStarr and The Adventures of the Galaxy Rangers re-popularized explicit themes of cowboys in space. BraveStarr chronicles the adventures of the Space Marshal, as he seeks to uphold law and order in the 23rd century. The opening trailer of The Adventures of the Galaxy Rangers shows Texas Rangers-like heroes riding across a prairie landscape on robotic horses. Spaceships and sixguns both feature prominently throughout. In the 1990s, Japanese manga and anime series such as Trigun (1995 debut), Outlaw Star (1996 debut) and Cowboy Bebop (1997 debut) explored the genre. Several years later, Firefly won acclaim, further causing a critical reassessment of space Westerns.
Games such as StarCraft, the Fallout series, The Outer Worlds, and the Borderlands series have also popularized the space Western theme. Films like The Chronicles of Riddick have continued the space Western theme.