The space western is a genre of science fiction, most often found on television, which transposes elements of the western genre of fiction into outer space. Some common elements in space westerns that are drawn from the western genre include exploring a lawless "frontier," gunslinging, encounters with primitive, spiritual "natives," etc.
The most iconic space western is of course the original Star Trek series, which opens with the phrase "Space...the final frontier" and which creator Gene Roddenberry originally pitched to studios as a "Wagon Train to the stars," after the popular Western television series Wagon Train.
The Star Wars series of films also draws heavily on the canon of western tropes, such as its repurposing of the classic western saloon scene in the Mos Eisley Cantina, Han Solo's dress and lone gunslinger persona, and the appearance of bounty hunters such as Boba Fett.
Other examples of the space western genre, such as the cartoons The Adventures of the Galaxy Rangers and BraveStarr, and the television series Firefly, draw even more overtly from the Western genre, including six-shooters, stetsons, and horses.
A counterpart to the space western is the science fiction western, which transposes elements from science fiction into traditional American West settings.