Follow TV Tropes

Following

Deus Ex Machina / Literature

Go To

By Author:

  • Richard Adams:
    • Watership Down has the rabbit protagonist saved by a human girl in one of the final chapters (appropriately named "Dea Ex Machina"). Whether this is a true Deus Ex Machina is debatable, because the event is very logical from a human point of view, if not from a rabbit's.
      • The "Dea Ex Machina" chapter title reveals a further pun when the human savior arrives in a car—seeming to the rabbit literally a "goddess in a machine."
      • A similar example comes earlier in the book, when the heroes cross train tracks safely, but their pursuers aren't so lucky. The rabbits take it for a literal Act of Frith (god), one unironically says something like, "You might think it's amazing to be saved by Frith, but it's really quite terrifying."
    • If you thought that was an example, you have no idea what Adams is capable of. The first print of his third book, The Plague Dogs ends as the notorious film does, and the exhausted, starved, broken dogs plunge into the sea ahead of their hunters, and swim out in the vain hope of finding an island they've convinced themselves lies just over the horizon. In all subsequent editions of the book, the reader persuades Adams to do an Ass Pull and he does: two of Adams friends come by in a boat (while having a conversation about Watership Down and anthropomorphism, no less) to pluck them from the sea and bring them back to the shore where the dogs owner (wounded instead of killed by the accident) is waiting.
  • Beginning with the novel Sahara, author Clive Cussler has often written his heroes into impossible situations, whereupon a minor character shows up and gives them the assistance they need to continue — a minor character by the name of Clive Cussler!
    • Granted, it's never an enormous Deus Ex Machina; usually just Cussler serving to get the plot back on the rails, usually by providing the heroes with direction or transportation. Also, the practice of Cussler writing himself into his books actually began with Dragon, though it wasn't until Sahara that he began interfering in an important way.
    • A lot of the ridiculous gadgets and technologies that can be accessed from anyone on earth and from anyone who owns them in a matter of hours is a bit of a consistent Deus Ex Machina. In Golden Buddha, for example, the Oregon is facing a couple of Chinese warships, so they just call in favors from an American submarine nearby that has on board a super-high-tech, top-secret missile that blasts a huge EMP to disable the warships.
    • The entire Oregon Files series centers around the ship which is nothing more than a giant floating Deus Ex Machina. Able to blow apart battle ships from various navies without blinking, a propulsion system that the second law of thermodynamics frowns at, armor that shrugs off almost anything thrown at it, a captain's barge that is essentially an Oregon Lite. It shows up just in the nick of time to save the away team or the captain's love of the week with just the right weapon to blow the bad guys to Davey Jones.
  • Cory Doctorow loves this trope. In Little Brother, the protagonist is being waterboarded and the cavalry rush in to save the day, in Someone Comes to Town, Someone Leaves Town, the protagonist's flying girlfriend whisks him away from danger to a desert island and, in Eastern Standard Tribe, the protagonist just happens to become friends with a doctor at the asylum he is in who can and will free him.
  • Greg Egan often uses characters motivated by religion (or other emotion-heavy ideology) to pop in, advance the plot by a sudden, violent action and never come back again. The most jarring example are the anachronauts from Schild's Ladder, who show up in the novel's climax to blow up the research ship. They are only mentioned twice before, never shown to have any specific agenda, and their actions have no lasting consequences beyond isolating the two main characters to continue exploration on their own.
  • Anything by Simon R. Green, especially his Deathstalker series, lives and sustains itself on this trope. All of the heroes' asses must be sore from pulling plot devices and powers out of them.
  • Various gods interfere in the affairs of men all over the place in Homer's epics The Iliad and The Odyssey, often to save heroes they favour, especially Odysseus and Telemachus in the latter epic. The most egregious example in the Iliad is probably the duel between Menelaus and Paris, where Menelaus has Paris at his mercy only to have Aphrodite spirit him away, while in the final book of the Odyssey the intervention of Zeus himself defuses and ends the confrontation between Odysseus' family and the relatives of the dead suitors after just one man is killed.
  • Stephen King:
    • The Dark Tower (2004): Relying on the conceit that King himself was the author and an active character, there are several instances in which King throws a bone to the characters to get them out of a sticky situation, such as when he saves everyone from Dandelo. In one Lampshade Hanging moment, a character finds a note from King reading "DON'T WORRY; HERE COMES THE DEUS EX MACHINA!"
    • The Stand, which inspired a limerick:
      Oh, the Superflu caused so much pain, oh!
      And with evil a raging volcano
      Flagg's triumph seemed certain
      Until King rang the curtain
      By pulling a Deus ex ano!
    • Discussed in Misery with reference to a Cliffhanger Copout. When Annie forces him to write another novel in a series he had ended by killing the protagonist, Paul Sheldon is forced to write a continuation that isn't one of these. The story references that Annie is familiar with, and hates this trope, and Paul needs to write the character back to life in a way that makes sense. He manages to cheat a little with Not Quite Dead, but the story ends up better for it.
  • J. R. R. Tolkien occasionally uses Giant Eagles to whisk his heroes away from danger. These aren't just at the end of The Lord of the Rings, but show up in The Hobbit to rescue dwarves from burning trees that are surrounded by wolves, to tip the scales in the book's great battle, and in Rings to rescue Gandalf from the roof of the Tower of Orthanc as well. Tolkien seems to have been unable to resolve the issue of characters marooned on top of high things as well as unable to resist putting them there. Whether these are a Deus Ex Machina is often debated:
    • Tolkien called them a dangerous machine that he dared not use often with credibility. He thought them a deus ex machina, though in the books he justified them better.
    • Bored of the Rings had one of them stamped with "Deus Ex Machina Airlines."
    • At another point in "Bored" Legolam suggests "Isn't it time for a Deus Ex Machina?" With a flash and a bang, Goodgulf emerges from the trees in a white suit, newly returned from the dead.
    • Common objections: The Eagles' place in Middle-Earth's greater cosmology that's All There in the Manual, Gandalf being a wizard and getting this sort of thing as a perk, defining Deus Ex Machina to play a crucial role in the quest when, in Rings, the quest was completed on the main characters' own power and getting out of Mordor alive was no part of it.
    • Throughout The Silmarillion various characters are, like in LOTR, saved from almost certain death by a convenient Eagle, although here there is the explanation of it being literal; the Vala Ulmo (basically a god) teamed up with the Eagle Thorondor to aid the people of Beleriand against Morgoth, but due to the rest of the Valar shunning Beleriand Ulmo can only intervene in limited ways. Most of the novel is spent detailing the hopeless wars of the Elves and Men against Morgoth's forces. Conveniently the Valar then arrive to defeat Morgoth in time for the end.
    • In The Return of the King Merry's small sword (dagger) was the only blade that could break the enchantments of the Witch King that were keeping him alive. This is told after Merry stabs him behind the knee and he is killed by Éowyn.
    • In The Hobbit, the Battle of the Five Armies was a devastating conflict that the good guys had a slim-to-none chance of winning. Hell, the Eagles arrived and even that wasn't enough to turn the tide in our heroes favor. Ultimately, Beorn the Shapechanger shows up out of bumfuck nowhere, cleans house, kills the main Orc bad-guy leading the army (Bolg, son of Azog) and then just disappears. It is jarring how out of left field this development is too, you could be forgiven for thinking that Professor Tolkien legitimately ran out of ideas.
    • Tom Bombadil was never mentioned as existing before he rescued the hobbits from Old Man Willow in the Old Forest. He seemed to have great powers, and he lived quite close to the Shire, but the hobbits didn't seem to be aware of him, although Tom suggests later that he was acquainted with Farmer Maggot. Also, Treebeard is never mentioned until he rescues Merry and Pippin in Fangorn Forest, although Gandalf and Galadriel seemed to have been aware of him. Furthermore, Saruman seems to have just disregarded his existence, although Treebeard and the Ents had the capability to annihilate Saruman's orc army and most of Isengard.

By Title:

  • The 13 ½ Lives of Captain Bluebear includes a "Mac", a "Roving reptilian rescuer" who flies around the world, rescuing people from certain death at just the last moment. His full name? Deus X. Machina.
  • In The 13 Clocks, when Prince Zorn and the Golux have brought the duke the jewels, he counts them: they are 999, not the 1,000 he had demanded. The Golux stares at his ring, and a diamond falls out. Which lets the duke gnarl about a Golux ex machina.
  • In The Adventures of Caterpillar Jones, right as the snake is about to eat C.J. and Cat, the Great Owl flies overhead and scares him off.
  • A frequent criticism of Adventures of Huckleberry Finn: after Tom's plan to free Jim fails miserably, he reveals that Jim's owner had died off-screen, her will manumitting him, and the whole thing had just been for fun. Ernest Hemingway famously referred to this ending as "cheating".
  • The Alex Rider series follows the third way to the letter, just like the James Bond movies. A teenage spy is sent into a mission with a small collection of gadgets. Of course, he uses them all to save his own neck just in time and stop the current madman from destroying the world. Another one happens when Alex is running from some gunmen and ultimately runs to the rooftop of a building with no way down and the gunmen on the stairs. But then Alex remembers seeing a giant orange cone/construction equipment (not mentioned before) and jumps off the building into it, allowing him to slide from safety away from his assailants.
  • Arc of Fire: Myrren figures out exactly how to use magic in activating the Dark Heart just when she needs to, sacrificing her life in the process. It works, Kyrian's defeated, and she's brought back from the dead too.
  • In Spike Milligan's Badjelly the Witch, the eponymous witch is chasing the hero and heroine, who are fleeing her lair, when God Himself intervenes. When she refuses to back down and tries to blind him with her fingernails, he annihilates her. You don't get a much straighter example than, "Just then, God came along."
  • This happens almost constantly in the first book of The Bartimaeus Trilogy, where something coincidentally happens to save the titular character when he gets into a seemingly inescapable situation (managing to escape from captivity when a little girl crashes her bike into the bushes where he's being interrogated in).
  • In Beowulf, the Giant's sword that kills Grendel's mother was only mentioned moments before Beowulf takes it and kills her with it. She couldn't be harmed by weapons made by man, but she conveniently kept a sword crafted by Giants (which would be able to harm her) above the door.
  • In Bluebear, at various points, Anagrom Ataf stands in the way of the Sharach-il-Allah, which leaves in accordance with rules of phenomena etiquette; some heavily lampshaded improbabilities with a dimensional hiatus save him from a gigantic Spiderwitch; and Professor Nightingale turns up on a cloud of pure darkness. Really, only Mac and Rumo the Wolpertinger weren't Deus Ex Machinae.
  • In The Blue Sword, the main character, Hari, is vastly outnumbered by the enemy army but she sends her ragtag group of friends out to fight them anyway. Then, most of them die, and she gets super upset. She climbs to the top of a convenient cliff that wasn't there a minute ago, and uses her amazing magic powers that she didn't know she had to bring an entire mountain range down on the enemy army. Wouldn't it have been nice if she'd done that to begin with? Now, it was shown that Hari had some magic she was being trained in low-level magic!
  • This happens literally in Calculating God when near the end God appears to save the three known species from their destruction by a supernova.
  • Both The Cat in the Hat books feature a Deus Ex Machina ending. In the first book, after the Cat, Thing One and Thing Two have made a complete mess of Sally and her brother's house and with their mother nearly home, the Cat suddenly comes in with a machine that picks everything up. And in the second book, after the Cat has turned the entire house (and snow surrounding it) pink, and his miniature Cats A-Y are unable to clean up the mess, he introduces one last Cat Z with a magical power called "Voom" that miraculously turns everything back to normal.
  • A Certain Magical Index has a literal example at the end of the Magic God Othinus arc. Othinus decides that she doesn't deserve to live and commits suicide. Her body crumbles away - and then inexplicably reforms, albeit smaller than before. It turns out that other Magic Gods, who Othinus had no idea even existed, decided to intervene.
  • In The Chronicles of Narnia, Aslan, who is a Jesus/God Captain Ersatz so it's not that surprising, spends the entire series behind the scenes, spinning the adventure and coming before them only when they need him most. He comes in during the last battle in Prince Caspian to help the Narnians win after they began to lose hope.
  • The Chronicles of Prydain uses unforeshadowed magic to defeat two major threats.
    • In The Book of Three, Gwydion, last seen imprisoned by Achren and presumed dead when her castle fell, pops up with knowledge of the Horned King's secret name, which kills the evil war leader. He got that from being imprisoned in a magic dungeon that hadn't been mentioned before, which gave him a power that violated the established rules regarding Hen Wen's oracle power.
    • In The High King, nobody knew that Dyrnwyn could kill the unkillable Cauldron-Born until Taran used it to do so.
  • The end of the Circle of Magic book Battle Magic ends Yanjing's invasion of Gyongxe with a literal Deus Ex Machina. Gyongxe really is the home of the gods and they've decided they're done with being invaded and conquered.
  • Bjorn Nyberg and L. Sprague de Camp's "The Return of Conan" has Conan the Barbarian's god, Crom, intervene at the climax to save Conan. Early in the novel, Conan has a vision that Crom is speaking to him; later, Conan sacrifices to Crom. It seems the authors—who took over the Conan canon from the creator, Robert E. Howard, after Howard's suicide and the success of the character—wanted to imbue Conan with middle-class values, and making him more religious went along with that. Still, this is a textbook example: the god actually intervenes to save the hero. Particularly peculiar because elsewhere Crom only gives man life and will; everything else is up to the individual.
  • Valerie's death in Cousin Bette may be considered this for the Hulot family. The young, healthy woman who has a personal vendetta-by-proxy against the Hulots and who can manipulate any man to get what she wants just happens to have a "savage" ex-lover who is crazy enough to kill her, and he just happens to have access to this exotic weapon of murder that will give the victim enough time and incentive to ruminate over all her past sins and promptly decide to redeem herself by leaving almost all her fortune to the people whom she had, up until that point, considered her enemies.
  • A Darker Shade of Magic's A Conjuring of Light has Osaron, the primary villain and all-powerful god of magic who is about to take over Red London, but wait! Halfway through the book our heroes discuss a before unmentioned device that allows all his magic to be taken away from him and transferred to someone else.
  • In Robin Jarvis' prequel to the Deptford Mice trilogy, The Oaken Throne, Ysabelle is tricked by the treacherous Morwenna into descending far below the Hallowed Oak and becoming trapped in a locked room where hungry toads are waiting to devour her. There seems to be no way out, but somehow Vesper (who is outside in the midst of a presumably noisy battle) is able to not only hear her cries, but quickly find his way down a dark maze of unfamiliar passages (it was previously noted that even Morwenna, who was familiar with them, had some trouble navigating) to rescue her.
  • The Divine Comedy: When Dante and Virgil find demons keeping them from descending deeper into Hell, Virgil calls upon the help of an angel. That angel busts into Hell, blasts open the demons' gate, and leaves. The angel was not referred to before and he failed to be referenced after, only serving to get Dante out of a bind and to demonstrate Virgil's inferiority to the divine.
  • Discworld:
    • The first book, The Colour of Magic, has some rather literal applications of Deus Ex Machina. There are two that are justified in that Rincewind is Lady Luck's favorite game piece in the tabletop RPG of the gods. Another at the end of the third chapter relies heavily on Rule of Funny.
    • Played with in the ending of Small Gods, which relies heavily on literal divine intervention; given the subject matter, however, it was rather a given. It also is the culmination of some heavy Character Development by the god in question.
  • In Divine Misfortune, Lucky manages to save Phil and Teri by getting every god in the Court of Divine Affairs to show up and smiting him for them. They even lampshade that it's a Deus Ex Machina, something that Lucky, being a God of Good Fortune, is entitled to using.
  • H. P. Lovecraft of all people pulls one at the end of The Dream-Quest of Unknown Kadath, when hunting horrors, which was send to catch main character, was suddently waporised by Elder god Nodens, who never appeared in that story and barely have anything to do with it.
  • The reason why the final work of David Eddings, the Dreamers Tetrology, was so poorly received was because every single book ended with the titular Dreamers having a dream that causes a natural disaster that destroys the enemy army. By the third book, the entire cast is fully aware of this fact, and knows that their job is to buy time until the next Deus Ex Machina solves all their problems. Then in the final book, another Deus Ex Machina turns up which causes the Big Bad to have actually been defeated several centuries in the past, making the entire series technically never happen.
  • The Dresden Files:
    • In general, the Knights of the Cross tend to do this pretty frequently, justified due to having a helping hand from God and/or Archangels. Anything from their own perfectly timely arrivals to any situation to a babysitter appearing when needed are within the realm of possibility.
    • In Proven Guilty, Harry Dresden literally banks on a Deus ex Machina occurring. This isn't as far-fetched as it seems, as the person he's helping at the time is the daughter of Knight of the Cross Michael Carpenter, who has Contrived Coincidence as a superpower. Harry's expectation is that the Almighty will protect His Knight's child out of professional courtesy if nothing else. When Dresden is unable to sway the vote to save her himself, Michael shows up, having saved the lives of a bunch of the people whose votes were cast in absentia, allowing a revote to save her.
  • Earthsea: A Draco Ex Machina conveniently kills the villains at the end of Tehanu.
  • The Eye of Argon has a beauty. Grignir, the barbarian protagonist, is locked in combat with a bunch of cultists. During the fight, one of his opponents just drops dead in the middle of the fight from an epileptic seizure.
  • The Faerie Queene:
    • Book I: All seems lost when the dragon burns Redcrosse to death with his very breath, but Redcrosse happens to fall into a sacred pool blessed by God with the ability to bring the dead back to life. This saves Redcrosse and lets him defeat the dragon, as well as making it so that God plays the role in this holy warrior's victoryvictory.
    • Book IV: Marinell despairs at having no way to rescue Florimell, but thankfully, his mom goes to ask the sea god Neptune to rescue her and he does quite easily.
  • In Bulgakov's The Fatal Eggs, an army of giant tropical animals is advancing towards Moscow, when they are all killed off by an unexpected frost. Bulgakov calls the chapter "A Frosty Deus Ex Machina".
  • Galaxy of Fear: Hoole typically performs this role. Since he has the Story-Breaker Power of being able to mimic the shape and abilities of just about any creature in the Star Wars universe and thus would be able to quickly solve just about every problem the rest of the protagonists come up against with ease, he spends the vast majority of almost each book either incapacitated or doing his own thing off screen until showing up at the last second in some form or another to save the protagonists from something they otherwise would be dead meat if he didn't.
  • At the end of Dave Duncan's tetralogy A Handful of Men, the heroes are in a totally hopeless situation. Thanks to his army of sorcerers with loyalty spells on them, the Big Bad has become the most powerful sorcerer ever. He's even become more powerful than the main character was at the end of the previous series — and said main character was a demigod (one Power Level higher than a sorcerer) who only avoided a Super-Power Meltdown because his love interest managed to De-power him before he burst into flames and died from it. Having been on the run from the Big Bad throughout the whole series, the heroes have finally been captured and are about to be killed. They end up being saved when two of the heroes achieve the level above "sorcerer" without having a Super-Power Meltdown by becoming a complete god instead of a demigod and proceed to free everyone from the Big Bad's Mind Control sorcery. Several of the main characters knew how to do this, but, normally, becoming a full-fledged god means that you Ascend to a Higher Plane of Existence and simply stop caring about what happens to mere mortals, so it's never mentioned as a way to stop the Big Bad until it happens.
  • Harry Potter:
    • Somewhat infamously, Philosopher's Stone ends with Dumbledore giving out just enough "last-minute points" for Gryffindor to take the House Cup from last place. Giving Neville points for standing up to his friends, while moving, was somewhat tainted by the feeling that Dumbledore was simply favoring the main characters for being main characters. Some of the video games avert this and allow you to lose the Cup, as Dumbledore will always give out the exact amount stated in the book, and it's possible to be further behind than that — but others rig the scores so that Gryffindor will invariably win only because of Dumbledore's favoritism. That being said, the House Cup is totally irrelevant in the greater scope of the series, and the fact that Harry managed to keep the titular stone safe is much more important.
    • In Chamber of Secrets, Fawkes, Dumbledore's phoenix, teeters between this and Chekhov's Gunman, showing up in the nick of time with the two things that allow Harry to defeat the Basilisk (healing tears and the Sorting Hat) after it appeared that Harry was hopelessly outmatched.
    • Quite a few in Deathly Hallows, but the Deluminator is the most blatant. Once a one-off prop with a single purpose, it's hamfistedly shoved into the plot in order to give Ron a way to get back to Harry and Hermione. Exactly how it functions is extremely vague, no one ever questions it, the issue of Dumbledore somehow knowing that Ron would ditch his friends is swept under the rug and the device itself is never used again (at least not for that purpose).
  • House of Leaves has one, in which Will Navidson inexplicably returns from the abyss inside the house after having been inside for several days with no food or water, or any real conception of where he was. Throughout the book, the House only directly kills one person, with the other deaths all being a result of insanity. The house has a history of letting people escape its depths right before they would die of starvation or exhaustion.
  • The House of Night:
    • Literally. When Kalona kills Stark in Nyx's realm, the Goddess Nyx shows up and forces Kalona to bring him back to life.
    • Happens again, in Awakened with Nyx appearing at Jack's funeral to comfort Jack's boyfriend Damien, and to help the Raven Mocker Rephaim get over his demonic nature (by turning him into a boy at night) so he can truly love Stevie Rae.
  • At the end of How to Kill a Monster, the monster has the kids cornered and is about to eat them. But it turns out that the monster who survived ingesting drain cleaner, rat poison, ammonia and turpentine is allergic to humans and drops dead immediately after licking one of them.
  • Invoked purposefully in The Hunger Games. If a tribute appeals enough to the cameras, they gain "sponsors", who can send them in supplies from a parachute. Katniss and Peeta utilize this by faking a romance for the cameras. The Capitol loves something to gossip and swoon over, so the two of them become celebrities as much as tributes. Also, Katniss could easily kill Cato with her bow, but he's wearing a sort of skintight body armor from a sponsor, so she can't. But the Capitol likes to put on a good show, and so the Gamemakers let loose a pack of genetically engineered wolves as a sort of "grand finale", and Katniss and Peeta manage to manipulate them to all but kill Cato. The wolves kill him slowly, because, again, the Capitol loves a good show. In a previous Games, a 14-year-old Finnick Odair didn't even do anything and yet was showered with sponsors, all because he was so ridiculously physically attractive. Finally, they sent him a Game-Breaker weapon — a trident, one of the most expensive gifts a sponsor ever gave — and since he had grown up using tridents and harpoons to fish, he offed the rest of the competitors with ease.
  • In Desert And Wilderness: Nel is dying of malaria in the middle of Darkest Africa. Staś, who has no chinine and no hope left, suddenly notices a suspicious plume of smoke which he decides to check. It's the campfire of Linde's expedition, which has medicine, tea and plenty of other stuff to spare.
  • Inheritance Cycle.
    • Eragon: Murtagh's sudden appearance.
    • Eldest: the dance of the naked elf chicks to cure all of Eragon's ailments. And turn him into a half-man, half-elf instantly when the process is supposed to be slow and gradual and therefore gives him Rider skills and senses instantly rather than it taking years.
    • Inheritance: Basically everything. Seriously. The entire army of werecats appearing despite the fact that we've only met two in the past three books, the discovery of an essentially invincible anti-dragon weapon which had never been mentioned previously, Angela finding Albitr, the 'sharpest sword in existence', to save the heroes, the Eldunari on Vroengard having powers Galbatorix's far larger store never had, the unexplained 'carrying spell' the Eldunari teach Saphira, the very minor character form a previous book saving Roran in the final battle, then disappearing, the side-effects on the Varden's spellcasters randomly disappearing, Murtagh stripping all of Galbatorix's wards using a spell it is not stated Galbatorix ever risked teaching him and Arya and the elves emerging unharmed from the citadel which was just blown up, carrying the last dragon egg and several hundred Eldunari...
    • The Dragons as a whole. The explanation actually given in the text is that no one knows how dragon magic works, it just does in times of need. Basically, Lampshade Hung with a massive neon sign. Here come the debates about whether they truly are a deus ex machina or just a very convenient plot device.
  • Invoked and lampshaded in I, Q, in which Q, suddenly powerless, finds himself trying to survive on a raging battlefield and is surprised that he's lasted this long. The next time a rabid fighter charges him he just stands there until he's about to be torn apart when... an anvil falls on his attacker. Q is quite disappointed with this largely because the Deus in question turns out to be an old enemy of his.
  • The book It Could Have Been Worse features a mouse heading home and suffers a series of bad luck, such as falling into a hole, getting wet in a river, among other things. However, Mouse didn't know his misfortune had saved his life from various predators coming up behind him, as according to the quote following each accident: "But it could have been worse."
  • In The Kite Runner, Baba's life is saved by a Russian soldier's officer suddenly appearing and shooting up in the air at the same time the reader and protagonist expect the soldier to be shooting Baba for standing up to him.
  • L. Frank Baum loved using this. Virtually all of the Land of Oz books end this way. Sometimes there's an attempt at setting things up via Chekhov's Gun, but just as often the ending comes completely out of the blue. In his sixth Oz book, The Emerald City of Oz, the Nomes and a few other unruly tribes of creatures plan to invade Oz, destroy it, and enslave the people. The surprise is initially ruined by Ozma's convenient Magic Picture, allowing her to plan ahead of time. With her trusty Chekhov's Gun, the Magic Belt Dorothy stole from the Nome king in a previous book, Ozma uses its power to dehydrate the army, whose invasion tunnel is conveniently right next to the fountain containing the Water of Oblivion, which makes anyone who drinks of it forget everything. The first thing the invaders do when they come out of the tunnel is drink the water; war avoided.
  • The Left Behind series ends with a Deus Ex Machina of sorts, though, given the philosophy put forth in the novels, this is probably intentional.
  • Most famously portrayed in "Little Red Riding Hood", with the woodcutter appearing out of nowhere to save her just in the nick of time; though he is established earlier in the plot, nevertheless he isn't following Red around to protect her, but pops up to kill the Wolf anyway. In the earliest versions, however, there was no woodcutter.
  • A literal example in The Long Dark Tea-Time of the Soul when a god of guilt comes out the oft-mentioned refrigerator to resolve the plot in five pages.
  • Deliberately done in Lord of the Flies, when after Jack sets the island on fire to kill Ralph, a Navy ship shows up out of nowhere to rescue them, symbolizing how quickly the appearance of an authority can change everything.
  • In Malazan Book of the Fallen, this is the primary purpose of the Houses of the Azath, especially when one first appears in Gardens of the Moon out of nowhere and basically freezes the novel's conflict in its tracks. In addition, the Trygalle Trade Guild in Deadhouse Gates and the army of Bridgeburner ghosts in House of Chains. Justified in that all three of these are discussed at length in either the book they're used in or retroactively in the later ones. There are rules for all three. And there are consequences for them all as well.
  • In Masks of Aygrima, when Mara's body is about to be taken over by the Autarch, Greff, who apparently infiltrated the Palace without being stopped by any of the hundreds of guards, runs in and stabs the Autarch, distracting him long enough for Mara to kill him.
  • The Mill on the Floss: When Maggie runs off with Stephen and returns, she is shunned by her brother and has insulted Phil. While sitting in her cabin alone and brooding, a flood rips through the town and drowns her before she has an opportunity at reconciliation. References throughout the novel to the flooding of the countryside and water in general place this in the second variety.
  • The entire plot of The Mysterious Island is about characters trying to find out why and how someone bails them out of seemingly hopeless situations. (And that "someone", being Captain Nemo, does it in the most dramatic manner possible all the time.) This Deus ex Machina drives the plot instead of wrapping it up, and creates suspense instead of resolving it.
  • In the Nancy Drew book "The Sinister Omen", the villains are members of a massive stamp stealing syndicate. In the final couple of pages, the villains successfully elude Nancy Drew, and board a plane to escape. The plane is about to take off...then gets swallowed up by a sinkhole. At no point in the book were sinkholes mentioned before that moment.* The villains are then easily arrested. End of book.
  • Averted in The Night's Dawn Trilogy. The threat to human civilization is so unstoppably powerful that, when evidence of an encounter with a literal god is discovered in the ancient records of an alien species, the humans are desperate enough to dispatch an expedition to track down this god and beg for its help. This subplot is even telegraphed in the title of the trilogy's final book, The Naked God. As the result of all this lampshading, the story's resolution is neither sudden nor unexpected, and therefore not a Deus ex Machina, even though it does involve direct intervention by a deity.
  • Near the end of the Old Man's War book The Last Colony, John sends Zoe off to give a message to General Gau. She returns with a "sapper field", just what's needed for the Roanoke colony to win the final confrontation. This one irritated readers so much that John Scalzi devoted the closing third of Zoe's Tale to explaining how exactly she got it — it was much trickier than it looked from the outside.
  • Throughout Out of the Dark, the Shongairi invaders consistently lose ground battles to humans but pulverize the entire area from orbit afterwards. Towards the end they learn enough human tactics to capture a rebel village without resorting to orbital bombardment and develop a bioweapon to destroy what's left of humanity. But just as they're about to deploy the virus the leader of the village they captured to experiment on turns out to be freakin' Dracula and he and a handful of newly-spawned vampires single-handedly wipe out the entire invasion force. Hints that Dracula was present were scattered throughout the book, but were relatively subtle, and the reader is expecting a hard sci-fi war novel, and not fantasy elements to creep in and sucker punch them.
  • The Priest, the Scientist, and the Meteor has the title priest praying to God, resulting in a huge golden bat appearing that knocks the dinosaur-ghost ridden meteor out of the park.
  • One Rainbow Magic book has this. In Danielle the Daisy Fairy's book, the girls are completely incapable of retrieving the flower petal and are saved by a girl who happened to see what was going on.
  • The Riftwar Cycle: In Tear of the Gods, the bad guy, "Bear", kills a bar girl somewhere around chapter 2. Her boyfriend vows revenge. The rest of the book happens, and the good guys finally manage to corner Bear. Unfortunately, they are unable to kill him because he is literally invincible and super strong. Suddenly, the god of vengeance incarnates in boyfriend and strikes Bear down. Good guys return victorious.
  • A Series of Unfortunate Events: Lampshaded and discussed in Book the Seventh. Violet, Klaus, and Sunny have been accused of murder and are in a jail cell that they have no chance of escaping from. It's Klaus's birthday, and he states that the one thing he wants more than anything is some Deus Ex Machina. A police officer shows up and grudgingly gives them some bread and water. Violet turns to Klaus and says "Happy Birthday" and they use the bread and water to melt the mortar between the wall's bricks, letting them escape.
  • The first Song of the Lioness book ends with Alanna defeating the enemy with an ability that she has a flashback to learning in the same scene that she uses it, but this is probably due to the edits Tamora Pierce had to do to the original manuscript.
  • Parodied to death and back in Suvi Kinos, where the little heroine's five uncles share a nom de plume and a serial story in a magazine which they write in turns. In a brotherly contest of wits, each uncle attempts to end their chapter in such a situation that the next in turn will have as much trouble as possible continuing. When the previous writer had left the story's heroine buried alive in a ridiculously secluded location, everyone was thrilled to read the next chapter, only to be let down with a blunt "after she managed to miraculously escape, she had tea under the pergola".
  • Played painfully straight in Sword of Truth: Richard Rahl's Gift (basically magic) qualifies. At the end of a book, expect him to know how to perfectly use it to get out of the dire situation of the week, while at the beginning of the next book he's so clueless about how to use it that the events of the last book might as well have not happened.
    • Lampshaded somewhat at the end of The Pillars of Creation when one character asks Richard why he even needs the Sword of Truth after seeing his magic shred an entire platoon. Richard explains that his gift seems to work out of anger and need, whereas the Sword works all the time.
    • Most notable in the eighth book, where Richard is dying from being poisoned, with the only antidote down the drain and the only person who can make the antidote dead. He then uses his Gift to reverse engineer the ingredients (down to the amount needed of each) of the antidote at the very last minute.
    • Also notable at the end of the fifth book, when Richard realizes how to stop the bells, using a leap of logic that is nothing short of mind-boggling.
    • Or the second book where Richard, without being aware he's doing anything of the sort, uses magical lightning to strike down all the enemy commanders and then any soldiers who don't surrender.
    • This can be particularly frustrating as the books often go on at length about the value of hard work and accomplishing things on your own, only to then have the main character simply be able to do whatever he needs to solve any problem.
  • In one novel in the Tales of the Fox series, the protagonists manage to trick the gods into solving the apparently impossible problem for them. Less of an outrageous example than most, as the main character tries to do this at least once in every novel in the series; this is just the only time it actually worked.
  • The novel Temple has a character on a tank falling from a plane, with no parachute at all. He survives because he was wearing a jetpack. That he didn't know about. That was mentioned in passing once before. That was never mentioned by a character who supplied it to him and obviously should have known.
  • Jasper Fforde's The Well of Lost Plots — part of the Thursday Next series, which is dedicated to playing with literary devices — features a literal deus ex machina. It's a mysterious device given to all Jurisfiction agents in case of completely unstoppable disaster. At the end of the book, when a conspiracy that would have ruined all of fiction was coming to imminent fruition, Thursday activated the device and God came down and fixed everything.
  • The Twilight Saga: There are two main reasons in the first three books for why someone wouldn't want to be a vampire: first, the overwhelming desire for human blood, which is incredibly painful to resist, and second, a vampire's inability to reproduce. In Breaking Dawn, however all these concerns are swept away when it turns out that actually, only female vampires can't have babies — male vampires have magical sperm — and therefore Bella is able to have Edward's child by having sex with him before being turned. And after the half-vampire baby starts eating Bella up from the inside and Edward turns Bella in order to save her life, it turns out Bella isn't horribly tempted at all, with a weak attempt at explanation in the form of "Well, she chose to be turned." Actually, Breaking Dawn is crammed full of this. Bella whines for four books about being unable to survive without Jacob, her other prospective love interest, around, so in the fourth book he falls in love with her newborn baby and becomes part of her family, "where she always knew he belonged." Oh, and the big one: A group of powerful vampires, the Volturi are built up for three books as being the most powerful group of vampires around, but Bella's newborn vampire ability just happens to be able to completely defeat them without even a fight.
  • Averted in The War of the Worlds (1898), as the Martians' complete lack of an immune system is stated outright by the narrator during a lengthy aside on Martian biology. It's a fact he states might have once seemed trivial, before going on to insinuate that Earth is essentially a Death World for them. This aside takes place at the midpoint of the narrative, well before the Martian onslaught shows any hints of decline. The first few paragraphs of the novel are even an extended Lampshade Hanging of the way it ends. Unfortunately, this is a classic example of Adaptation Displacement due to these parts of the story routinely being left out of the far better-known movies.
  • Warrior Cats: There are four instances in the first series where Firestar was about to be killed, but another character came by and killed/chased off whatever was threatening him almost instantly. Three of these four times, Graystripe was the one who saved the day.
    • The main reason Firestar was able to win his fight against Tigerstar in Forest of Secrets was because Tigerstar slipped on some blood.
    • For that matter, Brambleclaw picking up a wooden stake and twisting around just in time to impale Hawkfrost with it as he was about to deliver his killing blow at the end of Sunset seems a bit too convenient.
  • M.M. Buckner's titular Watermind survives everything the humans throw at it before being killed by contact with salt water. Okay, there was foreshadowing, but getting it would have taken someone who was both better at science (salt water being a better electrical conductor than fresh) and geography (the lake they were driving the Watermind into being a tidal basin) than the protagonists, which takes Viewers Are Geniuses to levels that would make Light Yagami throw up his hands in disgust.
  • Intentionally but carefully used in the World of the Five Gods series, each book has one of the gods intervening in some dramatic and unexpected way to resolve the situation. Justified, since the gods have very restrictive limitations on how and when they can interact with the world, and usually have to keep their followers in the dark until the big moment in order to keep their plans from being derailed.
  • In Xanth, one protagonist's magic power works this way sometimes. Bink's talent of immunity to harm from magic will always work by seeming coincidence or luck. He actually goes for the first part of his life not realizing he has a talent because of it.
  • Zeus Is Dead: A Monstrously Inconvenient Adventure has several gods as main characters, so this trope is perhaps unavoidable, but it's also lampshaded: At one point, when Apollo saves Leif, Tracy, and Thalia (one of the nine Muses) from the Erinyes, Leif comments that he doesn't mind being on the receiving end of a deus ex machina. Thalia immediately laments the fact.
    Thalia: Oh, gods! And on top of everything, now we’re cliché!

Top