Follow TV Tropes

Following

History DeusExMachina / Literature

Go To

OR

Is there an issue? Send a MessageReason:
Additional example

Added DiffLines:

** 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.
Is there an issue? Send a MessageReason:
Added examples



to:

**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.



Added: 508

Changed: 335

Is there an issue? Send a MessageReason:
None


* ''Literature/TheFaerieQueene'': 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.

to:

* ''Literature/TheFaerieQueene'': ''Literature/TheFaerieQueene'':
** 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. 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.
Is there an issue? Send a MessageReason:
None


* Anything by Creator/SimonRGreen, especially his ''Literature/{{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.

to:

* Anything by Creator/SimonRGreen, especially his ''Literature/{{Deathstalker}}'' series, lives and sustains itself on this trope. All of the heroes' asses must be sore from [[AssPull pulling plot devices and powers out of them.them]].

Added: 7257

Changed: 9164

Removed: 8249

Is there an issue? Send a MessageReason:
None


!!By Author

to:

!!By Author
Author:

* Creator/RichardAdams:
** ''Literature/WatershipDown'' 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, ''Literature/ThePlagueDogs'' ends as the [[TearJerker 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 [[BlatantLies lies]] just over the horizon. In all subsequent editions of the book, the ''reader'' persuades Adams to do an AssPull and he does: two of Adams friends come by in a boat (while having a conversation about ''Literature/WatershipDown'' 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 ''Literature/{{Sahara}}'', author Creator/CliveCussler 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 [[AuthorAvatar 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 ''[[Literature/TheOregonFiles 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.
* Creator/CoryDoctorow ''loves'' this trope. In ''Literature/LittleBrother'', 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 ''Literature/EasternStandardTribe'', the protagonist just happens to become friends with a doctor at the asylum he is in who can and will free him.
* Creator/GregEgan 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 ''Literature/SchildsLadder'', who show up in the novel's climax to [[spoiler: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 Creator/SimonRGreen, especially his ''Literature/{{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 Creator/{{Homer}}'s epics ''Literature/TheIliad'' and ''Literature/TheOdyssey'', 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.
* Creator/StephenKing:
** ''Literature/TheDarkTower2004'': Relying on the conceit that King himself was [[AuthorAvatar 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 [[spoiler:Dandelo]]. In one LampshadeHanging moment, a character finds a note from King reading "DON'T WORRY; HERE COMES THE DEUS EX MACHINA!"
** ''Literature/TheStand,'' 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 ''Literature/{{Misery}}'' with reference to a CliffhangerCopout. 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 NotQuiteDead, but the story ends up better for it.



* Creator/StephenKing
** ''Literature/TheDarkTower2004'': Relying on the conceit that King himself was [[AuthorAvatar 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 [[spoiler:Dandelo]]. In one LampshadeHanging moment, a character finds a note from King reading "DON'T WORRY; HERE COMES THE DEUS EX MACHINA!"
** ''Literature/TheStand,'' 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 ''Literature/{{Misery}}'' with reference to a CliffhangerCopout. 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 NotQuiteDead, but the story ends up better for it.

!!By Title

to:

* Creator/StephenKing
** ''Literature/TheDarkTower2004'': Relying on the conceit that King himself was [[AuthorAvatar 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 [[spoiler:Dandelo]]. In one LampshadeHanging moment, a character finds a note from King reading "DON'T WORRY; HERE COMES THE DEUS EX MACHINA!"
** ''Literature/TheStand,'' 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 ''Literature/{{Misery}}'' with reference to a CliffhangerCopout. 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 NotQuiteDead, but the story ends up better for it.


!!By Title
Title:



* In Creator/JamesThurber's ''Literature/The13Clocks'', 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''.

to:

* In Creator/JamesThurber's ''Literature/The13Clocks'', 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''.



* A frequent criticism of Creator/MarkTwain's ''Literature/AdventuresOfHuckleberryFinn'', where 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. Creator/ErnestHemingway famously referred to this ending as "cheating."
* The Literature/AlexRider 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.

to:

* A frequent criticism of Creator/MarkTwain's ''Literature/AdventuresOfHuckleberryFinn'', where ''Literature/AdventuresOfHuckleberryFinn'': 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. Creator/ErnestHemingway famously referred to this ending as "cheating."
"cheating".
* The Literature/AlexRider ''Literature/AlexRider'' series follows the third way to the letter letter, just like the James Bond ''Film/JamesBond'' movies. A teenage spy is sent into a mission with a small collection of gadgets. Of course course, he uses them all to save his own neck just in time and stop the current madman from destroying the world.
**
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.



* Spike Milligan's ''Badjelly the Witch''. The eponymous witch is chasing the hero and heroine, who are fleeing her lair, when [[spoiler:''God Himself'']] intervenes. When she refuses to back down and tries to [[spoiler:blind him ''with her fingernails'']], he annihilates her. You don't get a much straighter example than, "[[spoiler:Just then, God came along]]."
* This happens almost constantly in the first book of Literature/TheBartimaeusTrilogy, 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).

to:

* In Spike Milligan's ''Badjelly the Witch''. The Witch'', the eponymous witch is chasing the hero and heroine, who are fleeing her lair, when [[spoiler:''God Himself'']] intervenes. When she refuses to back down and tries to [[spoiler:blind him ''with her fingernails'']], he annihilates her. You don't get a much straighter example than, "[[spoiler:Just then, God came along]]."
* This happens almost constantly in the first book of Literature/TheBartimaeusTrilogy, ''Literature/TheBartimaeusTrilogy'', 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 ''Bluebear'', at various points [[spoiler: Anagrom Ataf stands in the way of the Sharach-il-Allah, which leaves in accordance with rules of phenomena etiquette; some heavily {{lampshade|Hanging}}d 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 ''Literature/TheBlueSword'' by Creator/RobinMcKinley, 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, [[spoiler: 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!

to:

* In ''Bluebear'', at various points [[spoiler: Anagrom points, [[spoiler:Anagrom Ataf stands in the way of the Sharach-il-Allah, which leaves in accordance with rules of phenomena etiquette; some heavily {{lampshade|Hanging}}d 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.]]
Machinae]].
* In ''Literature/TheBlueSword'' by Creator/RobinMcKinley, ''Literature/TheBlueSword'', 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, [[spoiler: 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!



* Both of the ''Literature/TheCatInTheHat'' books by Dr. Seuss arguably 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.

to:

* Both of the ''Literature/TheCatInTheHat'' books by Dr. Seuss arguably 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.



* Intentionally but carefully used in the ''Literature/{{Chalion}}'' series, each book has one of the gods intervening in some dramatic and unexpected way to resolve the situation. {{Justified|Trope}}, 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 Creator/CSLewis's ''Literature/TheChroniclesOfNarnia,'' Aslan, who is a Jesus/God CaptainErsatz 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 ''Literature/PrinceCaspian'' to help the Narnians win after they began to lose hope.

to:

* Intentionally but carefully used in the ''Literature/{{Chalion}}'' series, each book has one of the gods intervening in some dramatic and unexpected way to resolve the situation. {{Justified|Trope}}, 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 Creator/CSLewis's ''Literature/TheChroniclesOfNarnia,'' Aslan, who is a Jesus/God CaptainErsatz 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 ''Literature/PrinceCaspian'' to help the Narnians win after they began to lose hope.



* Anything by Creator/SimonRGreen, especially his ''Literature/{{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.



* In the eighth book of Creator/JimButcher's ''Literature/TheDresdenFiles'', ''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 [[ChurchMilitant Knight of the Cross]] Michael Carpenter, who has ContrivedCoincidence as a superpower. Harry's expectation is that the Almighty will protect His Knight's child out of professional courtesy if nothing else. When [[spoiler: Dresden is unable to sway the vote to save her himself, Michael shows up, having saved the lives of a bunch of the people who's votes were cast in absentia, allowing a revote to save her.]]
** In general, The Knights of the Cross, tend to do this pretty frequently, justified due to having a [[DivineIntervention 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.

to:

* ''Literature/TheDresdenFiles'':
**
In general, [[ChurchMilitant the eighth book Knights of Creator/JimButcher's ''Literature/TheDresdenFiles'', ''Proven Guilty'', the Cross]] tend to do this pretty frequently, justified due to having a [[DivineIntervention 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 ''Literature/ProvenGuilty'',
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 [[ChurchMilitant Knight of the Cross]] Cross Michael Carpenter, who has ContrivedCoincidence as a superpower. Harry's expectation is that the Almighty will protect His Knight's child out of professional courtesy if nothing else. When [[spoiler: Dresden [[spoiler:Dresden is unable to sway the vote to save her himself, Michael shows up, having saved the lives of a bunch of the people who's whose votes were cast in absentia, allowing a revote to save her.]]
** In general, The Knights of
her]].
* ''Literature/{{Earthsea}}'': A [[spoiler:Draco Ex Machina conveniently kills
the Cross, tend to do this pretty frequently, justified due to having a [[DivineIntervention 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 villains]] at the realm end of possibility.''Tehanu''.



* At the end of the ''Literature/{{Goosebumps}}'' book "Literature/HowToKillAMonster", 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.
* At the end of [[Creator/DaveDuncan Dave Duncan's]] tetralogy ''A Handful of Men'', the heroes are in a totally hopeless situation. Thanks to his army of sorcerers with [[MindManipulation loyalty spells]] on them, the BigBad 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 PowerLevel higher than a sorcerer) who only avoided a SuperpowerMeltdown because his {{Love Interest|s}} managed to {{depower}} him before he burst into flames and died from it. Having been on the run from the BigBad throughout the whole series, the heroes have finally been captured and are about to be killed. They end up being saved when [[spoiler: two of the heroes achieve the PowerLevel above "sorcerer" without having a SuperpowerMeltdown by becoming a complete god instead of a demigod, and proceed to free everyone from the BigBad's [[MindManipulation Mind Control]] sorcery. Several of the main characters knew how to do this, but, normally, becoming a full-fledged god means that you AscendToAHigherPlaneOfExistence and simply stop caring about what happens to mere mortals, so it's never mentioned as a way to stop the BigBad until it happens.]]

to:

* At the end of the ''Literature/{{Goosebumps}}'' book "Literature/HowToKillAMonster", 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.
* At the end of [[Creator/DaveDuncan Dave Duncan's]]
Creator/DaveDuncan's tetralogy ''A Handful of Men'', the heroes are in a totally hopeless situation. Thanks to his army of sorcerers with [[MindManipulation loyalty spells]] spells on them, the BigBad 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 PowerLevel {{Power Level|s}} higher than a sorcerer) who only avoided a SuperpowerMeltdown SuperPowerMeltdown because his {{Love Interest|s}} love interest managed to {{depower}} DePower him before he burst into flames and died from it. Having been on the run from the BigBad throughout the whole series, the heroes have finally been captured and are about to be killed. They end up being saved when [[spoiler: two [[spoiler:two of the heroes achieve the PowerLevel level above "sorcerer" without having a SuperpowerMeltdown SuperPowerMeltdown by becoming a complete god instead of a demigod, demigod and proceed to free everyone from the BigBad's [[MindManipulation Mind Control]] Control sorcery. Several of the main characters knew how to do this, but, normally, becoming a full-fledged god means that you AscendToAHigherPlaneOfExistence and simply stop caring about what happens to mere mortals, so it's never mentioned as a way to stop the BigBad until it happens.]]happens]].



* Invoked purposefully in ''Literature/TheHungerGames''. 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 [[spoiler: 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 [[spoiler: 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. And 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 GameBreaker 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.
* Various gods interfere in the affairs of men all over the place in Creator/{{Homer}}'s epics ''Literature/{{Iliad}}'' and ''Literature/TheOdyssey'', 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.
* 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."

to:

* At the end of ''Literature/HowToKillAMonster'', 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 ''Literature/TheHungerGames''. 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 [[spoiler: faking [[spoiler: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 [[spoiler: wearing [[spoiler: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. And in In a previous Games, a 14-year old 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 Finally, they sent him a GameBreaker 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.
* Various gods interfere in the affairs of men all over the place in Creator/{{Homer}}'s epics ''Literature/{{Iliad}}'' and ''Literature/TheOdyssey'', 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.
* 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."
ease.



* {{Invoked|Trope}} and {{lampshade|Hanging}}d in the ''Franchise/StarTrek'' novel ''Literature/{{IQ}}'' by John de Lancie, 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... [[AnvilOnHead 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.

to:

* {{Invoked|Trope}} and {{lampshade|Hanging}}d in the ''Franchise/StarTrek'' novel ''Literature/{{IQ}}'' by John de Lancie, ''Literature/{{IQ}}'', 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... [[AnvilOnHead 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.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."



* Creator/LFrankBaum ''loved'' using this. Virtually all of the ''Literature/LandOfOz'' books end this way. Sometimes there's an attempt at setting things up via ChekhovsGun, but just as often the ending comes completely out of the blue.
** In his sixth Oz book, ''Literature/TheEmeraldCityOfOz'', 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 ChekhovsGun, 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.

to:

* Creator/LFrankBaum ''loved'' using this. Virtually all of the ''Literature/LandOfOz'' books end this way. Sometimes there's an attempt at setting things up via ChekhovsGun, but just as often the ending comes completely out of the blue.
**
blue. In his sixth Oz book, ''Literature/TheEmeraldCityOfOz'', 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 ChekhovsGun, 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.



* Creator/CoryDoctorow ''loves'' this trope. In ''Literature/LittleBrother'', 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 ''Literature/EasternStandardTribe'' the protagonist just happens to become friends with a doctor at the asylum he is in who can and will free him.



* A literal example in ''Literature/TheLongDarkTeaTimeOfTheSoul,'' [[spoiler:when a god of guilt comes out [[ItCameFromTheFridge the oft-mentioned refrigerator]] to resolve the plot in five pages.]]
* Deliberately done in ''Literature/LordOfTheFlies'', where after [[spoiler: 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 Creator/StevenErikson's ''Literature/MalazanBookOfTheFallen'', this is the primary purpose of the Houses of the Azath, especially when one first appears in ''Literature/GardensOfTheMoon'' out of nowhere and basically freezes the novel's conflict in its tracks. In addition, the Trygalle Trade Guild in ''Literature/DeadhouseGates'' and the army of Bridgeburner ghosts in ''Literature/HouseOfChains''. 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 ''Literature/MasksOfAygrima'', [[spoiler: 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.]]
* ''Literature/TheMillOnTheFloss'' by Creator/GeorgeEliot. 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 Creator/JulesVerne's ''Literature/TheMysteriousIsland'' is about characters trying to find out why and how someone bails them out of seemingly hopeless situations. (And that "someone", being [[spoiler: Captain Nemo]], does it in the [[BigDamnHeroes 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.

to:

* A literal example in ''Literature/TheLongDarkTeaTimeOfTheSoul,'' ''Literature/TheLongDarkTeaTimeOfTheSoul'' [[spoiler:when a god of guilt comes out [[ItCameFromTheFridge the oft-mentioned refrigerator]] to resolve the plot in five pages.]]
pages]].
* Deliberately done in ''Literature/LordOfTheFlies'', where when after [[spoiler: Jack [[spoiler: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 Creator/StevenErikson's ''Literature/MalazanBookOfTheFallen'', this is the primary purpose of the Houses of the Azath, especially when one first appears in ''Literature/GardensOfTheMoon'' out of nowhere and basically freezes the novel's conflict in its tracks. In addition, the Trygalle Trade Guild in ''Literature/DeadhouseGates'' and the army of Bridgeburner ghosts in ''Literature/HouseOfChains''. 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 ''Literature/MasksOfAygrima'', [[spoiler: When [[spoiler:when Mara's body is about to be taken over by The the Autarch, Greff, who apparently infiltrated the Palace without being stopped by any of the hundreds of guards, runs in and stabs The the Autarch, distracting him long enough for Mara to kill him.]]
him]].
* ''Literature/TheMillOnTheFloss'' by Creator/GeorgeEliot. ''Literature/TheMillOnTheFloss'': 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 Creator/JulesVerne's ''Literature/TheMysteriousIsland'' is about characters trying to find out why and how someone bails them out of seemingly hopeless situations. (And that "someone", being [[spoiler: Captain [[spoiler:Captain Nemo]], does it in the [[BigDamnHeroes 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.



* Averted in the ''Literature/TheNightsDawnTrilogy'' by Creator/PeterFHamilton. 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 '''[[ExactlyWhatItSaysOnTheTin 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 DeusExMachina, even though it ''does'' involve direct intervention by a deity.
* Near the end of ''Literature/OldMansWar'''s ''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 Creator/JohnScalzi 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 Creator/DavidWeber's ''Literature/OutOfTheDark'' the Shongairi invaders consistently lose ground battles to humans but [[DeathFromAbove 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 [[spoiler: 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 [[spoiler: 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 [[spoiler: fantasy elements to creep in and sucker punch them]].

to:

* Averted in the ''Literature/TheNightsDawnTrilogy'' by Creator/PeterFHamilton.''Literature/TheNightsDawnTrilogy''. 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 '''[[ExactlyWhatItSaysOnTheTin 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 DeusExMachina, even though it ''does'' involve direct intervention by a deity.
* Near the end of ''Literature/OldMansWar'''s the ''Literature/OldMansWar'' 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 Creator/JohnScalzi 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 Creator/DavidWeber's ''Literature/OutOfTheDark'' ''Literature/OutOfTheDark'', the Shongairi invaders consistently lose ground battles to humans but [[DeathFromAbove 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 [[spoiler: 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 [[spoiler: 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 [[spoiler: fantasy elements to creep in and sucker punch them]].



* One ''Literature/RainbowMagic'' book had 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.
* In Creator/RaymondEFeist's ''Literature/TheRiftwarCycle'''s ''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.
* Beginning with the novel ''Literature/{{Sahara}}'', author Creator/CliveCussler 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 [[AuthorAvatar 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 [[Literature/TheOregonFiles 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.
* ''Literature/ASeriesOfUnfortunateEvents'': LampshadeHanging and a DiscussedTrope 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. [[MacGyvering 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.
* Creator/GregEgan 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 ''Literature/SchildsLadder'', who show up in the novel's climax to [[spoiler: 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.

to:

* One ''Literature/RainbowMagic'' book had 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.
* ''Literature/TheRiftwarCycle'': In Creator/RaymondEFeist's ''Literature/TheRiftwarCycle'''s ''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.
* Beginning with the novel ''Literature/{{Sahara}}'', author Creator/CliveCussler 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 [[AuthorAvatar 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 [[Literature/TheOregonFiles 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.
* ''Literature/ASeriesOfUnfortunateEvents'': LampshadeHanging {{Lampshade|Hanging}}d and a DiscussedTrope {{discussed|Trope}} 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. [[MacGyvering 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.
* Creator/GregEgan often uses characters motivated by religion (or other emotion-heavy ideology) to pop in, advance The first ''Literature/SongOfTheLioness'' book ends with Alanna defeating the plot by enemy with an ability that she has a sudden, violent action and never come back again. The most jarring example are the anachronauts from ''Literature/SchildsLadder'', who show up flashback to learning in the novel's climax same scene that she uses it, but this is probably due to [[spoiler: blow up the research ship]]. They are only mentioned twice before, never shown edits Creator/TamoraPierce had to have any specific agenda, and their actions have no lasting consequences beyond isolating do to the two main characters to continue exploration on their own.original manuscript.



* Played painfully straight in Goodkind's ''Literature/SwordOfTruth'': Richard [[ItWasHisSled 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 [[BagOfSpilling might as well have not happened]].

to:

* Played painfully straight in Goodkind's ''Literature/SwordOfTruth'': Richard [[ItWasHisSled Rahl's]] 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 [[BagOfSpilling might as well have not happened]].



* In one novel in Creator/HarryTurtledove's ''Literature/TalesOfTheFox'' series, [[spoiler: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.

to:

* In one novel in Creator/HarryTurtledove's the ''Literature/TalesOfTheFox'' series, [[spoiler: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.



* In the ''Literature/TortallUniverse'', the first ''Literature/SongOfTheLioness'' 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 Creator/TamoraPierce had to do to the original manuscript.
* A [[spoiler:Draco Ex Machina conveniently kills the villains]] at the end of ''Literature/{{Tehanu}}''.



* Richard Adams' ''Literature/WatershipDown'' 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, ''Literature/ThePlagueDogs'' ends as the [[TearJerker 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 [[BlatantLies lies]] just over the horizon. In all subsequent editions of the book, the ''reader'' persuades Adams to do an AssPull and he does: two of Adams friends come by in a boat (while having a conversation about ''Literature/WatershipDown'' 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.
* In Piers Anthony's ''Literature/{{Xanth}}'' series, one protagonist's magic power works this way sometimes. Bink's talent of [[spoiler: 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.

to:

* Richard Adams' ''Literature/WatershipDown'' Intentionally but carefully used in the ''Literature/WorldOfTheFiveGods'' series, each book 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 gods intervening in some dramatic and unexpected way to resolve the event is situation. {{Justified|Trope}}, since the gods have very logical from a human point of view, if not from a rabbit's.
** The "Dea Ex Machina" chapter title reveals a further pun
restrictive limitations on how and when they can interact with the human savior arrives in a car--seeming world, and usually have to the rabbit literally a "goddess in a machine."
** A similar example comes earlier
keep their followers in the book, when dark until the heroes cross train tracks safely, but big moment in order to keep 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, ''Literature/ThePlagueDogs'' ends as the [[TearJerker 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 [[BlatantLies lies]] just over the horizon. In all subsequent editions of the book, the ''reader'' persuades Adams to do an AssPull and he does: two of Adams friends come by in a boat (while having a conversation about ''Literature/WatershipDown'' and anthropomorphism, no less) to pluck them
plans from the sea and bring them back to the shore where the dogs owner (wounded instead of killed by the accident) is waiting.
being derailed.
* In Piers Anthony's ''Literature/{{Xanth}}'' series, ''Literature/{{Xanth}}'', one protagonist's magic power works this way sometimes. Bink's talent of [[spoiler: 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.
Is there an issue? Send a MessageReason:
The Monstrous Regiment example was foreshadowed very thoroughly, so it's not that trope.


** ''Literature/MonstrousRegiment'' plays the trope much straighter, which brought about much debate and anger from the readership.
Is there an issue? Send a MessageReason:
None

Added DiffLines:

* In ''Literature/DivineMisfortune'', Lucky manages to save Phil and Teri by [[spoiler: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.
Is there an issue? Send a MessageReason:
None


* ''LightNovel/ACertainMagicalIndex'' 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 [[FunSize smaller than before]]. It turns out that other Magic Gods, who Othinus had no idea even existed, decided to intervene.

to:

* ''LightNovel/ACertainMagicalIndex'' ''Literature/ACertainMagicalIndex'' 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 [[FunSize smaller than before]]. It turns out that other Magic Gods, who Othinus had no idea even existed, decided to intervene.
Is there an issue? Send a MessageReason:
None


* ''Literature/{{Twilight}}'': 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 [[spoiler: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. [[spoiler: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: [[spoiler: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]].

to:

* ''Literature/{{Twilight}}'': ''Literature/TheTwilightSaga'': 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'', ''Literature/BreakingDawn'', however [[spoiler:all these concerns are swept away when it turns out that actually, only ''female'' vampires can't have babies--''male'' babies -- ''male'' vampires have magical sperm--and 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. [[spoiler: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: [[spoiler: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]].
Is there an issue? Send a MessageReason:
None


* [[AvertedTrope Averted]] in ''Literature/TheWarOfTheWorlds'', where the Martians' [[spoiler: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 DeathWorld 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 LampshadeHanging of the way it ends. Unfortunately this is a classic example of AdaptationDisplacement due to these parts of the story routinely being left out of the far better known movies.

to:

* [[AvertedTrope Averted]] {{Averted|Trope}} in ''Literature/TheWarOfTheWorlds'', where ''Literature/TheWarOfTheWorlds1898'', as the Martians' [[spoiler: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 DeathWorld for them. This aside takes place at the midpoint of the narrative, well before the Martian onslaught shows any hints of decline.]] decline]]. The first few paragraphs of the novel are even an extended LampshadeHanging of the way it ends. Unfortunately Unfortunately, this is a classic example of AdaptationDisplacement due to these parts of the story routinely being left out of the far better known better-known movies.
Is there an issue? Send a MessageReason:
None


** The Eagles are Manwë's messengers, so this is a legitimate case of a true Deus Ex Machina.



** What's most irritating about the Giant Eagles is that they [[FridgeLogic raise]] serious [[PlotHole questions]] about [[http://www.angryflower.com/lordot.gif the story's foundations]].
*** As lots of people have pointed out however, the eagles would be easier seen by the Eye of Sauron, his Nazgul are riding winged beasts, not to mention entire armies of archers under Sauron's command, and as Tolkien writes eagles aren't always nice there is the possibility the ring could corrupt them.



** All of these are justified by the fact that Tolkien's works are intended to be a mythology; gods really do exist and intervene in the affairs of the world to achieve their desired results just like in Greek, Norse or any other mythology. Indeed, the Valar (the 'gods') intervene progressively less as time goes on, so that by the time of ''Lord of the Rings'', they've limited themselves to simply giving the protagonists an indirect nudge in the right direction.
** Also probably intentional, given Tolkien's own religious views. The mortals (Elves, Men, and Dwarves) tried to beat [[SatanicArchetype Morgoth]] and failed. It took divine intervention to pull it off, fitting in with Christianity.
** The Istari (Wizards) themselves were slightly this, appearing about the time Sauron was starting to regain power. Jusified, the Valar couldn't directly intervene, so they send 5 Maia in human form to help rally the peoples of Middle-Earth against Sauron. This doesn't entirely work, as the greatest of the Wizards ends up [[TheParagonAlwaysRebels joining Sauron]], but ultimately it pays off due to Gandalf. What happened to the other wizards is another question…
Is there an issue? Send a MessageReason:
complainy general section


!!In General

* How many fairy tales have one of these? In multiple versions of "Literature/SnowWhite" and "Literature/SleepingBeauty" (their Disney versions being huge exceptions), the prince never appears until the end to perform his heroic deed. Literature/{{Rapunzel}}'s tears cure the prince's blindness. A hunter just happens to walk by Grandma's house as the wolf is attacking Literature/LittleRedRidingHood. Although it occurs midway in the story, there is also Literature/{{Cinderella}}'s fairy godmother.
Is there an issue? Send a MessageReason:
None

Added DiffLines:

* 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."
Is there an issue? Send a MessageReason:
None


* The entire plot of Creator/JulesVerne's ''Literature/TheMysteriousIsland'' is about characters trying to find out why and how someone bails them out of seemingly hopeless situations. (And that "someone", being [[spoiler: Captain Nemo]], does it in the [[BigDamnHeroes most dramatic manner possible]] all the time.)

to:

* The entire plot of Creator/JulesVerne's ''Literature/TheMysteriousIsland'' is about characters trying to find out why and how someone bails them out of seemingly hopeless situations. (And that "someone", being [[spoiler: Captain Nemo]], does it in the [[BigDamnHeroes 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.
Is there an issue? Send a MessageReason:
None


* Spike Milligan's ''Badjelly the Witch''. The eponymous witch is chasing the hero and heroine, who are fleeing her lair, when [[spoiler:''God Himself'']] intervenes. When she refuses to back down and tries to [[spoiler:blind him ''with her fingernails'']], he annihilates her. You don't get a much straighter example than, "[[spoiler:Suddenly, God came along]]."

to:

* Spike Milligan's ''Badjelly the Witch''. The eponymous witch is chasing the hero and heroine, who are fleeing her lair, when [[spoiler:''God Himself'']] intervenes. When she refuses to back down and tries to [[spoiler:blind him ''with her fingernails'']], he annihilates her. You don't get a much straighter example than, "[[spoiler:Suddenly, "[[spoiler:Just then, God came along]]."
Is there an issue? Send a MessageReason:
None


** In ''The High King'', nobody knew that [[FlamingSword Dyrnwyn]] could kill the unkillable Cauldron-Born until Taran used it to do so.

to:

** In ''The High King'', nobody knew that [[spoiler: [[FlamingSword Dyrnwyn]] could kill the unkillable Cauldron-Born until Taran used it to do so.so]].
Is there an issue? Send a MessageReason:
None


** In ''The Book of Three'', Gwydion, last seen imprisoned by Achren, pops up with [[IKnowYourTrueName 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.

to:

** In ''The Book of Three'', Gwydion, last seen imprisoned by Achren, Achren and presumed dead when her castle fell, pops up with [[IKnowYourTrueName 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.before, which gave him a power that violated the established rules regarding Hen Wen's oracle power.
Is there an issue? Send a MessageReason:
None

Added DiffLines:

* ''Literature/TheChroniclesOfPrydain'' uses unforeshadowed magic to defeat two major threats.
** In ''The Book of Three'', Gwydion, last seen imprisoned by Achren, pops up with [[IKnowYourTrueName 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.
** In ''The High King'', nobody knew that [[FlamingSword Dyrnwyn]] could kill the unkillable Cauldron-Born until Taran used it to do so.

Added: 14724

Changed: 7062

Removed: 16407

Is there an issue? Send a MessageReason:
None


!!In General

* How many fairy tales have one of these? In multiple versions of "Literature/SnowWhite" and "Literature/SleepingBeauty" (their Disney versions being huge exceptions), the prince never appears until the end to perform his heroic deed. Literature/{{Rapunzel}}'s tears cure the prince's blindness. A hunter just happens to walk by Grandma's house as the wolf is attacking Literature/LittleRedRidingHood. Although it occurs midway in the story, there is also Literature/{{Cinderella}}'s fairy godmother.

!!By Author

* Creator/JRRTolkien occasionally uses Giant Eagles to whisk his heroes away from danger. These aren't just at the end of ''Literature/TheLordOfTheRings'', but show up in ''Literature/TheHobbit'' 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.
** The Eagles are Manwë's messengers, so this is a legitimate case of a true Deus Ex Machina.
** ''Bored of the Rings'' had one of them stamped with "Deus Ex Machina Airlines."
** Common objections: The Eagles' place in Middle-Earth's greater cosmology that's AllThereInTheManual, 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.
** What's most irritating about the Giant Eagles is that they [[FridgeLogic raise]] serious [[PlotHole questions]] about [[http://www.angryflower.com/lordot.gif the story's foundations]].
*** As lots of people have pointed out however, the eagles would be easier seen by the Eye of Sauron, his Nazgul are riding winged beasts, not to mention entire armies of archers under Sauron's command, and as Tolkien writes eagles aren't always nice there is the possibility the ring could corrupt them.
** Throughout ''Literature/TheSilmarillion'' 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.
** All of these are justified by the fact that Tolkien's works are intended to be a mythology; gods really do exist and intervene in the affairs of the world to achieve their desired results just like in Greek, Norse or any other mythology. Indeed, the Valar (the 'gods') intervene progressively less as time goes on, so that by the time of ''Lord of the Rings'', they've limited themselves to simply giving the protagonists an indirect nudge in the right direction.
** Also probably intentional, given Tolkien's own religious views. The mortals (Elves, Men, and Dwarves) tried to beat [[SatanicArchetype Morgoth]] and failed. It took divine intervention to pull it off, fitting in with Christianity.
** The Istari (Wizards) themselves were slightly this, appearing about the time Sauron was starting to regain power. Jusified, the Valar couldn't directly intervene, so they send 5 Maia in human form to help rally the peoples of Middle-Earth against Sauron. This doesn't entirely work, as the greatest of the Wizards ends up [[TheParagonAlwaysRebels joining Sauron]], but ultimately it pays off due to Gandalf. What happened to the other wizards is another question…
** 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 [[spoiler:after Merry stabs him behind the knee and he is killed by Éowyn.]]
** In ''Literature/TheHobbit'', 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.
* Creator/StephenKing
** ''Literature/TheDarkTower2004'': Relying on the conceit that King himself was [[AuthorAvatar 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 [[spoiler:Dandelo]]. In one LampshadeHanging moment, a character finds a note from King reading "DON'T WORRY; HERE COMES THE DEUS EX MACHINA!"
** ''Literature/TheStand,'' 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 ''Literature/{{Misery}}'' with reference to a CliffhangerCopout. 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 NotQuiteDead, but the story ends up better for it.

!!By Title

* ''Literature/TheThirteenAndAHalfLivesOfCaptainBluebear'' 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 Creator/JamesThurber's ''Literature/The13Clocks'', 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 ''Literature/TheAdventuresOfCaterpillarJones'', right as the snake is about to eat C.J. and Cat, the Great Owl flies overhead and scares him off.



* At the end of [[Creator/DaveDuncan Dave Duncan's]] tetralogy ''A Handful of Men'', the heroes are in a totally hopeless situation. Thanks to his army of sorcerers with [[MindManipulation loyalty spells]] on them, the BigBad 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 PowerLevel higher than a sorcerer) who only avoided a SuperpowerMeltdown because his {{Love Interest|s}} managed to {{depower}} him before he burst into flames and died from it. Having been on the run from the BigBad throughout the whole series, the heroes have finally been captured and are about to be killed. They end up being saved when [[spoiler: two of the heroes achieve the PowerLevel above "sorcerer" without having a SuperpowerMeltdown by becoming a complete god instead of a demigod, and proceed to free everyone from the BigBad's [[MindManipulation Mind Control]] sorcery. Several of the main characters knew how to do this, but, normally, becoming a full-fledged god means that you AscendToAHigherPlaneOfExistence and simply stop caring about what happens to mere mortals, so it's never mentioned as a way to stop the BigBad until it happens.]]



* ''Literature/ASeriesOfUnfortunateEvents'': LampshadeHanging and a DiscussedTrope 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. [[MacGyvering 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.

to:

* ''Literature/ASeriesOfUnfortunateEvents'': LampshadeHanging ''Literature/ArcOfFire'': Myrren figures out exactly [[spoiler: 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 a DiscussedTrope in Book she's brought back from 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. [[MacGyvering 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.dead too.]]



* In ''Bluebear'', at various points [[spoiler: Anagrom Ataf stands in the way of the Sharach-il-Allah, which leaves in accordance with rules of phenomena etiquette; some heavily {{lampshade|Hanging}}d 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.]]



* Both of the ''Literature/TheCatInTheHat'' books by Dr. Seuss arguably 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.
* ''LightNovel/ACertainMagicalIndex'' 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 [[FunSize smaller than before]]. It turns out that other Magic Gods, who Othinus had no idea even existed, decided to intervene.



* Anything by Creator/SimonRGreen, 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.



* Bjorn Nyberg and Creator/LSpragueDeCamp's "The Return of Conan" has Franchise/ConanTheBarbarian'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, Creator/RobertEHoward, 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.



* ''Literature/ADarkerShadeOfMagic'''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.
* Anything by Creator/SimonRGreen, especially his ''Literature/{{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.



* ''Literature/TheDivineComedy'': 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 Creator/{{Virgil}}'s inferiority to [[{{God}} the divine]].



* The reason why the final work of Creator/DavidEddings, 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 BigBad to have actually been defeated several centuries in the past, making the entire series technically never happen.

to:

* Creator/HPLovecraft of all people pulls one at the end of ''Literature/TheDreamQuestOfUnknownKadath'', when [[EldritchAbomination 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 Creator/DavidEddings, the Dreamers ''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 BigBad to have actually been defeated several centuries in the past, making the entire series technically never happen.



* A [[spoiler:Draco Ex Machina conveniently kills the villains]] at the end of ''Literature/{{Tehanu}}''.



* ''Literature/TheFaerieQueene'': 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.



* At the end of the ''Literature/{{Goosebumps}}'' book "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.

to:

* ''Literature/GalaxyOfFear'': Hoole typically performs this role. Since he has the StoryBreakerPower of being able to [[VoluntaryShapeShifting 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 the ''Literature/{{Goosebumps}}'' book "How to Kill a Monster", "Literature/HowToKillAMonster", 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.them.
* At the end of [[Creator/DaveDuncan Dave Duncan's]] tetralogy ''A Handful of Men'', the heroes are in a totally hopeless situation. Thanks to his army of sorcerers with [[MindManipulation loyalty spells]] on them, the BigBad 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 PowerLevel higher than a sorcerer) who only avoided a SuperpowerMeltdown because his {{Love Interest|s}} managed to {{depower}} him before he burst into flames and died from it. Having been on the run from the BigBad throughout the whole series, the heroes have finally been captured and are about to be killed. They end up being saved when [[spoiler: two of the heroes achieve the PowerLevel above "sorcerer" without having a SuperpowerMeltdown by becoming a complete god instead of a demigod, and proceed to free everyone from the BigBad's [[MindManipulation Mind Control]] sorcery. Several of the main characters knew how to do this, but, normally, becoming a full-fledged god means that you AscendToAHigherPlaneOfExistence and simply stop caring about what happens to mere mortals, so it's never mentioned as a way to stop the BigBad until it happens.]]
* ''Literature/HarryPotter'':
** Somewhat infamously, ''[[Literature/HarryPotterAndThePhilosophersStone 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 ''[[Literature/HarryPotterAndTheChamberOfSecrets Chamber of Secrets]]'', Fawkes, Dumbledore's phoenix, teeters between this and ChekhovsGunman, 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 ''[[Literature/HarryPotterAndTheDeathlyHallows 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).



* ''Literature/HarryPotter'':
** Somewhat infamously, ''[[Literature/HarryPotterAndThePhilosophersStone 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 ''[[Literature/HarryPotterAndTheChamberOfSecrets Chamber of Secrets]]'', Fawkes, Dumbledore's phoenix, teeters between this and ChekhovsGunman, 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 ''[[Literature/HarryPotterAndTheDeathlyHallows 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).

to:

* ''Literature/HarryPotter'':
** Somewhat infamously, ''[[Literature/HarryPotterAndThePhilosophersStone Philosopher's Stone]]'' ends with Dumbledore giving out just
Invoked purposefully in ''Literature/TheHungerGames''. If a tribute appeals enough "last-minute points" for Gryffindor to take the House Cup cameras, they gain "sponsors", who can send them in supplies 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 a parachute. Katniss and Peeta utilize this by [[spoiler: faking a romance for the cameras. The Capitol loves something to gossip and allow you to lose swoon over]], so the Cup, two of them become celebrities as Dumbledore will always give out much as tributes. Also, Katniss could easily kill Cato with her bow, but he's [[spoiler: wearing a sort of skintight body armor from a sponsor, so she can't]]. But the exact amount stated in Capitol likes to put on a good show, and so the book, Gamemakers let loose a pack of genetically engineered wolves as a sort of "grand finale", and it's possible Katniss and Peeta manage to be further behind than that -- manipulate them to all but others rig kill Cato. The wolves kill him slowly, because, again, the scores so that Gryffindor will invariably win ''only'' Capitol loves a good show. And in a previous Games, a 14-year old Finnick Odair didn't even do ''anything'' and yet was showered with sponsors, all 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 ''[[Literature/HarryPotterAndTheChamberOfSecrets Chamber of Secrets]]'', Fawkes, Dumbledore's phoenix, teeters between this and ChekhovsGunman, 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
he was hopelessly outmatched.
** Quite
so ridiculously physically attractive. Finally they sent him a few in ''[[Literature/HarryPotterAndTheDeathlyHallows Deathly Hallows]]'', but the Deluminator is GameBreaker weapon -- a trident, one of the most blatant. Once expensive gifts a one-off prop sponsor ever gave -- and since he had grown up using tridents and harpoons to fish, he offed the rest of the competitors 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).ease.



* ''[[Literature/ADarkerShadeOfMagic 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.

to:

* ''[[Literature/ADarkerShadeOfMagic A Conjuring ''Literature/InDesertAndWilderness'': Nel is dying of Light]]'' malaria in the middle of DarkestAfrica. Staƛ, who has Osaron, no chinine and no hope left, suddenly notices a suspicious plume of smoke which he decides to check. [[spoiler: It's the primary villain campfire of Linde's expedition, which has medicine, tea and all-powerful god plenty of magic who is about other stuff 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.spare]].



* Creator/LFrankBaum ''loved'' using this. Virtually all of the [[Literature/LandOfOz Oz books]] end this way. Sometimes there's an attempt at setting things up via ChekhovsGun, 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 ChekhovsGun, 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.

to:

* Creator/LFrankBaum ''loved'' using this. Virtually all of the [[Literature/LandOfOz Oz books]] ''Literature/LandOfOz'' books end this way. Sometimes there's an attempt at setting things up via ChekhovsGun, but just as often the ending comes completely out of the blue.
** In his sixth Oz book, ''The Emerald City of Oz'', ''Literature/TheEmeraldCityOfOz'', 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 ChekhovsGun, 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.



* Most famously portrayed in "Literature/LittleRedRidingHood", 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.
** That's because in the earliest versions there was no woodcutter.
** In Creator/CharlesPerrault's version, the oldest written one, she's just eaten and that's the end of that. In French folk version, collected later but suspected to have been Perrault's source, she tells the wolf she has to go to the bathroom and slips off when she does.
** Ludwig Tieck's version, which predates ''Grimms' Fairytales'', follows Perrault, but because Tieck evidently did not like [[TheBadGuyWins the wolf getting away with eating the grandmother and Little Red Riding-Hood]], he added a passing hunter who discovers the wolf in grandma's house and shoots it dead. It was only Creator/TheBrothersGrimm or, quite likely, their source for their version, Jeanette Hassenpflug, who added the miraculous survival of the two victims of the wolf -- which looks as if it may have been modeled on "Literature/TheWolfAndTheSevenYoungKids". In later English versions of the Grimms' version the hunter became a woodcutter and he also was established earlier in the story.

to:

* Most famously portrayed in "Literature/LittleRedRidingHood", 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.
** That's because in
anyway. In the earliest versions versions, however, there was no woodcutter.
** In Creator/CharlesPerrault's version, the oldest written one, she's just eaten and that's the end of that. In French folk version, collected later but suspected to have been Perrault's source, she tells the wolf she has to go to the bathroom and slips off when she does.
** Ludwig Tieck's version, which predates ''Grimms' Fairytales'', follows Perrault, but because Tieck evidently did not like [[TheBadGuyWins the wolf getting away with eating the grandmother and Little Red Riding-Hood]], he added a passing hunter who discovers the wolf in grandma's house and shoots it dead. It was only Creator/TheBrothersGrimm or, quite likely, their source for their version, Jeanette Hassenpflug, who added the miraculous survival of the two victims of the wolf -- which looks as if it may have been modeled on "Literature/TheWolfAndTheSevenYoungKids". In later English versions of the Grimms' version the hunter became a woodcutter and he also was established earlier in the story.
woodcutter.



* In the ''Literature/NancyDrew'' 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.[[labelnote:*]]There was one throwaway reference to sinkholes on the BACK of the book, but not during the story itself.[[/labelnote]] The villains are then easily arrested. End of book.



* Near the end of ''[[Literature/OldMansWar 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 Creator/JohnScalzi 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.

to:

* Near the end of ''[[Literature/OldMansWar The ''Literature/OldMansWar'''s ''The Last Colony]]'', 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 Creator/JohnScalzi 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.



* Bjorn Nyberg and Creator/LSpragueDeCamp's "The Return of Conan" has Franchise/ConanTheBarbarian'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, Creator/RobertEHoward, 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.
* In Creator/RaymondEFeist's ''[[Literature/TheRiftwarCycle 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.

to:

* Bjorn Nyberg One ''Literature/RainbowMagic'' book had this. In Danielle the Daisy Fairy's book, the girls are completely incapable of retrieving the flower petal and Creator/LSpragueDeCamp's "The Return of Conan" has Franchise/ConanTheBarbarian's god, Crom, intervene at the climax are saved by a girl who happened 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, Creator/RobertEHoward, 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.
see what was going on.
* In Creator/RaymondEFeist's ''[[Literature/TheRiftwarCycle Tear ''Literature/TheRiftwarCycle'''s ''Tear of the Gods]]'', 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.



* ''Literature/GalaxyOfFear'': Hoole typically performs this role. Since he has the StoryBreakerPower of being able to [[VoluntaryShapeShifting 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.

to:

* ''Literature/GalaxyOfFear'': Hoole typically performs this role. Since he has ''Literature/ASeriesOfUnfortunateEvents'': LampshadeHanging and a DiscussedTrope in Book the StoryBreakerPower Seventh. Violet, Klaus, and Sunny have been accused of being able to [[VoluntaryShapeShifting mimic 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 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 one thing off screen until showing up at the last second in he wants more than anything is some form or another Deus Ex Machina. A police officer shows up and grudgingly gives them some bread and water. [[MacGyvering Violet turns to save the protagonists from something Klaus and says "Happy Birthday"]] and they otherwise would be dead meat if he didn't.use the bread and water to melt the mortar between the wall's bricks, letting them escape.



* 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''".

to:

* Parodied to death and back in Suvi Kinos, ''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''".



* ''The Thirteen and a Half 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 ''Bluebear'', at various points [[spoiler: Anagrom Ataf stands in the way of the Sharach-il-Allah, which leaves in accordance with rules of phenomena etiquette; some heavily {{lampshade|Hanging}}d 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.]]

to:

* ''The Thirteen and a Half Lives of Captain Bluebear'' includes a "Mac", a "Roving reptilian rescuer" who flies around In one novel in Creator/HarryTurtledove's ''Literature/TalesOfTheFox'' series, [[spoiler:the protagonists manage to trick the world, rescuing people from certain death 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 last moment. His full name? Deus X. Machina.
only time it actually worked.
* In ''Bluebear'', The novel ''Temple'' has a character on a tank falling from a plane, with no parachute at various points all. [[spoiler: Anagrom Ataf stands He survives because he was wearing a jetpack. That he didn't know about. That was mentioned in the way of the Sharach-il-Allah, which leaves in accordance with rules of phenomena etiquette; some heavily {{lampshade|Hanging}}d improbabilities with passing once before. That was never mentioned by a dimensional hiatus save character who supplied it to 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.obviously should have known.]]



* A [[spoiler:Draco Ex Machina conveniently kills the villains]] at the end of ''Literature/{{Tehanu}}''.



* In one novel in Creator/HarryTurtledove's ''Literature/TalesOfTheFox'' series, [[spoiler: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.
* ''[[Literature/ZeusIsDead 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.

to:

* In one novel in Creator/HarryTurtledove's ''Literature/TalesOfTheFox'' Piers Anthony's ''Literature/{{Xanth}}'' series, [[spoiler: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 one protagonist's magic power works this at least once in every novel in the series; this is just the only time it way sometimes. Bink's talent of [[spoiler: immunity to harm from magic]] will always work by seeming coincidence or luck. He actually worked.
goes for the first part of his life not realizing he has a talent because of it.
* ''[[Literature/ZeusIsDead Zeus Is Dead: ''Literature/ZeusIsDead: A Monstrously Inconvenient Adventure]]'' 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.



* In Creator/JamesThurber's ''Literature/The13Clocks'', 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''.
* Creator/JRRTolkien occasionally uses Giant Eagles to whisk his heroes away from danger. These aren't just at the end of ''Literature/TheLordOfTheRings'', but show up in ''Literature/TheHobbit'' 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.
** The Eagles are Manwë's messengers, so this is a legitimate case of a true Deus Ex Machina.
** ''Bored of the Rings'' had one of them stamped with "Deus Ex Machina Airlines."
** Common objections: The Eagles' place in Middle-Earth's greater cosmology that's AllThereInTheManual, 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.
** What's most irritating about the Giant Eagles is that they [[FridgeLogic raise]] serious [[PlotHole questions]] about [[http://www.angryflower.com/lordot.gif the story's foundations]].
*** As lots of people have pointed out however, the eagles would be easier seen by the Eye of Sauron, his Nazgul are riding winged beasts, not to mention entire armies of archers under Sauron's command, and as Tolkien writes eagles aren't always nice there is the possibility the ring could corrupt them.
** Throughout ''Literature/TheSilmarillion'' 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.
** All of these are justified by the fact that Tolkien's works are intended to be a mythology; gods really do exist and intervene in the affairs of the world to achieve their desired results just like in Greek, Norse or any other mythology. Indeed, the Valar (the 'gods') intervene progressively less as time goes on, so that by the time of ''Lord of the Rings'', they've limited themselves to simply giving the protagonists an indirect nudge in the right direction.
** Also probably intentional, given Tolkien's own religious views. The mortals (Elves, Men, and Dwarves) tried to beat [[SatanicArchetype Morgoth]] and failed. It took divine intervention to pull it off, fitting in with Christianity.
** The Istari (Wizards) themselves were slightly this, appearing about the time Sauron was starting to regain power. Jusified, the Valar couldn't directly intervene, so they send 5 Maia in human form to help rally the peoples of Middle-Earth against Sauron. This doesn't entirely work, as the greatest of the Wizards ends up [[TheParagonAlwaysRebels joining Sauron]], but ultimately it pays off due to Gandalf. What happened to the other wizards is another question…
** 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 [[spoiler:after Merry stabs him behind the knee and he is killed by Éowyn.]]
** In ''Literature/TheHobbit'', 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.
* Creator/StephenKing
** ''Literature/TheDarkTower2004'': Relying on the conceit that King himself was [[AuthorAvatar 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 [[spoiler:Dandelo]]. In one LampshadeHanging moment, a character finds a note from King reading "DON'T WORRY; HERE COMES THE DEUS EX MACHINA!"
** ''Literature/TheStand,'' 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 ''Literature/{{Misery}}'' with reference to a CliffhangerCopout. 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 NotQuiteDead, but the story ends up better for it.
* One ''Literature/RainbowMagic'' book had 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.
* How many fairy tales have one of these? In multiple versions of "Literature/SnowWhite" and "Literature/SleepingBeauty" (their Disney versions being huge exceptions), the prince never appears until the end to perform his heroic deed. Literature/{{Rapunzel}}'s tears cure the prince's blindness. A hunter just happens to walk by Grandma's house as the wolf is attacking Literature/LittleRedRidingHood. Although it occurs midway in the story, there is also Literature/{{Cinderella}}'s fairy godmother.
* Both of the ''Literature/TheCatInTheHat'' books by Dr. Seuss arguably 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.
* ''Literature/InDesertAndWilderness'': Nel is dying of malaria in the middle of DarkestAfrica. Staƛ, who has no chinine and no hope left, suddenly notices a suspicious plume of smoke which he decides to check. [[spoiler: It's the campfire of Linde's expedition, which has medicine, tea and plenty of other stuff to spare]].
* The novel ''Temple'' has a character on a tank falling from a plane, with no parachute at all. [[spoiler: 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.]]
* Creator/HPLovecraft of all people pulls one at the end of ''Literature/TheDreamQuestOfUnknownKadath'', when [[EldritchAbomination 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.
* In the ''Literature/NancyDrew'' 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.[[labelnote:*]]There was one throwaway reference to sinkholes on the BACK of the book, but not during the story itself.[[/labelnote]] The villains are then easily arrested. End of book.
* Invoked purposefully in ''Literature/TheHungerGames''. 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 [[spoiler: 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 [[spoiler: 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. And 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 GameBreaker 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.
* ''Literature/ArcOfFire'': Myrren figures out exactly [[spoiler: 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.]]
* ''Literature/TheMysteriousIsland'' has several, many of which are major spoilers and the least of which is a chest containing a selection of tools seemingly packed specifically for castaways with little hope of rescue. In a shining example of Administrivia/TropesAreNotBad, these interventions always raise questions, and drive more than one character to near insanity obsessing over what is causing these things to happen.
* ''LightNovel/ACertainMagicalIndex'' 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 [[FunSize smaller than before]]. It turns out that other Magic Gods, who Othinus had no idea even existed, decided to intervene.
* ''Literature/TheDivineComedy'': 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 Creator/{{Virgil}}'s inferiority to [[{{God}} the divine]].
* In ''Literature/TheAdventuresOfCaterpillarJones'', right as the snake is about to eat C.J. and Cat, the Great Owl flies overhead and scares him off.
* In Piers Anthony's Xanth series, one protagonist's magic power works this way sometimes. Bink's talent of [[spoiler: 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.
* ''Literature/TheFaerieQueene'': 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.
Is there an issue? Send a MessageReason:
None

Added DiffLines:

* ''Literature/TheFaerieQueene'': 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.
Is there an issue? Send a MessageReason:
None


* Spike Milligan's ''Badjelly the Witch''. The eponymous witch is chasing the hero and heroine, who are fleeing her lair, when [[spoiler:''God Himself'']] intervenes. When she refuses to back down and tries to [[spoiler:blind him ''with her fingernails'']], he annihilates her. You don't get a much straighter example than, "[[spoiler: Suddenly, God came along]]."

to:

* Spike Milligan's ''Badjelly the Witch''. The eponymous witch is chasing the hero and heroine, who are fleeing her lair, when [[spoiler:''God Himself'']] intervenes. When she refuses to back down and tries to [[spoiler:blind him ''with her fingernails'']], he annihilates her. You don't get a much straighter example than, "[[spoiler: Suddenly, "[[spoiler:Suddenly, God came along]]."
Is there an issue? Send a MessageReason:
None


* Spike Milligan's ''Badjelly the Witch''. The eponymous witch is chasing the hero and heroine, who are fleeing her lair, when [[spoiler:''God Himself'']] intervenes. When she refuses to back down and tries to [[spoiler:blind him ''with her fingernails'']], he annihilates her. You don't get a much straighter example than, "[[spoiler Suddenly, God came along.]]"

to:

* Spike Milligan's ''Badjelly the Witch''. The eponymous witch is chasing the hero and heroine, who are fleeing her lair, when [[spoiler:''God Himself'']] intervenes. When she refuses to back down and tries to [[spoiler:blind him ''with her fingernails'']], he annihilates her. You don't get a much straighter example than, "[[spoiler "[[spoiler: Suddenly, God came along.]]"along]]."
Is there an issue? Send a MessageReason:
None


* Spike Milligan's ''Badjelly the Witch''. The eponymous witch is chasing the hero and heroine, who are fleeing her lair, when [[spoiler:''God Himself'']] intervenes. When she refuses to back down and tries to [[spoiler:blind him ''with her fingernails'']], he annihilates her.

to:

* Spike Milligan's ''Badjelly the Witch''. The eponymous witch is chasing the hero and heroine, who are fleeing her lair, when [[spoiler:''God Himself'']] intervenes. When she refuses to back down and tries to [[spoiler:blind him ''with her fingernails'']], he annihilates her. You don't get a much straighter example than, "[[spoiler Suddenly, God came along.]]"
Is there an issue? Send a MessageReason:
None


* How many fairy tales have one of these? In multiple versions of "Literature/{{Snow White|AndTheSevenDwarfs}}" and "Literature/SleepingBeauty" (their Disney versions being huge exceptions), the prince never appears until the end to perform his heroic deed. Literature/{{Rapunzel}}'s tears cure the prince's blindness. A hunter just happens to walk by Grandma's house as the wolf is attacking Literature/LittleRedRidingHood. Although it occurs midway in the story, there is also Literature/{{Cinderella}}'s fairy godmother.

to:

* How many fairy tales have one of these? In multiple versions of "Literature/{{Snow White|AndTheSevenDwarfs}}" "Literature/SnowWhite" and "Literature/SleepingBeauty" (their Disney versions being huge exceptions), the prince never appears until the end to perform his heroic deed. Literature/{{Rapunzel}}'s tears cure the prince's blindness. A hunter just happens to walk by Grandma's house as the wolf is attacking Literature/LittleRedRidingHood. Although it occurs midway in the story, there is also Literature/{{Cinderella}}'s fairy godmother.
Is there an issue? Send a MessageReason:
None

Added DiffLines:

** In ''[[Literature/HarryPotterAndTheChamberOfSecrets Chamber of Secrets]]'', Fawkes, Dumbledore's phoenix, teeters between this and ChekhovsGunman, 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.

Top