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 in the 2000s thanks to the acclaim surrounding Firefly and Cowboy Bebop.
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 spun-off media as novels, video games and ongoing produced TV adaption based on books by Dan Abnett. They often consider and view an interstellar war and oppression of galactic empire as backdrop with focus on lone gunslinger 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 late 1990s, anime series such as Cowboy Bebop and Trigun, which differs from most space westerns by taking place entirely on one planet, that planet just happening to not be Earth, became prime examples of the genre. Mecha anime and manga like Saber Rider and the Star Sheriffs and Voltron, manhua like Cyber Weapon Z and Dimension W, also are very popular and has significant influence over the genre.
Games such as StarCraft, Fallout series, Borderlands series and The Outer Worlds have also popularized the space Western theme. Shows such as Westworld, Farscape, The Mandalorian, The Expanse and Firefly won critical acclaim, further causing a critical reassessment of space Westerns. Movies like The Chronicles of Riddick, Solo: A Star Wars Story and Rogue One: A Star Wars Story also have continued the space Western theme.