Science fantasy is a hybrid genre within speculative fiction that simultaneously draws upon or combines tropes and elements from both science fiction and fantasy. In a conventional science fiction story, the world is presented as being scientifically logical; while a conventional fantasy story contains mostly supernatural and artistic elements that disregard the scientific laws of the real world. The world of science fantasy, however, is laid out to be scientifically logical and often supplied with hard science-like explanations of any supernatural elements.
During the Golden Age of Science Fiction, the fanciful science fantasy stories were seen in sharp contrast to the terse, scientifically plausible material that came to dominate mainstream science fiction typified by the magazine Astounding Stories. Although at this time, science fantasy stories were often relegated to the status of children's entertainment, their freedom of imagination and romance proved to be an early major influence on the "New Wave" writers of the 1960s, who became exasperated by the limitations of "hard" SF.
Distinguishing between pure science fiction and pure fantasy, Rod Serling claimed that the former was "the improbable made possible" while the latter was "the impossible made probable". As a combination of the two, science fantasy gives a scientific veneer of realism to things that simply could not happen in the real world under any circumstances. Where science fiction does not permit the existence of fantastical or supernatural elements, science fantasy explicitly relies upon them to complement the scientific elements.
In explaining the intrigue of science fantasy, Carl D. Malmgren provides an intro in regards to C.S. Lewis's speculation on the emotional needs at work in the subgenre: "In the counternatural worlds of science fantasy, the imaginary and the actual, the magical and the prosaic, the mythical and the scientific, meet and interanimate. In so doing, these worlds inspire us with new sensations and experiences, with [quoting C.S. Lewis] 'such beauty, awe, or terror as the actual world does not supply', with the stuff of desires, dreams, and dread."
The label first came into wide use after many science fantasy stories were published in the American pulp magazines, such as Robert A. Heinlein's Magic, Inc., L. Ron Hubbard's Slaves of Sleep, and Fletcher Pratt and L. Sprague de Camp's Harold Shea series. All were relatively rationalistic stories published in John W. Campbell, Jr.'s Unknown magazine. These were a deliberate attempt to apply the techniques and attitudes of science fiction to traditional fantasy subjects. The Magazine of Fantasy and Science Fiction published, among other things, all but the last of the Operation series, by Poul Anderson.
Henry Kuttner and C. L. Moore published novels in Startling Stories, alone and together, which were far more romantic. These were closely related to the work that they and others were doing for outlets like Weird Tales, such as Moore's Northwest Smith stories.
Ace Books published a number of books as science fantasy during the 1950s and 1960s.
The Encyclopedia of Science Fiction points out that as a genre, science fantasy "has never been clearly defined", and was most commonly used in the period 1950–1966.
The Star Trek franchise created by Gene Roddenberry is sometimes cited as an example of science fantasy. Writer James F. Broderick describes Star Trek as science fantasy because it includes semi-futuristic as well as supernatural/fantasy elements such as The Q. According to the late science fiction author, Arthur C. Clarke, many purists argue that Star Trek is science fantasy rather than science fiction because of its scientifically improbable elements, which he partially agreed with.
The Star Wars franchise has been debated as science fantasy. In 2015, George Lucas stated that "Star Wars isn't a science-fiction film, it's a fantasy film and a space opera".