Mars, the fourth planet from the Sun, has appeared as a setting in works of fiction since at least the mid-1600s. Trends in the planet's portrayal have largely been influenced by advances in planetary science. It became the most popular celestial object in fiction in the late 1800s, when it became clear that there was no life on the Moon. The predominant genre depicting Mars at the time was utopian fiction. Around the same time, the mistaken belief that there are canals on Mars emerged and made its way into fiction, popularized by Percival Lowell's speculations of an ancient civilization having constructed them. The War of the Worlds, H. G. Wells's novel about an alien invasion of Earth by sinister Martians, was published in 1897 and went on to have a major influence on the science fiction genre.
Life on Mars appeared frequently in fiction throughout the first half of the 1900s. Apart from enlightened as in the utopian works from the turn of the century, or evil as in the works inspired by Wells, intelligent and human-like Martians began to be depicted as decadent, a portrayal that was popularized by Edgar Rice Burroughs in the Barsoom series and adopted by Leigh Brackett among others. More exotic lifeforms appeared in stories like Stanley G. Weinbaum's "A Martian Odyssey".