Talk:Deus ex machina/List of deus ex machina examples

message: See deus ex machina for more information about this device.
===Literature and comics===
====Examples in plot====
*In Homer's The Odyssey, after Odysseus and Telemachus slaughter the suitors, the families of the suitors show up at the farm of Laertes seeking vengeance. As a battle is about to begin, Athena appears in the last few lines of the poem and tells both parties to stop, to which they comply.
*In Euripides' Medea, Apollo's chariot comes from the sky to take Medea away of Corinth after she slaughters the king's family and her own children.
*In William Golding's novel The Lord of the Flies, just as the protagonist Ralph is about to be killed by the band of "hunters" at the end of the story, a ship appears from nowhere onto the island, drawn by the smoke produced by the wildfire on the island. One of the ship's officers rescues Ralph.  He and the rest of the boys are then taken from the island.
*In Mark Twain's The Adventures of Huckleberry Finn, with Jim apprehended in the heart of the South and Huck unable to rescue him, Tom Sawyer reenters the story, having come hundreds of miles downriver to visit a relative.  Huck's reunion with Tom gives him the opportunity to free Jim and allows a channel for the resolution of all dangling storylines that the book had left behind in St. Petersburg, Missouri.
*In Shakespeare's As You Like It, Hymenaios comes to the mass wedding to sort out the problems of Rosalind's stay and disguise in the Forest of Arden.
* In the Edgar Allan Poe story The Pit and the Pendulum, the unnamed narrator has just been pushed over the edge of the bottomless pit when he reaches up and grabs the arm of the French general who has seized the fortress where the narrator has been imprisoned.
* The final issue of Grant Morrison's run on Animal Man was titled Deus Ex Machina, and the same title would later be used for the trade paperback collecting his final story arc. The issue itself involves a quite literal example of a deus ex, as Buddy "Animal Man" Baker is finally brought face to face with Morrison himself, who reveals to Baker that his life is a comic book and that he is his (soon-to-depart) writer, before eventually growing tired of his own attempts at preaching and sending Baker home, resurrecting his previously-murdered family in the process.
* Lifeguard, from the X-Men, has the mutant ability to manifest any necessary ability to save lives, which makes her a quick fix for the writers if any characters are stuck in a tight spot. Similar criticisms were heaped against the character of Crazy Jane from Grant Morrison's run on Doom Patrol. Jane had hundreds of multiple personalities each with their own powers that would often appear at convenient times to save the day. In contrast Morrisson also created the villain The Quiz, who has "every power you haven't thought of." 
* A deus ex machina exists in K. A. Applegate's Remnants series. Earth is devoid of almost all life, no longer rotates, and is cloaked in perpetual twilight. An alien spaceship, the character Billy Weir and his psychic powers, and the baby human girl are able to return the Earth back to its original state, full of life. Unfortunately the inner workings of these 3 elements are never fully explained.
* Perhaps the most famous superhero to be labeled a deus ex is Superman himself, as his writers had a tendency to inflate his powers over the years to constantly trump his previous successes. Kryptonite, Superman's only weakness, then became a sort of "reverse" deus ex machina, which would be called in whenever the writer wanted to explore a conflict which he didn't want Superman to resolve in one punch.
*In Molière's The School for Wives, Agnès is suddenly found out to have been betrothed all along to another man, which spares her from having to marry Arnolphe.
*Tintin's encounters in The Adventures of Tintin involve coincidences that spare his life: heavy weights replaced by wood, a solar eclipse, explosive mines not working, etc.
*In Michael Crichton's The Andromeda Strain, scientists race to find a way to contain an extremely dangerous extraterrestrial virus. In the end, they fail and the virus escapes into the atmosphere, but conveniently for mankind the virus mutates into a completely harmless form.
*In George Eliot's The Mill on the Floss, Maggie is irredeemably disgraced after her involvement in a sordid love triangle, losing the respect of almost everyone she's ever cared about, until the river Floss begins to flood, affording Maggie the opportunity to die a heroine by trying to save her brother and cousin from drowning.
*In Richard Adams' Watership Down, after freeing the local farm dog to attack the Efrafans, Hazel is pinned by the farm cat and about to be killed until a young girl from the farm intervenes by ordering the cat to back away. She then takes Hazel into the country to a location which is coincidentally near his warren. The chapter in which the buildup for this event occurs is indeed titled Dea ex Machina (goddess, in this case).
*In Sharon Shinn's Novels of Samaria, God really is in the machine when it is revealed that the sender of the rain, medicine and seeds from the sky is in fact a highly advanced spaceship named Jehovah that has been instructed to answer the 'prayers' of the genetically engineered Angels. 
*In Dan Brown's Angels and Demons, the location of the antimatter is seemingly revealed by a vision from God, however it is later revealed to be a deception by the novel's villain.
* Clive Cussler, the author of the Dirk Pitt adventure novels, has introduced himself into the plot of a number of his stories so that he may rescue his characters from hopeless situations.
* In Shakespeare's The Merchant of Venice, Antonio's entire life rests on whether or not his ships come to port. It is heard throughout the story that they have all crashed. Yet in the end Portia tells him all his ships have come home, with no explanation as to how they survived the storms or why people believed them all to have crashed.
* In Hajime Kanzaka's novel Shirogane no Majū (白銀の魔獣, which forms the basis for the anime series Slayers), Lina Inverse uses a powerful spell known as "Ragna Blade" to defeat Zanaffar. The reader is never informed of the existence of this spell until she casts it, whereupon Lina reveals that she created the spell herself several days beforehand, which places it within the timeline of the rest of the book and therefore could have been mentioned.
* In the Japanese manga-drama Kashimashi, the protagonist is told out of the blue by an alien lifeform that "you will die in 30 days." Prior to this statement, there had been no indication that the protagonist would have such a sudden death, thus effectively becoming a plot device.
*In The Vile Village by Lemony Snicket, The Baudelaires make a mortar dissolver to escape from jail. The book also contains a self sustaining mobile hot air home named Deus Ex Machine.
*In The War of the Worlds the invading Martians, undefeated by humanity's weapons, conquer Earth, only to be slain by terrestrial bacteria.
*In Douglas Adams' The Hitchhiker's Guide to the Galaxy, after Arthur Dent and Ford Prefect are thrown into deep space by the Vogons, they are rescued by the Starship Heart of Gold, as a side effect of the ship's Infinite Improbability Drive. (Although it should be noted that this is also a parody of such techniques in other science fiction.) 
*In Stephen King's The Stand, the hand of God literally appears at the end and detonates a nuclear warhead in Las Vegas, destroying all of the evil characters in the book (with the exception of Randall Flagg, who survives, without explanation, later awaking on a beach).
*In Philip Roth's The Plot Against America, just as anti-Semitism in the United States seems to be building to a crescendo, President Lindbergh disappears without a trace and Franklin Roosevelt is returned to office.
* In Clive Woodall's "One for Sorrow, Two for Joy", all of the species of small songbirds in Birddom have been wiped out by a mass genocide caused by the magpie armies. At the end of the book, a massive forest fire in Wingland causes songbirds to migrate to Birddom, restoring the natural balance.
* Stephen King's Dark Tower series contains a particularly explicit deus ex machina — the author himself (who is introduced as a character in the plot) writes a note that is absorbed into the protagonist's world and appears in time to help rescue Susannah and Roland from a seemingly hopeless situation in the final book. The note itself contains the words "Here comes the deus ex machina".
* At one point in the manga One Piece by Eiichiro Oda, Luffy is trapped in stockades and moments away from being decapitated by Buggy.  A lightning bolt suddenly strikes Buggy and destroys the stockades.  Many fans believe that the lightning bolt may have been due to the actions of Monkey D. Dragon.
*In J. R. R. Tolkien's The Lord of the Rings, some consider the rescue of Frodo and Sam by the Eagles a deus ex machina. They also arrive to help the Army of the West against Sauron in the Battle of the Morannon, though Sauron is not defeated until the Ring is destroyed. It should be noted that the Eagles play the role of unexpected helpers throughout most of Tolkien's writings. In various versions of The Silmarillion material, an eagle saves the body of the elf-king Fingolfin from defilement, another carries the lovers Beren and Lùthien away from dire peril, and Eagles help fight the dragons of Morgoth during the War of Wrath. In The Hobbit, they helped the Dwarves, Men and Elves defeat the Goblins (Orcs) and Wargs at the Battle of the Five Armies. Tolkien's consistent use of the Eagles in this way, and the fact that these Eagles were servants of the angel-like Vala Manwë, suggest to some readers that this was entirely intentional, making them agents of fate — "machines of the gods" rather than "gods in machines". (Also, some readers believe no satisfactory explanation is given as to why the Eagles could not have simply carried the Ring to Mount Doom, though others disagree with them.)
* In Shakespeare's Hamlet, Hamlet is sent to England and (unknowingly) to his death after killing Polonius.  Later, it is revealed that while on the boat, Hamlet discovered he was to be killed and re-wrote the letter condemning him (his schoolmates Rosencrantz and Guildenstern are executed instead).  Afterward, pirates inexplicably commandeer Hamlet's boat, spare his life, and send him back to Denmark.
* In Shakespeare's Hamlet, Fortinbras arrives at the ending scene to take control of Denmark. It can be concluded that Fortinbras's arrival prevents anarchy throughout Denmark, which would have been a result of Hamlet's and Claudius's schemings. Their actions cause the entire royal family (Hamlet, Hamlet Senior, Gertrude, and Claudius) and potential royal family candidates (Polonius, Laertes, and Ophelia) to disappear.
*In Joe Haldeman's Forever Free there are two dei ex machinis. Mandella's band of space war vetrans from The Forever War have their plan to escape to the distant future thwarted by impossibly disappearing fuel. They return home to discover every human and alien Tauran has vanished leaving only their clothes. On Earth they meet the first deus ex machina, a shapeshifter whose species hid among humans, ran NASA and indirectly caused the Forever War between humans and Taurans. Then, the second deus ex machina is revealed: the galaxy, humans and Taurans were just an experiment set up by some omnipotent godlike being — 'the unknowable'. 'God' took Mandella's fuel to stop them leaving the galaxy and put everyone 'into storage'. 'God' even made up the laws of physics and the unbreakable light barrier. The book ends with 'God' returning the humans and Taurans, announcing he is leaving the galaxy and will be back to check on it in a million years.
*In Ben Jonson's The Alchemist, Lovewit comes back to his house, which he left for the fear of plague, and puts everything in order. Although there was a chaos when he came, he sends the people who were fooled by his butler Jeremy and his two friends, Dol and Subtle, and forgives Jeremy when he promises Lovewit that he will convince the rich widow to marry him.
*In Harry Potter and the Goblet of Fire, Harry's life is saved when his and Voldemort's wand connect causing the effect Priori Incantatem.  Although the fact that their two wands share a feather from the same phoenix was made known in the first book of the series, the effect of the two wands connecting is not revealed or even mentioned until Harry escapes.
*In a Twisted Toyfare Theater comic using Smurfs in a parody of 28 Days Later, two Smurfs are saved by zombies by walking by a castle with guardsmen fending off the zombies with heavy machine guns.  One of the rescued Smurf then says "Hooray for Deus Ex Machina!"
*In Eastman and Laird's Teenage Mutant Ninja Turtles issue 42, Renet appears seemingly out of nowhere to save the TMNT, Casey, April, and Master Splinter from being devoured by a horde of demons.
*In the end of Stephen R. Donaldson's book White Gold Wielder, the last in his Chronicles of Thomas Covenant fantasy series, Thomas Covenant is killed in the final battle with Lord Foul, but reappears as a manifestation of the series' recurring element of wild magic.  Using the white gold ring of wild magic from Covenant's body, Foul attacks the apparition, which only grows stronger with each blow.  At the same time, Foul is drained of all of his power and disappears.  Shortly after, Linden Avery takes the ring and uses it to combine Findail, who is Earthpower incarnate, and Vain, which is the series' Lore incarnate (and, it should be noted, had his hand turned into the same wood that the series' original Staff of Law was made of), to create a new Staff of Law, which instantly restores the Land to its original, healthy state.
*In the book Hatchet by Gary Paulsen, the protagonist, Brian Robeson, is rescued after nearly 2 months in the woods, shortly before winter comes- the book suggests that if he had remained in the wilderness when it had, he might not have survived. While this is debatable, as the reason for the rescue is revealed, and Brian's rescue is the best way to end the book, it seems to be a deus ex machina for the author, as at this point Brian has found a survival pack from the sunken plane, facilitating his survival. Both of these are probably dei ex machinis that cancel each other out.
*The September 11, 2001 attacks are used at the end of the book Night Fall to resolve the plot, although not for the better. A key witness to a previous attack is lost, along with video taped evidence.
*In Kurt Vonnegut's novel Breakfast of Champions, the author himself appears as a deus ex machina.
*In the novel Eldest, the second book in the Inheritance Trilogy, the protagonist Eragon is barely able to train due to a large scar down his back that frequently causes him intense pain. This scar is a major stumbling block for him until towards the end of the book. During an elven celebration, the spirits of dragons emerge during a dance and miraculously heal the scar on his back as if it never happened. In addition, they give him the physical characteristics of an elf, making him suddenly stronger and more powerful.
* The manga and anime series Naruto has a few examples, such as Naruto Uzumaki battling Neji Hyuga in the Chuunin Exam, where Naruto defeats Neji in two hits after Neji seals away all his chakra points.  The most infamous example, however, is most likely the Sasuke Retreival arc, where Neji Hyuga and Chouji Akimichi inexplicably survive fights with much stronger opponents, Sand ninja show up on time to save the remaining ninja on the mission, and Kimimaro Kaguya dies from an illness just before being able to land a fatal blow on Gaara.
====References to the phrase====
* In the Lance Tooks graphic novel The Devil on Fever Street, Satan falls in love with a mortal woman; order is restored when the saintly Black Lily Baptiste is mortally struck by a driverless truck bearing the words "Dusek's Machines" printed on its side.
* In Bored of the Rings, Frito and Spam are rescued by Deus Ex Machina Airlines (parodying Frodo and Sam being rescued by eagles at Mount Doom, in the original Lord of the Rings stories).
* In Isaac Asimov's I, Robot it is used as a part of the description of the relationship between humans and robots.
* Lemony Snicket's The Vile Village (part of the A Series of Unfortunate Events series) the three Baudelaires are caught in the local jail. Klaus makes reference to the term, and this is built upon when Violet uses a loaf of bread, a jug of water and a wooden bench to escape the cell.
* In Futurama Comics #10, The Planet Express crew escape death only to be faced with a life of slavery, prompting Fry to say "Aww man, where's a day-ooze ex machinehead when you need one?"
* Pierre Oulette wrote a novel titled The Deus Machine, about an intelligent computer that can create life.
* The comic series Ex Machina, created by Brian K. Vaughn. The main character, Mitchell Hundred, was a superhero called "The Great Machine" with the ability to control machines who later runs for Mayor of NYC, and wins in a landslide, bouyed by his superheroic successes. In the comic's timeline, he appeared on the scene just in time to save one of the World Trade Center towers from the attacks of September 11, 2001, using his powers to divert and land one of the terrorist-controlled planes.
*In Bertolt Brecht's The Threepenny Opera, Constable Brown arrives on horseback immediately before Macheath's hanging with a Royal Pardon. Although this is acknowledged in the play as it is in the Third Threepenny Finale - Appearance Of The Deus Ex Machina.
*The play Beggar's Opera upon which The Threepenny Opera is based ends with the author of the play (a beggar) being told that the death of Macheath would be contrary to the audience's taste, and Macheath is thus spared.
*The webcomic How to Make a Spritecomic in 8 Easy Bits mocks itself by having a volcano appear from nowhere, saving the lives of three characters, two of which share an exchange: "Hey, y'know how you asked what deus ex machina was the other day?" "Yeah?" "Well, I still have no idea." 
*The webcomic Questionable Content features a storyline where the three main characters are close to meeting a grisly disfiguring fate, until Marten's pet robot, Pintsize, drops a brick on the 'head' of the robot preparing to do the dirty deed.  Pintsize then exclaims, "Deus ex machina!"
*The webcomic The Adventures of Dr. McNinja features a section where the titular character is trying to investigate some recent raptor attacks. After exhausting his ideas for his investigation, a news report about the raptor attacks interrupts him. He exclaims "Finally!" and checks "Deus Ex Machina" off his investigation plan.
*An episode of the show, Lost is named Deus Ex Machina. It involves one of the main characters, Boone falling from a tree in a beechcraft and later dying.
===Cinema, television and radio===
====Examples in plot====
* Possibly the least satisfactory deus ex machina to the audience is the revelation that all or large parts of what has gone before were "all a dream". This was perhaps most notoriously used in Dallas, where an entire season was "unwritten" to allow the resurrection of the character Bobby Ewing who had been killed off.
*Another, more humorous use of the "all a dream" device was the finale of Newhart, where Bob Newhart's character wakes up to tell his wife he's had a dream where he was running a little hotel in Vermont. His wife was played by Suzanne Pleshette, his wife in his previous sitcom, The Bob Newhart Show.
* In The Wizard of Oz, just before Dorothy and her companions reach the Emerald City, the Wicked Witch of the West produces a giant field of poppies that puts Dorothy, Toto and the Cowardly Lion to sleep. The Scarecrow and the Tin Man cry for help, and Glinda, the Good Witch of the North, produces a snow shower that wakes everyone up. The Wicked Witch of the West being melted on contact with water may also count, as there was no indication that this could occur in any previous point in the movie, but it was somewhat implied beforehand in the book, as she always carried around an umbrella there. Also, in the scene where Dorothy misses the Wizard's balloon, Glinda appears and tells Dorothy she had the power to return home the entire time, meaning the Ruby Slippers. When the Scarecrow asks in disbelief why didn't Glinda tell Dorothy about the Slippers, Glinda casually responds that Dorothy would not have believed her and had to learn it for herself. In the original book, this deus ex machina is less so, as Glinda, the only one who knows the shoes will send Dorothy home, doesn't appear until the end of the book.  Finally, this film is yet another example of the entire plot being "all a dream", as Dorothy wakes up in the farm-house at the end, presumably having never left.
*In the film Adaptation., a fictional Charlie Kaufman (Nicolas Cage), goes to a bar with the film writer Robert McKee (Brian Cox), who gives Kaufman the advice, "But don't cheat, and don't you dare bring in a Deus Ex Machina." Ironically, McKee is the embodiment of a Deus Ex Machina, by giving Kaufman the solution to his screenplay. Kaufman also ultimately goes against this advice and ends the film with the irony that his fictional twin brother Donald, who saves his life in the end, may never have really existed in the first place. Instead, Donald may represent Charlie's inner struggle to write a Hollywood blockbuster or stay true to his artistic vision. Another Deus Ex Machina exists in the film when an alligator dives into the swamp at the end to attack John Laroche (Chris Cooper) which prevents Laroche from shooting and killing Charlie.
* In the film Jurassic Park, when the main characters reunite at the end of the film, they find themselves surrounded by velociraptors in the Visitor's Center.  Before any of them can pounce, a Tyrannosaurus rex crashes through the building to attack the raptors, thus giving the characters an opportunity to escape. In the original novel this was handled quite differently, as Alan Grant kills the raptors with poisoned dinosaur eggs.  
* In the film Jurassic Park III, when the main characters are fleeing and at the end of the film, as soon as they arrive at the beach, the US Navy and Marines arrive to stabilize the situation and kill the dinosaurs.
* At the end of the film Congo, when the cast are about to be overwhelmed by lava, they pull out a hot-air balloon from the equipment they had taken.  Prior to that point, no mention of this equipment had been made.
* In the film The Mummy Returns, just when the cast were about to be killed, an airship comes and rescues them from the top of the pyramid.  This airship had previously been damaged, seemingly beyond repair.
* In the episode "Operation -- Annihilate!" from the first season of Star Trek: The Original Series, Spock is infected by an alien parasite which has overwhelmed a Federation colony world. Discovering that intense light will kill the parasites, Spock volunteers to be exposed to this light. He is cured, but also blinded. In the end, he miraculously recovers his sight, explaining that as a Vulcan he has nictitating membranes that protect his eyes from the intense solar radiation on his homeworld.
* In the season 5 episode of Star Trek: The Next Generation entitled "The Game", the crew of the Enterprise are influenced to do the bidding of an alien race as a result of a psychotropic reaction caused by an addictive game introduced to the ship. They are rescued at the end of the episode when Data, who had until this point been deactivated by members of the crew already under the aliens' influence, enters and uses a flashing light to remove the addictive psychotropic effects of the game, and thus cure the entire crew.
* Star Trek in general is often cited as over-using technology-based plot devices in deus ex machina fashion (see Treknobabble).
* In the animated movie version of the "Transformers", the Autobot Matrix of Leadership could be called a "Deus Ex Machina" because it causes the destruction of the planet-destroying Unicron.
* In Yu-Gi-Oh!, dei ex machinis are frequent throughout the show. Often when a character (usually Yugi Muto, or another hero) has the odds against them, and they are about to lose, they draw a helpful card that leads to their victory. Often, this card is a brand-new card; occasionally, this card will never be played again and in one case caused a perfectly legal move by an opponant to fail. This is called 'The Heart of the Cards' in the English adaptation, meaning that the duelist's deck feels their need to win, and gives them the card they need. During the final duel in all versions of the anime, Atem claims that the spirit of his Deck allows him to draw the perfect card for the current situation several turns in a row. In actuality, it is luck. The Winged Dragon of Ra could arguably be the most famous Deux ex machina of the series: every time it is played, it demonstrates some sort of new special ability.
* The seventh (and final) season of Buffy the Vampire Slayer concludes with a series of unlikely events to save the world from the near-impossible to stop evil. Buffy receives an amulet from Angel which Spike uses conveniently to destroy the Hellmouth and the scythe used to activate every slayer is introduced by having the villains dig it up.
*In V: The Final Battle mini-series, when the mothership is about to destroy Earth, a young half-alien/half-human girl suddenly reveals her "magical" powers by aborting the self destruction of the vessel's reactors.
* At the end of the anime My-HiME the previously "dead" characters are brought back to life in order to fight the final battle by Mashiro, whose powers were supposedly sealed and under the control of the Dark Lord. The character Miyu could arguably be called a Deus ex Machina because of her pivotal importance in both My-HiME and its sequel, My-Otome
* In Bill and Ted's Bogus Journey God literally provides the deus ex machina by giving Bill and Ted access to some intelligent aliens, who in turn build the "good robot us-es". This allows everything to be resolved. In both Excellent Adventure and Bogus Journey, the characters are supplied with certain items when needed (such as a jail-cell key), on the basis that they will use the time machine to return after they've finished their task to leave the items there.
* In the film Ocean's Twelve, director Steven Soderbergh introduces the FBI official to be Matt Damon's character's mother. She signs their release forms and allows them to escape custody.
* In Ocean's Twelve, the film is about how George Clooney's character and his team pursue the 'prize' for the whole show.  At the end, it is revealed that the Nightfox (Vincent Cassel) actually stole it right before Clooney's team, except in narration ( and flash-by scenes ) at the end Clooney explains that his team had stolen it before the movie really began, in some mysterious time warp where the cameras didn't bother to go.
* At the end of Half Baked, just when the heroes are about to be killed by drug lord Sampson, Brian uses his "Jerry Garcia in a pouch", which causes Jerry Garcia to appear and hit Sampson in the face with a guitar.
* Near the end of Ice Age, Diego, a saber tooth tiger, shows up alive and well, after a previous scene where he had appeared to die and been left behind. Diego explains his sudden miraculous recovery as "nine lives." This could be because he was unwilling to face the humans he had attacked with the rest of his pack, despite having helped to return the human baby to his family.
* The end of Shaun of the Dead finds the two lead characters Shaun and Liz in an apparently hopeless situation, surrounded by hundreds of zombies with little or no chance of escape. Suddenly, seemingly from nowhere, the army descend upon the zombies, attacking and destroying them and rescuing Shaun and Liz.
* In Superman: The Movie Superman turns back time by flying around the world until it spins in the other direction. While Superman is supposed to be fast, there is no evidence that he could go that fast before. For example, if he had, he would have been able to stop both missiles.
* In the Batman TV series, and subsequent movie, Batman's utility belt usually contains something unexpected which extricates him from a seemingly inescapable situation, as evidenced by his can of Shark Repellant Bat Spray, emergency oxygen tank, and rocket boots.  In fact, a great majority of the adult humor in Batman (frequently missed by children of the time who watched it) came from comedic cases of deus ex machina.  In the original Batman movie, there were at least eight cases where a plot-saving event occurred entirely out of the camera's view and referred to only in passing.
* R2-D2, in the film Star Wars Episode II: Attack of the Clones, used hitherto unused and never mentioned rocket boosters to fly across the droid-making factory at Geonosis to save Padmé by stopping the factory's operations.
* In "Mars Attacks," right when the human race seems to have lost, a weapon is found in the song "Indian Love Call" by Slim Whitman which causes the Martians' brains to explode*
* In the final episode of the Comet Empire series of Star Blazers (Space Battleship Yamato), Wildstar (Kodai) is prepared pilot the crippled Yamato on a kamikaze mission into Zordar's dreadnought (as he did in Arrividerci Yamato). At the last minute, Trelaina of Telezart stops him and, along with resurrecting a recently killed Mark Venture, she becomes a being of pure energy and vaporizes Zordar, sacrificing herself thus saving the Star Force and Earth.
* At the end of the first movie of the The Matrix trilogy, Neo apparently gets shot to death inside the Matrix by Agent Smith. Just in time he realizes that the Matrix is not real, that the bullet is not real and that therefore his death cannot be real. He resurrects and defeats the agents using his newly gained understanding of the Matrix.
* At the end of The Matrix Revolutions, Neo bargains with a machine to destroy Agent Smith and save the Matrix.  The machine is named Deus Ex Machina.
* In The Hudsucker Proxy, as the main character, Norville Barnes, is plummeting to his death from the top of the Hudsucker Building, the janitor stops time (and Norville's fall by default) by jamming a broom handle into the gears of the Hudsucker Building's clock.
* On 24, Jack Bauer is often put in a situation where he is about to be shot at. However, the antagonist is usually either out of ammunition, or reinforcements arrive to kill the antagonist (e.g. Peter Kingsley in season two).
* In many episodes of Dragonball Z and Dragonball GT Goku arrives just in time to save an ally (i.e. Goku's knick-of-time arrive to save Gohan from being trampled underfoot by Nappa), and various abilities that he employs that turn the tide of battle at the most critical moments (Spirit Bomb). It is also revealed that his "death" on planet Namek was prevented because he merely managed to remember that Captain Ginyu's spaceship was still on the imploding planet, in the same episode it is made known that Frieza also survived the battle and the subsequent fracturing of said planet because he can survive in the vacuum of space.
* In Zoids: Genesis, Ra-Kan is seemingly killed in the previous episode where Bio-Tyranno's Jiin cannon destroys everything surrounding Ra-Kan and his Zoids. However, he and his Zoids Sword Wolf make a return in the final episode saving Garaga from the clutches of Biotyranno in the nick of time, allowing Ruuji to deliver the final blow. The explanation given was that the barrier system onboard the Bio-Tricera protected him and his Zoids from the blast.
* In Donnie Darko, near the end when Donnie is trying to find Grandma Death, the high school bully suddenly attacks him.  The bully yells, "Look, there's a car coming," and Donnie mutters, "deus ex machina" under his breath. The bully replies, "What did you say? What the fuck did you say?" and Donnie replies, "Our saviour." The bullies mistake the car headlights for a cop car and run away, saving the main character from the confronation with the bullies. (However, his girlfriend, Gretchen, is run over and killed by the car.) An instance which can be mistaken as Deus ex Machina is the sudden revelation that villain Jim Cunningham had been dealing in child pornography, discovered after his house burns down. This seems to be a very obvious Deus ex Machina because this aspect had not even been as much as hinted at previously in the movie, however in his infomercials there is a subtle hint at this.
* In the bizarre final season of the television show Roseanne (TV series), Roseanne ends the series by telling the audience that the entire season was a fantasy she concocted as a way to deal with the death of her husband Dan (John Goodman).
* Before the final battle in the anime Vandread against the Harvester fleet from Earth, as the fleets of the Tarak, Mejale, and other factions throughout the series assemble, Gascogne suddenly appears to aid them, piloting a commendeered Harvester mothership. She is presumed to have died in a previous episode, when she crashed her shuttle into the same automated mothership, disabling it and allowing the crew of the Nirvana to escape.
* There are actually two examples of this in the film Constantine.  Through the arrival of Lucifer to stop the movies main antagonists as well as God's intervention at keeping John from going to hell, at the end of the movie, both of the story's antagonists are thwarted, the protagonist is resurrected, cured of cancer, and the soul of Angela's sister is released from Hell, due to the fact John slits his own wrists in an effort to buy time (because when you die time stops) and gambles that the joke made through out the movie (John's soul is the one soul Lucifer would come up to earth to collect himself) would be true.  Lucifer does arrive to collect john's soul, but ends up curing John's cancer because rather than asking Lucifer to cure him of cancer for informing him of his son's plan to take over earth he asks Lucifer to allow Angela's soul to go to heaven.  This selfless act redeems John's soul and allows him to enter heaven, how ever Lucifer feels cheated by this and cures John counting on him to sin again and prove his soul actually belongs in hell.
* In the film Turbulence, despite the fact that the plane has been extensively sabotaged, a car was picked up by the plane's undercarriage, was severely damaged when it was removed by blasting with an air-to-air missile, and that various attempts to land the plane were thwarted by the afore-mentioned events, when the pilot of the escort aircraft radioed the stewardess that she could now land the plane, she was able to do so, without doing any repair work.
* Most episodes of American sitcom Kenan & Kel involved the duo finding themselves in a difficult situation that gradually became virtually irreconcilable, at which point Kel would shout "Aw, here it goes!" and the episode would end.
* In Nick of Time, Gene Watson is frustrated at every attempt to try and rescue his daughter, and thus not have to assassinate the Govenor.  He is constantly watched by various people in on the conspiracy, who will radio the woman holding his daughter at gunpoint and have her kill the daughter.  Right at the end, when all hope is lost, they enter a part of the hotel where all radio signals are lost, thus allowing him the break he needs to rescue his daughter without alerting the kidnapper.
* Literal deus ex machina appear in Clash of the Titans. Perseus receives a number of gifts from the gods, each of which allow him to succeed where he would otherwise have failed in achieving his destiny.  The last of these gifts is a mechanical owl called Bubo (a literal reversal of the phrase deus ex machina), which arrives in time to guide Perseus and the soldiers when they are lost trying to find the Stygian Witches.  Another example may be found towards the end of the film.  Perseus collapses in the amphitheatre of exhaustion, all hope of saving Andromeda lost.  Zeus, on Mount Olympus picks up the collapsed clay model of Perseus and stands it upright, thus restoring his energy and allowing him to fight the Kraken.
* At the start of some Knight Rider episodes, a piece of new equipment would be installed into KITT.  Later in the episode, this equipment would almost certainly be required to allow Michael Knight to succeed in his assignment where he almost certainly would have otherwise failed.
*In the Battlestar Galactica episode Epiphanies, Colonial President Laura Roslin is saved from dying of breast cancer when she is injected with blood from Sharon Valerii's unborn Human-Cylon hybrid daughter, seemingly eradicating the cancer completely.
*Towards the end of Indiana Jones and the Temple of Doom, just after Mola Ram has plummeted to his death, British troops arrive on the scene and help get rid of the rest of the villains.
*In many episodes of Batfink, events would come to a head with Batfink in a seemingly fatal situation. At this point the action would freeze and the narrator asked dramatically whether Batfink would survive. Then the action would continue with Batfink surviving, either through use of deus ex machina or through him using his superpowers.
*In A Connecticut Yankee in King Arthur's Court, just at the point of execution, Hank Morgan realises that a solar eclipse is about to occur, and uses fake magic words to frighten the guards to release him and his friends.  Another example occurs towards the end of the film.  During a duel, he is knocked unconscious and wakes up back in his own time, therfore realising that it was all a dream.
* In the Doctor Who episode "The Parting of the Ways", the Earth is being bombed by an unstoppable Dalek invasion fleet while the Doctor is facing certain death surrounded by Daleks in a space station control room. At this point, the Tardis materializes, and Rose Tyler, the Doctor's assistant, emerges suffused with power having "looked into the time vortex". With a wave of her hand, the Dalek extermination fleet is decomposed into atoms saving the day. This side-effect of looking into the Time Vortex had never been mentioned or alluded to in any of the previous episodes.
* In a later episode of Doctor Who "Doomsday," when the cybermen are coming up the stairs to stop the Doctor and Rose, Yvonne Hartman as a cyberman still with emotions, stops and kills them, enabling the Time lord and his companion to save the day. Prior to this, everyone who had ever been converted into a cyberman had lost all sense of emotion and would never ally themselves with the enemies of the cybermen. (Contrived but not unprescedented, it was stated that some people were unsuitable for conversion, Yvonne was uregntly converted and previous such conversions in Tomb Of The Cybermen, Attack Of The Cybermen and Silver Nemesis (book version) had all yielded rogue cybermen.) 
* In the Nip/Tuck episode, "Faith Wolper, Ph.D", Sean's ex-nurse Monica Wilder, with whom he had a one-night stand, is threatening to tell Julia about it, and also threatening to tell the police that he raped her. Their argument goes from Sean's office out into the street, where Monica is promptly hit and killed by a bus.
*In the Sex and the City episode, Four Women and a Funeral, in the honour of a deceased fashion designer named Javier, who died of a heroin addiction, a halfway house is being built for those in the fashion industry who suffer from substance abuse. Samantha is helping raise funds with the ulterior motive of gaining access to the priceless mailing list and unlisted 212 numbers in Manhattan. While pitching to a powerful investment banker she ends up making out with him only to have his powerful socialite wife walk in on them. In 24 hours Sam goes from A-list to blacklist and becomes a socal pariah. After all avenues are exhausted the only way she can help Javier House is by literally assisting with the construction. As she's struggling in the heat a man with an angelic glow around him appears and offers Sam his hand and Sam reaches out to take it as if she is reaching for the hand of god. Carrie narrates "It was Leonardo DiCaprio, ex machina". Leo, who is never actually seen, and Sam become fast friends and Leo brings her back to social life.
*The character Fallon, in film adaptation of #REDIRECT "The Prestige" while remaining in the background for primarily the entire time, is thrust into the spotlight once the film as reached its climax and Borden is about to executed. It is revealed that Fallon is Borden's twin brother, and that he and Borden alternated roles as Borden and Fallon, explaining much of Borden's erratic behavior. One brother (possibly Fallon) is executed), while Borden takes his revenge on Angier and reunites with his daughter.
*Close to the end of X-Men: The Last Stand, Warren Worthington II is thrown out the window of his lab by the Brotherhood of Mutants, intending to destroy his mutation cure. He is rescued by his son Warren Worthington III, known as Archangel in the comics, who suddenly flies in and catches him.
====Examples for comic effect in plot====
This is not specifically the use of the device in comedy, but the specific comedic use of a deus ex machina that at least some of the audience is expected to appreciate as such.
* In Moliere's l'Avare, a very rich and obscure charachter only briefly mentioned before appears without any reason and by an incredible story turns out to be the father of two characters, as well as a friend of Harpagon, the Miser. He is willing to pay for the happy ending by taking care of the wedding expenses, everyone's dowries and even buying a new suit for Harpagon. This mocks certain comedies of the time in which an irreelevant character turns out to be everyone's father. Note the striking perpetuation of this tradition in Star Wars.
* In The Spongebob Squarepants Movie, while Spongebob and Patrick are being chased by a monster, a larger monster suddenly appears to eat the one that was chasing the heroes. This is also the opposite of a deus ex machina, because the monster subseqently eats the car the heroes were driving.
* The writers of Monty Python's Flying Circus admitted to using several deus ex machina devices when they were unable to find a conclusion to a particularly ridiculous sketch. Three of the most famous were "The Colonel", where Graham Chapman would enter dressed as a colonel and tell them to stop, saying the sketch was "silly", "The Knight with the Chicken", where a fully-armoured Knight, played by Terry Gilliam, would enter the scene and hit one of the actors over the head with a raw or rubber chicken,  and "The 16-ton Weight" which would suddenly fall to end a scene.
* Monty Python and the Holy Grail employs the device, in combination with "breaking the fourth wall" in several places. While attempting to enter a cave, the knights of the Round Table are attacked by a bloodthirsty rabbit which they can't overcome, but they manage to kill it with the Holy Hand-Grenade of Antioch, its bearers (let alone the device itself) never having been referred to before. Having entered the cave the knights are then attacked by the Ravenous Black Beast of Arrrgh, with no apparent hope of survival. At this point, it is revealed by the narrator that the film's animator suffered a fatal heart attack, obliterating the animated monster. Later, the film's final battle sequence is suddenly interrupted by the appearance of the police, who immediately arrest the entire on-screen principal cast of medieval characters, apparently for murder.
* Monty Python's Life of Brian also utilises the deus ex machina for comedic effect. In one scene Brian falls from the top of a high tower, only to be saved by an alien spaceship that happened to be passing. He is taken on a joy ride through the solar system before the space ship is shot down and crashes at the foot of the very tower he had just fallen from. A bystander who witnesses all this remarks, "Ooh, you lucky bastard!"
*At the end of the film This is Spinal Tap, a declining heavy metal group is rescued from the brink of ruin when one of its earlier albums reaches the top of the charts in a non-English-speaking country. While not truly a "deus ex machina" ending (earlier scenes establish them as talented musicians and composers despite being thoroughly execrable lyricists), this is an obvious attempt to satirize the tendency of some filmmakers to tack on such incongruously happy endings.  
*In the cartoon The Angry Beavers, at the end of the episode "Moby Dopes", during which the two main characters are terrorised by a Killer Whale in their pond, it is suddenly eaten by a Tyrannosaurus rex. The character Norbert then exclaims "Where in the name of deus ex machina did that T-Rex come from?"
* In the Futurama episode Godfellas, Bender is returned to Earth by God after being stranded in space with no hope of rescue. He crashes to Earth a few feet in front of Fry and Leela, provoking the response "This is by a wide margin the least likely thing that has ever happened" from Leela. It should also be noted that this would also be a reverse of the literal translation of the phrase deus ex machina, God from the Machine.
* In the British sitcom Bottom, Richie and Eddie are trapped atop a crumbling ferris wheel. Facing certain death they pray for their lives - literally. God's hand promptly appears and Richie and Eddie, looking stunned climb aboard. Normality is restored when they announce to the audience they don't believe in God; the hand disappears and they fall to their doom.
* In the Disney movie The Emperor's New Groove, a chase occurs where the Emperor Kuzco (who has been turned into a llama) and his friend Pacha are being pursued back to the palace by Kuzco's evil advisor Yzma and her assistant Kronk. During the chase, Yzma and Kronk are struck by lightning, and fall into a gorge, leaving Kuzco and Pacha seemingly free to return to the palace. Upon their return, they discover that Yzma and Kronk are already there, and when Kuzco asks Yzma how they got back before they did, she looks confused and asks Kronk. Kronk pulls out a map of the chase and says "You got me. By all accounts it doesn't make sense.", showing the characters' awareness of the deus ex machina that has just been perpetrated. At one point after this, Yzma becomes angered with Kronk and opens a trapdoor underneath him, causing him to fall (One would think down.) Later, the characters are battling over the potion to return Kuzco back into a human, and Kronk opens a hatch on the top of the palace, commenting, "What are the odds that trap door would lead me out here?", knocking the potion out of Yzma's hand and into the hands (hoofs) of Kuzco.
*Most of Gilbert and Sullivan's operettas use a deus ex machina to resolve hopelessly complicated situations and tensions whilst also satarising British culture.  Without this device, most of the stories would require either bittersweet or tragic endings.  Popular uses include absurd extensions of the laws of logic, as used in The Mikado, Ruddigore, and Utopia, Ltd., to parody English Common Law, or a revelation as used in The Pirates of Penzance, The Gondoliers, and Iolanthe.
* Near the end of Anchorman: The Legend of Ron Burgundy, Ron Burgundy and Veronica Corningstone are trapped in the bear pit at the zoo. Ron's dog, Baxter, comes out of nowhere and speaks to the bear's honor through the clever use of subtitles. The bear lets them leave.
*George of the Jungle and its sequel contain several deus ex machinas. In one instance, George is shot by Lyle. But the narrarator notes that George survived simply because he is the hero of the story and it would not go on without him. Similarly, in the sequel, Ursala's mother travels through the depths of the jungle to find her daughter. She annoys her convoy of natives so much that they cast her off a bridge over a high cliff; however the narrator resets the situation after explaining that she needs to be alive for the story to progress, to the disappointment of the convoy. In one ultimate deus ex machina, Lyle has George at gunpoint and none of the characters are able to do anything. As the narrator comments on the situation, Lyle insults him. Annoyed, the narrator reaches down from the sky and plucks Lyle out of the story.
*Megas XLR ended a lot of its episodes with a deus ex machina. In one episode, Coop developed a teleportation device, but never found a way to specify what object teleported or to what location it would teleport to. In the end of the episode, when the Glorft were charging up a laser capable of destroying Earth along with MEGAS, Coop accidentally triggered the teleportation device, which teleported his Mega Slush onto the Glorft ship's control panel. It spilled, causing the ship to implode and thus save the earth. In another episode, Coop had a button on his console specifically labled "5 Minutes Till End of Episode", which he pressed, obviously, at the 5-minute mark before the end of the episode. This increased the action and essentially reversed the flow of battle. Additionally, Coop has several other buttons on his dashboard for specific instances, such as a "Destroy Moth-Like Bug" button and a "Save the World" button; however he may not always use them when he has the chance.
*In the movie Beerfest, after a member of the protagonist's drinking team is killed, his twin brother, who up to that point had never been mentioned, replaces him, even utilizing his nickname. One of the other team members remarks that it was as if he never died.
*A sketch in the radio show That Mitchell and Webb Sound (and more recently, the TV sketch show That Mitchell and Webb Look) was a spoof on crime-fighting duos.  The duo featured were called Angel Summoner and BMX Bandit, and appeared in a series of short segements within the show.  Each segment involved a crime situation where BMX Bandit would outline how he would use his BMX skills to take out the villains, and how Angel Summoner could assist.  This was always met with Angel Summoner saying "yes...or I could just summon a horde of Angels to do the job for us".  This was always met with disappointment from BMX Bandit, who never got a chance to save the day.
*Some episodes of The Simpsons have employed deus ex machina as a way of getting the writers out of an impossible situation, by having the action take place off-screen.  An example of using this for comedic effect may be seen in Monty Can't Buy Me Love.  Mr. Burns, rolling up his sleeves getting ready for a fight, approaches the Loch Ness Monster with the intent of capturing it.  The scene cuts to a helicopter carrying Nessie, with Homer Simpson congratulating Burns.  Burns is very dismissive, saying that the hardest part was getting himself swallowed, but after that "...well, you know the rest".
* The final episode of "Crossroads", a British TV soap opera featured an amusing deus ex machina. The show had been cancelled due to poor ratings so the producers decided to end the show on a joke- a fadeout revealed the entire 25+ year run of the show had been a daydream by a bored supermarket worker. Given the occasional past crossover episode with other shows, a great deal of all British TV must have been part of this shopworker's dream!
* In Yu-Gi-Oh, when Yugi, Bakura, Tea and Tristan were being chased by a boulder they hit a dead end. Tristan ties to stop the boulder himself with a punch, actually destroying the said rock. It was revealed to be only a balloon with speakers inside.
* The fourth series of the BBC Radio 4 comedy Revolting People used a couple of examples.  At the start of the series, the "It was all a dream" ploy was used to reverse the revelations made at the end of the previous series.  In another episode, Samuel Oliphant just happens to bump into his estranged sister quite by chance, many hundreds of miles from where he was hoping to find her.  In both of these examples are followed by conversations which make it clear that the writers recognise the ridiculousness of using these plot devises.
* In the Stargate SG-1 episode 200 various plot ideas were run past the SG-1 team.  This included a scene where the team were racing to the Stargate whilst being chased by the replicators, with only "10 seconds before the time dialation field kicks in and we'll be trapped here for ever!".  The team then realise that they were cut off from the gate by an entire Jafar army.  The scene then cuts to the base with the team exiting the wormhole with the comment "Well, that was close".  It is worthwhile to note that a number of other plot clichés were also referenced and ridiculed in this episode, including jumping the shark.
====References to the phrase====
* At the end of the film Dodgeball: A True Underdog Story, the film's deus ex machina, a treasure chest containing the main character's gambling winnings has the phrase "Deus ex Machina" written on it.
* Deus Ex Machina is the name of the ship Joel Robinson uses to escape from the Satellite of Love on the television show Mystery Science Theater 3000. It should be noted that the escape ship was not so mysteriously discovered inside a box labeled Hamdingers.
*An episode of Stargate SG-1 is called "Ex Deus Machina". This is a play on words to mean "former god".
* In Nadia: The Secret of Blue Water Deus Ex Machina is the name of one of the flying ships that Gargoiles from the Neo-Atlantides used to attack the Neo-Nautilus.
* The 19th episode of the TV show Lost is called "Deus Ex Machina". In the episode Locke dreams about a crashed plane, located somewhere on the island. He believes that if he finds the plane, the answer to his problems will present themselves, specifically how to open a mysterious hatch buried under the ground. The plane is found, but does not directly reveal any answers, and instead leads to the death of Boone; however, at the end of the episode a bright light shines from the hatch. The suggestion is that Boone has been "sacrificed" to the island, in the fashion of an angry god.
* With intentional irony, the machine figurehead in The Matrix Reloaded and The Matrix Revolutions is named the Deus Ex Machina.
* In The Simpsons episode "Thank God It's Doomsday", after the rapture occurs and Homer Simpson is taken to heaven, he asks God to reverse what has happened. God agrees, then proclaims "deus ex machina" and normality is restored magically.
* In Olive, the Other Reindeer, a movie by Matt Groening, Olive finds a package marked, "To: Olive, From: Deus ex Machina". It contains a metal file which she uses to free herself from captivity in the back of the evil postman's truck.
* In The Daily Show segment, "This Week in God", Steven Colbert (Rob Corddry, after Colbert left the show) uses "The God Machine" (also called the Machina Ex Deus) as a physical, floating button to introduce the topics.
*In the show Angel, characters (such as Cordelia) often have prophetic visions given by the godlike Powers That Be, which can serve as a deus ex machina. At one point, when a ritual to re-ensoul Angel fails to work, Lilah refers to it as a "duds ex machina."
*In the film Adaptation., when Charlie tears down his list of Robert McKee's 10 Commandments, the 7th one reads: "Thou shalt not use deus ex machina to get to thine ending."
===Video games===
====Examples in plot====
*Near the end of Super Smash Bros. Brawl’s adventure mode, “The Subspace Emissary”, it appears that Tabbu is about to kill all of the protagonists, Sonic appears out of nowhere and destroy’s Tabbu’s “Off Wings”, rendering him incapable.   — Preceding unsigned comment added by 72.197.37.22 (talk) 03:10, 20 February 2019 (UTC)
thread_title: Untitled

message: ====Examples in plot====
*Near the end of Super Smash Bros. Brawl’s adventure mode, “The Subspace Emissary”, it appears that Tabbu is about to kill all of the protagonists, Sonic appears out of nowhere and destroy’s Tabbu’s “Off Wings”, rendering him incapable.   — Preceding unsigned comment added by 72.197.37.22 (talk) 03:10, 20 February 2019 (UTC)
thread_title: Video games

message: *Near the end of Super Smash Bros. Brawl’s adventure mode, “The Subspace Emissary”, it appears that Tabbu is about to kill all of the protagonists, Sonic appears out of nowhere and destroy’s Tabbu’s “Off Wings”, rendering him incapable.   — Preceding unsigned comment added by 72.197.37.22 (talk) 03:10, 20 February 2019 (UTC)
thread_title: Examples in plot