In 1816, a teenager began to compose what many view as the first true work of science fiction — and unleashed one of the most subversive attacks on modern science ever written. Eighteen-year-old Mary Godwin (as she then was) had the idea for Frankenstein, or The Modern Prometheus that summer, while at the Villa Diodati on Lake Geneva in Switzerland, with her lover and future husband Percy Bysshe Shelley, and his friend and fellow poet Lord Byron. Forced inside by stormy weather, the group spent wild evenings telling ghost stories, while Byron's personal physician, the brilliant 20-year-old John William Polidori, regaled them with reports of the latest developments in medical science.

Mary Shelley, painted around 1840 by Richard Rothwell and housed in the National Portrait Gallery. Credit: Photo: Tarker/Bridgeman Images

Mary's inventive mind was peculiarly primed to grapple with both literary and scientific controversy. Her mother was the feminist writer Mary Wollstonecraft, who had died from complications after Mary's birth. Her father was anarchist philosopher and novelist William Godwin, whose friends included chemists and pioneering electricity researchers Humphry Davy and William Nicholson, and the opium-addicted poet Samuel Taylor Coleridge. These influences shaped her youthful thinking, and were encouraged by Shelley, who had dabbled in science at the University of Oxford before being thrown out for atheism.

Gothic drama

The myth of Victor Frankenstein, the crazed but idealistic young scientist who unwittingly lets loose his monstrous creation and struggles to accept responsibility, is a heady cocktail of gothic melodrama and disturbing speculation. It has proved astonishingly adaptable. The first theatrical version, Presumption: or the Fate of Frankenstein, opened at the English Opera House in London in 1823, to huge audiences and scandalous publicity (“Do not take your wives, do not take your daughters, do not take your families”). Mary Shelley attended, noting that “in the early performances all the ladies fainted and hubbub ensued!” There have been more than 90 dramatizations since, including the Danny Boyle-directed 2011 production at London's National Theatre, which opened with the Creature dropping naked from a huge, pulsating artificial womb. The story has also been adapted for more than 70 films, including James Whale's iconic 1931 Frankenstein starring Boris Karloff. In May this year, a Frankenstein ballet was staged at the Royal Opera House in London. Choreographer Liam Scarlett shrewdly analysed it as a love story: “The Creature is like an infant. He's desperately seeking a parent or loved one to take him through the world.”

Frankenstein's monster in the book's 1831 edition; played by Boris Karloff in 1931; and in a 2016 ballet. Credit: Top: Illustration: Theodore Von Holst/Photo: The British Library Board, 11660.e.39.; Middle: Universal/The Kobal Collection; Bottom: Bill Cooper/ROH 2016

Although the myth is well known, the original novel is not. There are three versions. Mary Shelley began to write the first, probably as a short story, in two notebooks at Villa Diodati, expanding it during the winter of 1816–17 in simple direct prose of great intensity (the notebooks remained unpublished until 2008). The second, lightly edited by her husband and more literary in manner, was published in 1818. The third was radically revised by Mary Shelley alone, and was published in 1831, with a fascinating new introduction by her.

With each version, the basic plot remains the same, but the tone grows darker. Frankenstein becomes more passionate and ambitious, his science becomes more sinister and misdirected (“I felt as if my soul were grappling with a palpable enemy”) and his Creature becomes more alienated and agonized. The 1831 introduction also contains an inventive, retrospective account of the storytelling competition at the villa. Mary now calls the book her “hideous progeny”, and claims that the whole idea came to her instantly, like an emotional bolt of summer lightning on waking from a terrible nightmare. “I saw — with shut eyes but acute mental vision — I saw the pale student of unhallowed arts kneeling beside the thing he had put together. I saw the hideous phantasm of a man stretched out, and then, on the working of some powerful engine, show signs of life, and stir with an uneasy, half vital motion.”

The book may, however, have had a more intellectual genesis. The best contemporary account of the ghost-story competition is Polidori's. A medical graduate of the University of Edinburgh, he had written his doctoral thesis on sleepwalking. Before the trip, he was commissioned by the publisher John Murray to keep a secret journal of Byron's adventures, and in this he recorded the villa party's speculative conversations and reading of German gothic “horror tales”. Above all, he noted their wide-ranging discussions of fundamental scientific principles, and whether the human body “was thought to be merely an instrument”. As Polidori put it, their brains “whizzed”.

Science fact

Polidori would have known about recent experiments in electrical resurrection techniques by Italian physicist Giovanni Aldini (nephew of bio-electrician Luigi Galvani), and the new anatomical theories of German physiologists such as Johann Friedrich Blumenbach. Also making waves were the fierce 'vitalist' debates at England's Royal College of Surgeons between John Abernethy and William Lawrence, about the possible existence of an electrical 'life-force' and the unique nature of human consciousness. These controversial ideas, alive in the great universities and research centres of Europe, fed into Frankenstein, and especially into the moral issues that it raised about the perils of scientific interference with nature.

Thus began a writing process involving careful research over many months. Shelley first mentions this in her journal for 24 July 1816. She was in Switzerland while walking above Chamonix towards Mont Blanc, absorbing the bleak landscape of the Mer de Glace glacier that would later fill the book's central confrontation between scientist and Creature. “Nothing can be more desolate than the ascent of this mountain ... we arrived wet to the skin ... I write my story”. Her notes on triumphantly completing the first draft, “Transcribe and correct F[rankenstein] ... Finish transcribing” do not appear until April and May 1817, just four months before the birth of her third child, Clara. It is no accident that metaphors of pregnancy, birthing and parentage suffuse this novel about the creation of life.

Streams of influence

In the intervening period of composition, back in England, Mary Shelley's journal reveals an impressive reading list. She absorbed the extreme accounts of polar exploration in George Anson's 1748 Voyage Round the World; the distinction between alchemy and chemistry in Davy's 1812 Elements of Chemical Philosophy (based on his famous London lectures); and the new concepts of brain development explored in Lawrence's physiological lectures, given in 1816–17. In Coleridge's 1798 poem Rime of the Ancient Mariner, she encountered the psychology of guilt and abandonment; in John Milton's 1667 Paradise Lost, the theme of the demonic outcast. Her husband also made clear, in his anonymous preface to the 1818 edition, that they had discussed the scientific poetry of Erasmus Darwin, in The Temple of Nature, or The Origin of Society (1803). Everything she devoured was brilliantly recast as a new genre: science fiction.

Thus, Davy's lectures at London's Royal Institution were subtly transposed, sometimes almost phrase by phrase, into those of the fictional Dr Waldman, praising the work of contemporary scientists to young Frankenstein. “These philosophers ... penetrate into the recesses of nature, and show how she works in her hiding places. They ascend into the heavens; they have discovered how the blood circulates, and the nature of the air we breathe. They have acquired new and almost unlimited powers; they can command the thunders of heaven, mimic the earthquake, and even mock the invisible world with its own shadows.”

From her first draft, Mary had devised a complex structure that nests three autobiographical narratives one within the other like Russian dolls, each bringing a different interpretation to the Frankenstein myth. The first, often overlooked in adaptations, is by polar explorer Robert Walton. Told in the form of letters to his sister, it bookends the novel in the Arctic Ocean, and presents a moral enigma. Is the idealistic young Frankenstein essentially philanthropic, blindly ambitious or simply insane? And is his Creature evil or innocent — an ugly outcast or a persecuted victim longing for love?

The early chapters evoke the mysteries of experiment, naive excitement about electrical kites and the fascination of air pumps.

The second autobiography is Frankenstein's own, particularly his thrilling discovery of the deep “enticements of science”. These early chapters are among the first fictional presentations of the education of a young scientist, evoking the mysteries of experiment, naive excitement about electrical kites and the fascination of air pumps. Brilliantly transformed in the 1831 edition, these become more sophisticated references to galvanism, the necessity of mathematics, the genius of Isaac Newton and the intoxicating delights and dangers of charismatic science lecturing.

The third narrative, dramatically held back until halfway through, is the Creature's. Written in a wholly different stylistic register, it swings violently between desperate exclamations, poignant appeals and furious menacings. In the great showdown with Frankenstein on the Mer de Glace, the Creature begs the scientist to delve further into experimentation to create a female companion whom he can love.

Faced with this terrible ethical dilemma, Frankenstein agrees: this second creation scene, in a secret laboratory on the Orkney Islands off northeast Scotland, is also often overlooked. Fearful of the consequences, he destroys his female creation at the last moment, turning the disappointed Creature into a vengeful demon. So emerges the central drama of the novel. It is not merely the creation of life itself, the technical ambition of science, that is called into question. It is the unfolding moral choices and unforeseen ethical responsibilities that may come with scientific advances: artificial intelligence or artificial life, nuclear power or nuclear weaponry, the genome sequence or invasive genetic editing.

One added irony makes Shelley's novel much greater than any film — and greater indeed than its popular interpretation as an anti-science myth. It is that in these exchanges, paradoxically, the Creature becomes even more expressive and human than Frankenstein. He produces arias of speech, begging for justice, understanding, compassion and human rights. In the encounter in the Alps, the Creature declares himself Frankenstein's unique responsibility: “I ought to be thy Adam, but I am rather the fallen angel, whom thou drivest from joy for no misdeed ... Every where I see bliss, from which I alone am irrevocably excluded ... Misery made me a fiend. Make me happy, and I shall again be virtuous.”

That is the enduring youthful genius and imaginative generosity of Mary Shelley's Frankenstein. It proclaims that the alien, the outcast, the rejected, finally must have claims on our humanity. And claims on our science, too.