Darwin among the Machines

"Darwin among the Machines" is an article published in "The Press" newspaper on 13 June 1863 in Christchurch, New Zealand, which references the work of Charles Darwin in the title. Written by Samuel Butler but signed "Cellarius" (q.v.), the article raised the possibility that machines were a kind of "mechanical life" undergoing constant evolution, and that eventually machines might supplant humans as the dominant species:
The article ends by urging that, "War to the death should be instantly proclaimed against them. Every machine of every sort should be destroyed by the well-wisher of his species. Let there be no exceptions made, no quarter shown; let us at once go back to the primeval condition of the race."
"Book of the Machines".
Butler developed this and subsequent articles into "The Book of the Machines", three chapters of "Erewhon", published anonymously in 1872. The Erewhonian society Butler envisioned had long ago undergone a revolution that destroyed most mechanical inventions. The narrator of the story finds a book that details the reasons for this revolution, which he translates for the reader. In 
chapter xxiii: the book of the machines, a number of quotes from this imaginary book discuss the possibility of machine consciousness:
Later, in chapter xxiv: the machines—continued, the imaginary book also discusses the notion that machines can "reproduce" like living organisms:
This notion of machine "reproduction" anticipates the later notion of self-replicating machines, although in chapter xxv: the machines—concluded, the imaginary book supposes that while there is a danger that humans will become subservient to machines, the machines will still need humans to assist in their reproduction and maintenance:
The author of the imaginary book goes on to say that while life under machine rule might be materially comfortable for humans, the thought of the human race being superseded in the future is just as horrifying to him as the thought that his distant ancestors were anything other than fully human (apparently Butler imagines the author to be an Anti-evolutionist), so he urges that all machines which have been in use for less than 300 years be destroyed to prevent this future from coming to pass:
Erewhonian society came to the conclusion "...that the machines were ultimately destined to supplant the race of man, and to become instinct with a vitality as different from, and superior to, that of animals, as animal to vegetable life. So... they made a clean sweep of all machinery that had not been in use for more than two hundred and seventy-one years..." (from 
chapter ix: to the metropolis.)
Despite the initial popularity of "Erewhon", Butler commented in the preface to the second edition that reviewers had "in some cases been inclined to treat the chapters on Machines as an attempt to reduce Mr. Darwin’s theory to an absurdity." He protested that "few things would be more distasteful to me than any attempt to laugh at Mr. Darwin", but also added "I am surprised, however, that the book at which such an example of the specious misuse of analogy would seem most naturally levelled should have occurred to no reviewer; neither shall I mention the name of the book here, though I should fancy that the hint given will suffice", which may suggest that the chapter on Machines was in fact a satire intended to illustrate the "specious misuse of analogy", even if the target was not Darwin; Butler, fearing that he had offended Darwin, wrote him a letter explaining that the actual target was Joseph Butler's 1736 "The Analogy of Religion, Natural and Revealed, to the Constitution and Course of Nature". The Victorian scholar Herbert Sussman has suggested that although Butler's exploration of machine evolution was intended to be whimsical, he may also have been genuinely interested in the notion that living organisms are a type of mechanism and was exploring this notion with his writings on machines, while the philosopher Louis Flaccus called it "a mixture of fun, satire, and thoughtful speculation."
"Evolution of Global Intelligence".
George Dyson applies Butler's original premise to the artificial life and intelligence of Alan Turing in Darwin Among the Machines: The Evolution of Global Intelligence (1998) , to suggest that the internet is a living, sentient being.
Dyson's main claim is that the evolution of a conscious mind from today's technology is inevitable. It is not clear whether this will be a single mind or multiple minds, how smart that mind would be, and even if we will be able to communicate with it. He also clearly suggests that there are forms of intelligence on Earth that we are currently unable to understand.
From the book: "What mind, if any, will become apprehensive of the great coiling of ideas now under way is not a meaningless question, but it is still too early in the game to expect an answer that is meaningful to us."
Later works continuing the theme.
The theme of humanity at war or otherwise in conflict with machines is found in a number of later science fiction creative works: