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.
H. G. Wells's The War of the Worlds, depicting Martians invading Earth, is one of the most influential works of science fiction.
A Plunge into Space, an 1890 piece of utopian fiction set on Mars
Orson Welles interviewed by reporters after his 1938 radio adaptation of The War of the Worlds caused a panic.
Klaatu, the Martian who visits Earth in the 1951 film The Day the Earth Stood Still
During the late 19th and early 20th centuries, it was erroneously believed that there were "canals" on the planet Mars. These were a network of long straight lines in the equatorial regions from 60° north to 60° south latitude on Mars, observed by astronomers using early telescopes without photography.
This is a modern ground-based telescope picture of Mars which uses lucky imaging to achieve a near perfect theoretical resolution. However, due to astronomical seeing, it is extremely difficult to see finer details.
Martian canals depicted by Percival Lowell