%% This page is not for complaining about plot twists or discussing them.
%% Also, take note: "Like the Deus Ex Machina, it only applies if it comes out of left field."
%% It is not just any plot twist that complicates things for the protagonists.
%% Image selected per Image Pickin' thread: http://tvtropes.org/pmwiki/posts.php?discussion=1452266899092104700
%% Please do not change or remove without starting a new thread.
[[quoteright:350:[[Webcomic/{{Sinfest}} http://static.tvtropes.org/pmwiki/pub/images/sinfest_bad_ending.png]]]]

->''"This is not the convenient plot twist that saves our heroes. This is the convenient plot twist that makes them even more screwed."''
-->-- '''[[WordOfGod Ryan MC]]''', ''Webcomic/TwoEvilScientists''

Diabolus ex Machina (''[[AltumVidetur Devil from the Machine]]'') is the EvilCounterpart of DeusExMachina: the introduction of an unexpected new event, character, ability, or object designed to ensure that things suddenly get much worse for the protagonists, much better for the villains, or both. [[Website/TheEditingRoom This could also be called]] Acute Dramatic Necessity Disorder.

Observers of this trope should note three things:
# Diabolus ex Machina is often brought in simply because if the villain were to lose, [[FailureIsTheOnlyOption the story would be over]]. Like the Deus ex Machina, it only applies if it comes out of left field.
# Like the Deus ex Machina, a Diabolus ex Machina does not necessarily occur at the end. Though it often overlaps with {{Ending Trope}}s, it should not be confused for one.
# The Diabolus ex Machina, while a very common PetPeeveTrope when used for a DownerEnding, [[TropesAreTools can be pulled off]] - See the entire "[[RuleOfIndex Rule of X]]" series of tropes.

If a movie ends with a "TakeAMomentToCatchYourDeath" for the [[KillEmAll last surviving character]], it may be this. Compare DiabolusExNihilo, AssPull, and CruelTwistEnding, as well as LifeWillKillYou. Often the cause of a SuddenDownerEnding. Likely to be employed by writers who believe that TrueArtIsAngsty.

Please note that the examples below will '''contain lots of ending-spoilers''', as many tend to be on the tail-end of stories. But we'll try to keep you from getting too spoiled.

%%Note that most real life sports examples have been removed because, as many have pointed out, one side's impossible loss is the other's miraculous win.


[[folder:Anime & Manga]]
* [[spoiler: Takakko's death]] in the anime version of ''Literature/{{Another}}'' qualifies. Not only was she not an inherently villainous character, not only was death not the only way to resolve the situation, but killing her in the way she was ensures there can be no potential reconciliation with Izumi, who spends the rest of the series thinking [[spoiler: her rival and crush]] murdered [[spoiler: her best friend]].
* ''Franchise/{{Gundam}}'':
** ''Anime/MobileSuitGundamMSIGLOO'' Episode 5: [[spoiler:The very young recruit, Erwin, has survived the sortie, and talked his opponent into being taken prisoner rather than dying needlessly when a blast of laser fire from a distant Salamis kills them both]].
** Something happens like this in the Gundam Side-Story ''Space, to the End of a Flash'', where the pilot of the Gundam Unit 5 survives the battle of A Baoa Qu and is returning to the ship... [[spoiler:only to be shot in the back by a barely alive Gelgoog]].
** Again in the ''Gundam Evolve'' story involving the [[Anime/MobileSuitGundam0083StardustMemory Dendrobrium Orchis]], [[spoiler:where the pilot is shot by a dying Zaku when he back was turned just as they were cutting to the credits]].
* ''Manga/AngelSanctuary'' seems to fall into this trope. Especially when Setsuna finally reunites with his loved sister, a wacko angel girl shoots her and enrages Setsuna, causing TheEndOfTheWorldAsWeKnowIt. (The manga goes ''well'' past this point but there's Still plenty of DeusAngstMachina.)
* ''Anime/CodeGeass''. Given the number of times Lelouch has horrible events happen right in his moment of triumph, one might expect that he leaves an open place setting at his dinner table just for Diabolus.
** Sure, Mao showed us that a Geass grows stronger with repeated use and a careless user runs the risk of losing control of it. Of course, Zero's Geass just ''had'' to backfire at the [[SnicketWarningLabel "everything will get better now" moment]], and in the most inconveniently nasty way ''ever'', to boot. (Lelouch saying the worst possible thing at the worst possible time, to the worst possible person, made it even worse.) What makes [[spoiler: the "kill all Japanese"]] incident SO much worse is that Lelouch clearly was about to confess all his wrongdoings to [[spoiler: Euphemia]] and leave his villainous ways behind. Only to slip up and stumble right into the MoralEventHorizon without even wanting to. After this you just know [[spoiler: there will be no happy ending for Lulu]].
** Season 2 surpasses it when [[spoiler:Lelouch commanding Suzaku to "live" in season 1 caused Suzaku to nuke Tokyo when it activated, heavily implying the death of Nunnally]]. It's like an UpToEleven version of Season 1. In both seasons, every time the Order of Black Knights seems to be winning a battle, you can set your watch to some new Britannian super-Knightmare Frame showing up and sending everything to hell. Honestly, you'd think they were pumping these things out of their asses faster than ''[[Anime/NeonGenesisEvangelion Evangelion]]'' with how many show up.
* ''Anime/WeissKreuz [[OddlyNamedSequel2ElectricBoogaloo Gluhen]]'' never promises better than a BittersweetEnding, but the final scene of the series is pure Diabolus ex Machina; having cut ties with everyone he ever knew and left Japan, Aya goes walking down a sidewalk in New York and [[spoiler:Diabolus, in the form of a scruffy little boy, runs up and stabs him in the gut. He ends up collapsed against a mailbox, having a flashback of his former teammates, while the pedestrians walking past pay no attention to the guy apparently bleeding to death all over the sidewalk]].
* Played for laughs in the ending of every episode of ''Manga/RockLeesSpringtimeOfYouth''.
* The final sequence of Anime/{{Kite}}.
* ''Anime/NeonGenesisEvangelion'':
** ''End of Evangelion'': [[spoiler:Asuka finally snaps out of her depression coma and gets a SugarWiki/MomentOfAwesome when she kills nine Mass Produced Evas in three minutes]]. She barely finishes, but it's looking up. The [[spoiler:Seele army has been driven out, Rei, Shinji and Asuka are alive, Ritsuko's plan to detonate the entire complex failed, Shinji isn't in his psychopathic mother and [[AssimilationPlot Instrumentality]] has been averted. Then [[http://www.youtube.com/watch?v=2Bpx66Ld-TI Asuka gets speared by a Lance of Longinius, right as her power runs out. Her Eva is then partially EATEN ALIVE by the Mass Production EVAs]], [[JustForFun/{{Egregious}} who simply regenerated the wounds Asuka inflicted on them]], [[HumanPincushion and skewered to death by even more fake Lances]]; Shinji gets in Unit 01 and Rei fuses with Lilith, becomes a giant white god and turns all of humanity into orange juice on Shinji's orders]].
** In the original series, everything is going fine, if not a tad [[TrueArtIsAngsty angsty]]. Shinji's social skills are improving, Asuka's teamwork is going well and Rei is beginning to show some humanity. A few episodes later and [[spoiler:Asuka's been {{Mind Rape}}d, Shinji is catatonic and Rei is dead, replaced by a clone]].
** ''[[Anime/RebuildOfEvangelion Rebuild 3.0]]'' takes this UpToEleven; also an interesting example in that the Machina occurs ''entirely'' during the first half of it. ''[[Anime/RebuildOfEvangelion 2.0]]'', the previous film, ends with an epic final battle where Shinji manages to kill Zeruel and rescue Rei during a SugarWiki/MomentOfAwesome; 3.0 begins with Shinji in turmoil resulting from the fully realized consequences of those actions. [[spoiler: Shinji learns that trying to save Rei accidentally triggered Third Impact - the end of the world. ''3.0'' begins at the end of a 14 year TimeSkip, where Shinji learns that his actions have devastated the planet and killed most of the population; secondly, the crew of Wille claim that [[YankTheDogsChain Rei actually died]] and was [[CloningBlues replaced by a clone]].]]
* A similar scene occurs in ''L/R''. The bad guys are defeated and one of the partners of the title agency has fallen in love and is all set to live happily ever after. [[spoiler:Unfortunately, while walking down the street near his office, one of the villains of the series pops into view and shoots him dead. Instantly. He doesn't even ''get'' a poignant flashback.]]
* A non-death example: In ''[[Anime/OjamajoDoremi Ojamajo Doremi Naisho]]'', Hazuki has taken an unlikely lead in the final leg of a relay to decide a swim meet only to suddenly get a cramp on the way back, allowing the other room to easily win the race.
* A few arcs of ''VisualNovel/HigurashiWhenTheyCry'' have this tendency, although they always have long threads of justification for it. Particular arcs that come to mind are Onikakushi-hen, [[spoiler:in which after finally getting rid of two girls who had been trying to murder him the entire arc, the main character dies by "randomly" clawing his throat out]]; Watanagashi-hen, [[spoiler:in which, after the main character manages to escape two different attempts on his life (one involving a freaking TortureCellar), finally dies from a ''heart attack'' after seeing the girl who tried to kill him and was previously declared dead come back from the dead to kill him by nailing his hands to the bed]]; and Tsumihoroboshi-hen, [[spoiler:in which after preventing one of the girls from blowing up the school and bringing her back from her paranoia, the entire town dies when poisonous gases roll through town]].
** Higurashi ''Kai'' does even better than that. In Minagoroshi-hen, [[spoiler:Rika has spent more than a hundred years of constantly repeating the same month, ''knowing'' that she's going to die a horrendous, bloody death at the end. However, there is ''one'' world that Keiichi manages to change in the slightest way. A tiny little change leads to a string of minor miracles, with many a SugarWiki/{{Heartwarming Moment|s}}. Then, right before the club can finally save Rika, the BigBad reveals herself and ''shoots them all in the face. Then'' she ritualistically disembowels Rika and goes on to initiate the aforementioned poison gas attack on the village]]. Although that chapter title (It translates to [[spoiler:Everyone-killing chapter]]) is a bit of a tip-off...
** Palm goes to Higurashi ''Rei''. [[spoiler:Rika finally manages to end the endless loops of death. She's so happy that she gets all careless and runs into a truck, dying in the process and ending up in a perfect world where everybody is happy and there is no Watanagashi tragedy, but in which she has no good friends (Satoko is a bitch and Hanyuu just isn't there in that world) and the village will be destroyed due to the dam project. She finally gets back to the old world by ''killing her own mother'']].
* Occurs in the Buu Saga of ''Anime/DragonBallZ'', when Mr. Satan/Hercule, [[FakeUltimateHero of all people]], manages to stop Buu by ''befriending'' him. Just when things are about to calm down, two gun-toting assholes show up and shoot both Mr. Satan/Hercule and the puppy Buu adopted, pissing him off and forming the Evil Buu, which starts the ''next'' part of the arc up.
** The anime changed this a bit so it wasn't completely out of left field: Mr. Satan did stop them before when they shot the puppy, but one of the goons came back for vengeance. The timing of the whole thing does feel a little contrived though.
** During the Saiyan Saga during Goku's fight with Vegeta. Pretty quickly Goku finds that the only chance he has of winning is to use [[DangerousForbiddenTechnique Kaioken attack]] at levels where it physically hurts him. After their famous Beam-O-War, Goku finds the only way he'll win using the spirit bomb, despite Vegeta losing said struggle. Vegeta reveals a previously unmentioned way to [[OneWingedAngel turn into a Oozaru]] and promptly crushes Goku within an inch of his life.
** Goku's fight with Captain Ginyu in the Frieza saga. Goku's just increased his strength to previously undreamed of levels by training in an atmosphere 100x Earth's gravity, and with his new strength is easily able to [[CurbStompBattle decimate]] the Ginyu Force, up until his fight with the Captain, who suddenly reveals his body switch power to steal Goku's body for himself. The events that occur because of this leave Goku heavily crippled when he does get his body back and [[DeusExitMachina out of action for a while.]]
** In the Frieza saga, Piccolo is fighting Frieza in what is presumed to be his true form, losing, [[IAmNotLeftHanded then powers up to full strength]]. Whether or not this would have made a difference because Frieza reveals he has two more transformations, transforms into the first one and demolishes Piccolo. In the anime, Piccolo manages to take the upper hand, then Frieza transforms.
** At the climax of the Cell saga, Cell, having lost his [[BishonenLine Perfect form]] and in the midst of a VillainousBreakdown at the revelation that [[WorldsStrongestMan SSJ2 Gohan]] is even stronger than he is now, decides to be a SoreLoser and [[EarthShatteringKaboom make sure everyone]] [[TakingYouWithMe else loses with him]]. Goku teleports him, along with himself away before he can, and [[HeroicSacrifice both seemingly die]] [[MyFriendsAndZoidberg (along with King Kai and his companions)]]. Gohan and the other Z-Fighters briefly mourn, and then out of nowhere, [[KidFromTheFuture Trunks]] gets a hole blown through his chest. It turns out Cell is [[FromASingleCell back]] and [[CameBackStrong even stronger than ever]], now as Super-Perfect Cell. An interesting example in that even ''he'' himself thought he was a goner.
** The ending of Future Trunks saga in ''Anime/DragonBallSuper'', just when all seemed to be perfectly fine when Future Trunks successfully obliterates the degenerating body of Fusion Zamasu, Zamasu suddenly reveals that he can turn into an EldritchAbomination thanks to [[CompleteImmortality his soul still being immortal]] and starts covering the earth and kills everyone there with the exception of the Z-Fighters and soon begins to spread across the universe to the point that Future Zen'O is forced to destroy the entire timeline just to stop him. This ending not only cheated Trunks out of his happy ending but also makes the purpose and events of the saga virtually pointless as the only survivors of the timeline left are Future Mai and Future Trunks. Everyone else has been completely wiped out, not even having an afterlife as they were obliterated too by Zen'O.
** Sticking with ''Super'', in the second to last episode of the series, Goku, who has just mastered Ultra Instinct, has beaten the mighty Jiren at the end of the Tournament of Power, throwing back his MightMakesRight mentality with ThePowerOfFriendship and is ready to ring out the Pride Trooper. Just as Goku prepares a blast to destroy the platform and send Jiren falling, his Ultra Instinct power craps out on him paralyzing him. Beerus lampshades this by pointing out that Goku had all but ''won''. The only thing that prevents this being this trope fully is that Frieza saves Goku when he's set to be ringed out, with him and Android 17 set to fight the weakened Jiren.
* The ending of ''Anime/GaoGaiGarFINAL'' is all lined up for the happy ending we were all expecting from the generally upbeat tone of the series, then [[spoiler:traps everyone except Mamoru and Kaido in another universe, presumably forever]]. Though in the ongoing sequel novel ''[=GaoGaiGar=] vs. Anime/{{Betterman}}'', they turn out to be fine. Only time will tell if this becomes a case of BelatedHappyEnding.
* ''Anime/MaiHime'' actually had a Diabolus with a name: Miroku, [[spoiler:the sentient (and malevolent) spirit inhabiting Mikoto's sword for most the series. Given that Miroku controlled Mikoto's berserker activations, as well as her CHILD's actions, and then finally was the sentience behind the seal on Kagutsuchi's power, there were quite a few horrific things that happened directly because of it, including the death of at least three [=CHILDs=] (Fumi, Midori, and Shiho's)]]. However, the ending actually has [[spoiler:the Hime collectively nuking the Hime Star and thus Miroku]], causing the first ever destruction of Diabolus by the direct actions of the protagonists.
* The WhamEpisode in ''Anime/MaiOtome'' throws one of these in toward the end. At the end of the previous episode, Arika, Nina and Erstin are ready to take on their quests to become great Otomes as a team, even in the wake of Schwarz's [[AllYourBaseAreBelongToUs hostile takeover]] of Windbloom. However, there's still air time left to kill, so along comes John Smith to spoil the party by revealing [[spoiler:Erstin as one of their [[TheMole moles]], and forcing her to fight against her new friends]]. At around the same time, Sergey comes by to congratulate Nina on a stellar year, he drops a custom-made handkerchief given to him by [[spoiler:Arika]], which sends Nina into a [[RivalTurnedEvil jealous rage]], sparking a fight that ends with [[spoiler:her killing Erstin]]. As later episodes show, it doesn't get much better for Nina from there, either.
* It'd be a shame to leave out ''Anime/GaReiZero''. Most of the major events that occur only happen in order to screw up everyone's lives even more than they were before. It ''always'' gets worse, save for a little spot of hope that Kagura ends up dealing relatively well with her duty fighting against monsters in the epilogue.
* Occurs in the second season of ''Manga/MagicKnightRayearth'', to complete the HopeSpot for Hikaru and Eagle --having defeated Nova and saved Lantis, the Knights and Eagle return to Cephiro only for Debonair to show up out of ''nowhere'' to kill the Autozam commander. Especially jarring since Debonair had never actually attacked anyone directly until this moment.
* Used quite well to make a point in ''Manga/BlackJack'' when Dr. Kiriko first appears. A woman with a terminal, inoperable condition has requested that Kiriko euthanize her. As this runs directly counter to Black Jack's principles, he begins meeting with the woman in an attempt to figure out a cure. He and Kiriko meet with each other, and Black Jack delivers a speech about how wrong Kiriko is to do what he does. After the operation goes through, with Kiriko present, Black Jack asks after the patient. [[spoiler:She and her entire family were killed when a car slammed into their ambulance after the surgery. All of Black Jack's work - and all of his sermonizing to Kiriko - means nothing.]] In many ways, this is one of the themes of the series - no matter what doctors can do to save lives, they aren't gods, and many things are out of their hands.
* [[MadDoctor Faust]] from ''Manga/ShamanKing'' has the unfortunate distinction of getting one in his [[StartOfDarkness origin story.]] He works for years to save his wife from a terminal disease and finally succeeds. Then a few months later, a burglar shoots her.
* At the end of ''Anime/CowboyBebop'', Spike finally finds his lost love Julia, [[spoiler:only for her to be shot dead by a random mook when the Red Dragon makes their move on them both, setting off Spike's final StormingTheCastle moment and the final showdown with Vicious]].
* Subverted in ''Manga/FistOfTheNorthStar''. When Kenshiro gains the upper hand on Shin during their final battle, Shin attempts to discourage him by stabbing Ken's fiancee Yuria in the chest. Later Ken finds out that the Yuria stabbed by Shin was actually a mannequin and that the real Yuria was no longer with him.
* ''Manga/BlackGod'' ends in this way, in the last minutes of last episode everyone discovers that final sacrifice is required, even if nobody dies.
* ''Anime/{{Tsukihime}}''. "And then Arcuied blew Roa into tiny pieces. Her and Shiki have a long, happy life in store as Shiki shows her all of the things she never thought to experience, and their mutual love is sure to last fore- '''SLICE'''."
* In the FRLG arc of ''Manga/PokemonSpecial'', yay! The good guys defeat the bad guys, stop an airship from crashing into Vermillion, free Deoxys to let it go where ever it wants, have a happy reunion of sorts... then WHAM! They get TakenForGranite. [[spoiler: They were freed in DPE.]]
* Several in ''Manga/RaveMaster''. Gale, after failing to talk down King, asks to government to arrest him, but they shoot down his family instead. King and Gale manage to end the cycle of war between the Raregroove and Symphonia family with a HeroicSacrifice, only for King's AxCrazy son to turn up and start the cycle back up. In order to defeat Endless Elie not only has to [[spoiler:fake her death and leave her time period]] but must also [[spoiler:kill her love interest, Haru]]. Etc.
* At the end of the {{Super Robot|Genre}} anime ''Anime/SpaceWarriorBaldios'', [[spoiler:the hero Marin and his allies can only watch as the BigBad, Zeo Gattler, unleashes his "Final Weapon" which triggers a cataclysmic series of gigantic tsunamis that ravage the surface of the earth. The last shot of the series is a freeze-frame of a tsunami wave, with the word "End" appearing next to it. Thankfully, there was a movie afterwards that improved the situation a bit, but things still didn't get completely better]].
* ''Manga/{{Bleach}}'':
** Aizen reveals he's been hiding the Hougyoku inside his own body and has fused with it. This unleashes a series of transformations that make him more and more powerful until even the heavy-weights of the story are incapable of fighting him.
** Yamamoto unleashes Bankai to defeat and kill Yhwach, but ends up making things worse. [[spoiler: Royd possessed the ability to mimic others and sacrificed himself to draw out Yamamoto's power and act as decoy while Yhwach visited Aizen. As Royd dies, Yhwach appears, steals Yamamoto's bankai and kills him. The stunned Gotei 13 is then utterly trashed by Yhwach's army.]]
* ''Manga/DeathNote'': At the end of the Yotsuba Arc, [[spoiler:Higuchi's been captured, Aizawa and Ide are back, Light has no memory of ever being Kira, and everyone's content with a job well done. Then Soichiro takes the Note, sees Rem, panics and the Note is taken to the helicopter where L and Light are sitting. Light regains his memories -- JustAsPlanned -- and promptly has everyone who knows anything about the case (bar himself, Misa and the police contingent of the Task Force) slaughtered within weeks, and the series continues]].
* ''Manga/{{Naruto}}'':
** [[spoiler:Madara Uchiha tends to do this, such as he was somehow knowing how terminate the contract with Edo Tensei when the person who summoned him was defeated despite the fact that even the original creator of this jutsu does not know how to do it. Or in another example he was somehow able to extract 9 Bijuu in mere minutes, despite it taking 9 members of the Akatsuki and 3 days beforehand to extract at least one.]]
** [[spoiler:Also happens when Guruguru suddenly appeared on the Fourth Shinobi World War. The sole function of his return was to block the Alliance from fighting against Madara. Even after Karin seems to destroy his colossus and Orochimaru temporarily weakens him by giving Yamato a curse mark, he is shown to be still blocking the Alliance several chapters later. His only other appearance was in a flashback set almost two decades before, and the manga don't shows what he was up to and why he showed up in that exact moment.]]
* In ''Anime/{{Pokemon}}'', this tends to come up when Ash loses a league. For the specific examples:
** During the Indigo League, Team Rocket picks a very bad time to interfere making Ash work with an exhausted team (and a stubborn Charizard).
** Ash in the Johto League faces a Blaziken from a region he hasn't even heard of.
** In Unova, Cameron has a much stronger team than one would give him credit for - including a Hydreigon - and his Riolu evolves midfight.
** The Sinnoh League goes so well for Ash that only three of his League matches are shown, the rest touched on in a montage. Just as he narrowly wins against [[spoiler:Paul]] in a 6-on-6 full battle, in comes [[TheJuggernaut Tobias]], aka the ''[[OlympusMons Darkrai Trainer]]'', who proceeds to curbstomp Ash thoroughly in ''minutes''. And when Ash took out the Darkrai, he just pulled out a Latios and swept the remaining half of Ash's team. He literally serves no purpose except to screw Ash out of a League win he practically had in the bag. Particularly JustForFun/{{egregious}}, given that legendaries are treated as a very big deal in the anime, and only the Elite Four-caliber Frontier Brains had been shown to wield them.
** Only his losses in Hoenn and Kalos do not involve this trope.
** In the opening two-parter of ''Anime/{{Pokemon}}: Best Wishes'', Zekrom appears purely in order to shock Pikachu and screw up his ability to use Electric attacks (catching both him and Ash off-guard and causing him to lose to a newbie), provide a 'climactic' cliff-hanger which is resolved within the first minute of the next episode, and then disappear.
* In ''Anime/PantyAndStockingWithGarterbelt'', [[spoiler: right after defeating the BigBad Corset via a seeming DeusExMachina from a giant heavenly being that is either God or P&S's mother, Stocking makes an off-handed comment, wondering if Heavenly weapons can kill angels. She then proceeds to ''slice Panty into 666 pieces'', reveal that she was a ''demon spy'' the entire time, and walks off with Corset (who just ''resurrected himself from Brief's penis'') to another city to try and open another gate to hell, leaving Garterbelt, Brief, and Chuck to gather Panty's pieces while chasing after her]].
* A minor example of ''Manga/AiKora'': Hachibei's plan of [[ItMakesSenseInContext making Tsubame wear boots filled with clay so he can make a mold of her feet and ankles]] fails when she lets a friendly rival male driver she just met in that chapter ''wear her boots'', just because she thought they were comfortable. [[SarcasmMode Because when your first meet someone, naturally you exchange footwear, of course!]]
* ''Anime/ShinMazinger'' has a pretty brutal one at the end. [[spoiler:Kouji confronts and defeats Dr. Hell in one last climatic battle and it seems that Mazinger-Z stands triumphant. However, [[ThePlan it turns out to be been planned]] by ''Baron Ashura'', who sacrifices his/herself to allow the Mycene Empire to arrive on Earth. Cue CliffHanger Ending.]]
** This is based on the ending to the original Anime/MazingerZ, which had the Mycene Empire come out of nowhere to wreck the titular robot, only for Anime/GreatMazinger to equally [[DeusExMachina come out of nowhere]] and save Kouji.
* ''Manga/FairyTail'' ends the Nirvana arc by arresting the reformed [[spoiler:Hoteye and Jellal]], and heavily implying that the latter will be executed (he does get a death sentence later too), then proceeds to top that by revealing that everybody the TokenMiniMoe grew up knowing, with the exception of one man who was DeadAllAlong were just illusions created to keep her company and she'll never see them again. Never one to out do itself, ''Fairy Tail'' then ends the S-Class arc with [[spoiler:the Dragon King Acnologia coming out of nowhere and leaving the entire core cast presumed dead, and even when they're recovered seven years later the world has changed tremendously in their absence]]. And then during the Tartaros arc [[spoiler: the exact same dragon appears in the middle of the battle, prompting a MassOhCrap from both sides. However, this is fortunately countered by the DeusExMachina of Igneel emerging from within Natsu. And then Acnologia [[FamilyUnfriendlyDeath kills]] him after the core cast manages to win out, right in front of Natsu too]].
* One of the more controversial examples of this is in ''Anime/EurekaSevenAo''. A Human/Coralian hybrid couldn't survive in a high density trapar environment as it triggers the body cells of human and coralian to repel each other, leading to Renton and Eureka [[spoiler:losing their firstborn daughter, effectively motivating both to antagonise the Scub Coral, a being they both once helped to protect]]. It sets up a chain of events that led to the events happening in the TV sequel.
* ''Anime/PrettyCureAllStars DX 3'' has the heroines break out of their various prisons and curbstomp all of their Movie-original foes... only for the GreaterScopeVillain himself to show up, [[OneHitKill One-Hit KO]] the girls and destroy their {{Transformation Trinket}}s. forcing them to use the movie's MacGuffin to beat the monster, [[spoiler:but sacrifice their powers and fairy partners in the process. [[UnexplainedRecovery They got better]], because [[Anime/SuitePrettyCure the series was still running]].]]
** Happens almost part by part in ''Anime/SmilePrettyCure'' when the BigBad overpowers the team's SuperMode, destroying ''their'' TransformationTrinket and leading to the heroines to use the series' MacGuffin to beat the monster.
* ''Manga/{{Holyland}}'': [[spoiler:Yuu has beaten King and had his final showdown with Masaki, where he admits Yuu's the better fighter. Then, on the way back from his final fight in the series, [[DroppedABridgeOnHim Yuu is stabbed with a knife by a nobody and left to die alone in an alleyway]]. The final TimeSkip chapter plays with whether or not he's really dead, as nobody has seen him in the interim and they NeverFoundTheBody, [[SubvertedTrope until Yuu finally shows up alive in the last two pages]]]].
* In ''Manga/OnePiece'', during the end of the Enies Lobby arc a random captain with the ability to make things rust catches one of Zoro's swords and destroys it, then is promptly punched down by Franky before he can do any more damage. This captain (named Shuu in source materials) then drops from the plot entirely, his only purpose was to cripple Zoro by destroying his third sword (tellingly, it was the only one that had zero sentimental value, ItWasAGift and that was it) and free up space for him to get a legendary named katana in the next arc.
* Various examples in ''Manga/JoJosBizarreAdventure'':
** At the end of ''Phantom Blood'', [[spoiler:Wang Chan, who was last seen in the ruins of the Joestar Manor and was MIA during the climatic battle, smuggles himself and the head of Dio onto the ship Jonathan is boarding. Despite having plenty of warning, ''just'' Dio's head manages to instantly defeat Jonathan (who was previously able to reduce Dio to that state and survive), giving Jonathan no other choice but to bring Dio [[TakingYouWithMe down with him]]. And even that HeroicSacrifice is nullified by a RetCon for the sake of Part 3]].
** At the end of ''Battle Tendency'', [[spoiler:Kars, who is seemingly facing death by Nazi UV spotlight cannon, quickly turns around with a fully assembled Stone Mask complete with the Red Stone of Aja. The UV rays fired at him shortly after did not kill him, but in fact made him [[InvincibleVillain wholly invincible,]] and fulfilled his original plan]].
** Another example late in ''Stone Ocean'', tying in with the theme of fate, sorta. At the climax of Weather and Pucci's duel, [[spoiler: Jolyne crashes a car ''right'' as Weather was about to deal the finishing blow on Pucci, allowing him to stab Weather through the heart while the latter was distracted]].
* ''Anime/JewelpetTwinkle'': The ending to the series involves Ruby announcing to Akari that she has to leave on a journey to find the Flower of Happiness, a journey that might take decades, which means they won't be able to visit each other in the foreseeable future. This puts a real damper on the overall ending, especially considering that Ruby was only invited to go on the journey in the last episode and there was no foreshadowing to it beforehand.
* ''Anime/FullmetalAlchemist'' (2003) has a recurring villain seemingly die only to show up in time for the finale with half his body replaced by automail and guns, including ''[[TisOnlyABulletInTheBrain half of his head]]'' - jarring rather badly with the previously established rules of prosthetics for this world. The only purpose for his reappearance is so he can drive madly across the city to the Fuhrer's residence, [[spoiler:shoot Roy Mustang in the face as the poor man staggers out]], and then be shot dead.
* ''Anime/{{Shinzo}}'': After the heroes have just spent several episodes trying to save Robot City from the Bird Enterrans led by Lord Caris, after his defeat his angered boss Queen Rusephine immediately destroys the city to render all their efforts null and void.
* ''Anime/OsomatsuSan'': Unlike the season 1 two-part finale [[spoiler:which simply hit the ResetButton and never looked back]], season 2 was one episode shy from letting the brothers separate naturally and finally turning Osomatsu into the proper big brother he never was...[[spoiler:Then Iyami, who was leaving the country to find treasure, crashes his plane into the Matsuno house and kills them all.]]

[[folder:Comic Books]]
* It's also a favorite of ComicBook/TheWalkingDead. Was it really necessary for Rick to [[spoiler: lose his hand, his wife, and his newborn daughter]]?
* A pretty stupid one from ComicBook/{{WITCH}}. Early in the series, the team's defeated Nerissa and, as an added bonus, made sure Will's deadbeat dad doesn't try to swindle money from her or her mom. As Will and her mother go to celebrate being safe from the latter, Will's dormouse races out of the house and gets ran over by a car. It's kind of hard to not presume Will's next quote, "Why does this keep happening?" wasn't a massive LampshadeHanging to [[ButtMonkey all of her problems at the time]].
* Messiah Complex. The ''ComicBook/XMen'' have finally defeated all of their enemies and [[spoiler:Scott has given the mutant baby to Cable to take into the future]]. Everything seems great. [[spoiler:Until Bishop, who's been trying to kill the baby to prevent his horrible future, shoots at the baby and Cable.]] And [[spoiler:Cable is already disappearing from that point in time, leaving the shot to go through and hit Professor X in the head]]. It really sucks to be a mutant. Granted he got better since this is a comic book and [[spoiler:Professor X missing at the end was a hint]].
* ''[[ComicBook/XForce Uncanny X-Force]]'' reveals that the ComicBook/AgeOfApocalypse reality had been positively ''slammed'' with this, and ''off-panel'' no less, since we last saw it. The eponymous dictator was dead and everyone seemed to be starting to rebuild their lives... and then [[CosmicEntity the Celestials]] showed up, judging that Earth must be destroyed. Franchise/{{Wolverine}} cuts a deal with the Celestials: he will function as their agent on Earth if they spare the planet. The Celestials accept and transform Wolverine with their technology. Now, who was the last guy they did this to? Oh, right, [[OhCrap Apocalypse himself]]. Needless to say, it doesn't end well: pogroms against baseline humans are initiated, Rogue and ComicBook/{{Magneto}}'s preteen son is ''eaten'' by a villain, and by the end of the arc that reveals all this, only two of the reality's X-Men are left alive.
* In the issue of ''ComicBook/SonicTheHedgehog'' before the [[ComicBook/SonicTheHedgehogMegaManWorldsCollide crossover with Mega Man]], Sonic and his friends have found and retrieved Mecha Sally and Silver has finally understood the whole "Freedom Fighter traitor" deal was about... then Eggman hits everyone with the Genesis Wave and we're left at a cliffhanger which is {{aborted|Arc}} the moment the crossover ends.
** The arc before the crossover was a series of these for Ixis Naugus: [[spoiler:his bid for the throne happened on the exact same day that both Eggman ''and'' the Battle Bird Armada attacked for unrelated reasons. And even though some of his later schemes had failed and the fear and paranoia that allowed him to make his bid had died down, Naugus got another chance by possessing his apprentice. Of course, the crossover took care of all that]].
* ''ComicBook/TheSmurfs'' story "The Hungry Smurfs" (and its AnimatedAdaptation counterpart "Haunted Smurfs") has one early on in the story, when the Smurf Village storehouse catches fire without any in-story explanation, immediately setting up the situation where the Smurfs are without food.
* ''ComicBook/TheTransformers:'' The fourth issue ends with one, on account of sales having been enough to keep the series going. So the Autobots are triumphant, the Decepticons having been disabled due to the action of one of their human friends, and everything looks good. Optimus is making a speech, and then BAM! [[TheSpock Shockwave]] arrives and takes out what few Autobots were still standing with one shot.
* A very confusing one in ''ComicBook/{{Vampirella}}'': "Vampis Feary Tales - Metifa" shows a DeusExMachina as this trope. [[spoiler: Metifa, Satan's woman, just wants to show off to an old man by playing with fire. The old man is very unimpressed, demasks as God and smites her.]]
* Occurs in a number of ComicBook/WhatIf issues from Marvel. One occurrence dealt with the storyarc where Captain America became The Captain when the US Government and replaced him with John Walker. It looks like Cap's won in the what-if and everything's going to be great with him still Captain America when suddenly Red Skull orders his sleeper agent to shoot Captain America in the back of the head in the middle of the news conference announcing the positive resolution of things. Cap's promptly killed, Walker in taking his place ends up going on a bloody rampage, the identity of Captain America is retired and Red Skull sits back sipping his win reveling in his victory.

[[folder:Comic Strips]]
* In ''ComicStrip/FunkyWinkerbean'', Wally (nephew[[note]]or younger brother or younger cousin. Their relationship depends on which reference you check[[/note]] of the title character) has just returned from a trip to Iraq, with his new bride and newly adopted orphaned waif in tow. The future looks bright for the young Winkerbeans... until Wally gets a letter from the Army telling him that he was technically A.W.O.L., because his discharge was issued ''one day too early''. As a result, Wally is ordered back to active duty to serve a full year's tour of duty. The readership was pretty sure that discharges don't work like that (even the ones incorrectly filed) and could've fought the order if he wanted (and almost certainly won). [[HonorBeforeReason But he fought the war instead.]] As an extra kick in the metaphorical nads, Becky finds out she's pregnant just in time for Wally to get shipped off. [[DeusAngstMachina An extra EXTRA kick]] was administered when the second TimeSkip came about and Wally was nowhere to be found. Turns out that for the entire second TimeSkip, Wally was held captive by insurgents.\\\
Ironically, the author's complete ignorance on military discharges was such that he overlooked an entirely ''legal'' way to suddenly recall Wally to service. All initial enlistment contracts are for ''eight'' years of service obligation, not four. The typical arrangement is only four years of active duty and then four more years of "Individual Ready Reserve" status, the practical upshot being that short of medical disability, Bad Conduct Discharge, etc., you can be yanked back in entirely at their discretion up until eight years have passed since your initial enlistment. The recruiter is required to make darn sure you understand this before you sign.
* ''ComicStrip/{{Peanuts}}'':
** If you're going into the funny pages, Charlie Brown learned that the demon of heartbreaking sports losses can attack ''after'' the end of the game, when he has a rare win stripped from him over a "gambling scandal" (Rerun betting Snoopy a nickel that they would win).
** Also, the fire that destroyed Snoopy's doghouse in 1966 seemed to come out of nowhere.
* ''ComicStrip/{{Curtis}}'': [=*GULP!*=] [[KidsAreCruel It's Derrick and]] [[OnlyKnownByTheirNickname "Onion"!]]

[[folder:Fan Works]]
* The [[SoBadItsGood cheesy yet fairly popular]] ''VideoGame/HalfLife'' fanfic series, ''FanFic/HalfLifeFullLifeConsequences'', uses this as a SequelHook: The first installment ends with "the next boss" coming out of nowhere and stepping on Gordon Freeman, setting up for a sequel that centers around [[MartyStu John Freeman]] hunting down the next boss. Adding to the bizarreness, our heroes had just defeated the "FinalBoss", which by all rights should preclude any more bosses showing up.
** And the second installment, after the defeat of the evil boss, ends with the dead Gordon Freeman becoming a ''zombie goast''.
** This is followed up with a glorious DeusExMachina in the third chapter, when even further into the future, John Freeman descends from the heavens to assist his son in defeating the Combines and sending them back to science and outer space.
* ''Series/StarTrekVoyager Virtual Season 8'' uses one of these after the crew is almost home, getting them lost again in order to [[FixFic fix a few plot holes]] as well as to set up a more satisfying climactic battle in Virtual Season 9.
* ''WesternAnimation/ThePowerpuffGirls'' DarkFic series ''FanFic/ImmortalitySyndrome'' has several of these, but the biggest comes in ''Immortality Relapse'' at [[spoiler: the climax, when Boomer {{Face Heel Turn}}s and survives impalement long enough to trigger the death of the world]].
* There's a {{Crossover}} [[http://www.fimfiction.net/story/20025/a-stranger-in-ponyville-or-a-genre-shift-in-three-acts fanfiction]] for ''WesternAnimation/MyLittlePonyFriendshipIsMagic'' and [[Webcomic/{{Sonichu}} Chris-Chan]]. One of the chapters introduces a device actually ''called'' the "Diabolus ex-Machina", which serves its purpose of throwing the direction of the conflict in favor of the villains. If that isn't enough LampshadeHanging, the ''chapter'' it's introduced is called "Diabolus ex Machina? [[BlatantLies Never Heard Of It!]]"
* In the ''WesternAnimation/{{Daria}}'' fanfic ''Fanfic/TriumphOfTheRetart'', Daria and her new boyfriend, AuthorAvatar David [=MacAllister=], are finally settling down after surviving David's run for Student Government President, during which he was the target of beatings and an assassination attempt. Just as it seems that they've [[EarnYourHappyEnding earned their happy ending]], David is killed by a suicide bomber.
* ''FanFic/SonicXDarkChaos'':
** Episode 75. Two fleets - a Demon fleet and a Metarex fleet led by the Blue Typhoon - are facing off. Maledict and the heroes are about to have their final climactic showdown. And then [[spoiler:Dark Tails suddenly appears, steals all the Chaos Emeralds, and uses them to fully manifest himself in the physical universe]], beginning the ''real'' final battle.
** The ending is one of these; [[spoiler:Dark Tails' defeat allows the Forerunners to escape - and its implied that they quickly devastate the entire universe]].
* After waking up in a Britannian hospital in Pendragon in ''[[https://www.fanfiction.net/s/11292442/14/Nil-Desperandum Nil Desperandum]]'', [[GenderFlip Luluka]] manages to escape quickly and cleanly without being spotted by anyone. Then at the first intersection she comes to, her getaway car is struck by a drunk driver. Schneizel even notes that if not for that, they likely would have never found her again.
* In the ''VideoGame/{{Neptunia}}'' fanfic [[https://www.fanfiction.net/s/11994721/1/Best-Friends-Forever Best Friends Forever]], near the end [[spoiler: a three-way fight between Neptune, K-sha and Noire]] is dying down, and although both Neptune and Noire are seriously wounded and Noire additionally exhausted from using NEXT form, Compa and [=IF=] have arrived and are patching up Neptune, and Noire is about to bring to plot to its resolution by [[spoiler: confessing her love for Neptune]]. However, it turns out the reason why Compa and [=IF=] are there is because [[spoiler: Uzume, Big Neptune and [=MAGES.=] are about to dimension warp over not only an Arfoire from a dimension she rules over, but also her top enforcers [=CFW=] Magic and Dark Purple]].

[[folder:Films -- Animation]]
* In ''WesternAnimation/TheSpongebobMovieSpongeOutOfWater'', because Burgerbeard is able to rewrite reality to his will, he obtains the secret formula, empties the Patty Vault, and turns Bikini Bottom into a dystopia. [[spoiler:He later strands the heroes on Pelican Island with the same method.]]

[[folder:Films -- Live-Action]]
* ''Film/TheLifeOfOharu'' is all about the ridiculous TraumaCongaLine that Oharu endures on her way from noblewoman to concubine to courtesan to domestic servant to {{Streetwalker}} to homeless beggar. Most of the stops along the way are caused by the cruelty and patriarchy of late 17th-century Japan. But one stands out as a Diabolus Ex Machina: just when it seems she's found a measure of happiness and security as the wife of a fan merchant, her husband is murdered, out of nowhere, leaving her with nothing when his family takes the business.
* ''Film/TheHalfBreed'' has some of the local Native Americans setting fire to the local forest because...well, for no damn reason. This sets up the climactic forest fire in which Lo the half-white, half-native protagonist rescues {{Love Interest|s}} Teresa but fails to rescue his evil father.
* ''Film/PandorasBox'' ends with Lulu, TheVamp who's been manipulating men throughout the movie, turning to prostitution--and meeting UsefulNotes/JackTheRipper.
* ''Film/CarlitosWay''. The producers and bigwigs [[spoiler:actually allow the main character Charlie Brigante to die as he's about to escape to paradise]]. In the commentary, the filmmakers joke about whether or not to shoot the "Bullet Proof Vest Scene" before even showing the current cut to their higher-ups for approval.
* ''Film/CityOfAngels''. Less than a day after a fallen angel has given up his immortality to be with the mortal woman he's fallen in love with, she's inexplicably run over by a truck driven by the Diabolus Ex Machina. One might suspect his fellow angels of having summoned it in order to teach him a lesson...
* The movie-version of Creator/StephenKing's ''Film/TheMist'' takes this all the way into DeusAngstMachina territory.
* Even Film/JamesBond is not safe from this demonic influence -- in ''Film/OnHerMajestysSecretService'', Blofeld drops by to ensure that Bond's marriage [[CartwrightCurse becomes a SHORT one]]. Director Peter Hunt said that originally the film was to end with the wedding and then the next would start with the assassination and follow from there. However since Creator/GeorgeLazenby gave up doing the sequels, it wound up in ''OHMSS''. The following movie, ''Film/DiamondsAreForever'', opens with Bond searching for Blofeld, [[ContinuityNod presumably to avenge the ruined marriage]]. At the beginning of ''Film/ForYourEyesOnly'', Bond is visiting his wife's grave, complete with "We have all the time in the world." [=MI6=] pick him up by helicopter, except it's remote controlled by... a bald man with a cat, who tortures Bond the way he tortured Blofeld in ''Film/DiamondsAreForever''.
* The ending of ''Film/EasyRider'' was already on its way to being interpreted as a DownerEnding, with Fonda telling Hopper that, despite their financial success, they failed at their goals from a moral and spiritual standpoint. But even that was too ambiguous, so the movie sent a couple of truckers with a shotgun to shoot them both dead for barely any good reason other than opportunity. Closure!
* The Creator/SeanPenn-helmed ''Film/ThePledge'' had a particularly brutal example of this, and it also proves that you ''can'' make a DownerEnding out of the death of the antagonist. The child-murderer being pursued by Creator/JackNicholson's character dies in a fiery car wreck, drawing his full share of karma down on his head but ensuring that Jack ''never'' fulfills his titular pledge to find him, meaning that all he's risked in the movie, including winning the trust of the mother of the killer's next planned victim, [[ShaggyDogStory is for nothing]] (other than the fact that the killer never makes his next hit). We last see Jack's character sitting in front of the rural gas station he owns, rapidly fading into self-hatred and senility.
* One particular death ([[spoiler:Book]]'s) in ''Film/{{Serenity}}'' is a downer, especially since [[spoiler:we never ''do'' get to learn what the hell his deal was (at least until the comic book)]], but another [[spoiler:Wash]]'s death falls right into this. He successfully manages to [[spoiler:land ''Serenity'' from what is essentially a dead fall, and once he does and pauses to celebrate, his chest is pierced by a random Reaver harpoon]]. Creator/JossWhedon mentions that [[RealityEnsues he wanted to break the appearance of]] PlotArmor [[RealityEnsues on the rest of the characters for the finale, and that the cockpit is the only place the Reavers could effectively shoot. In fact, the next shot missed Mal and Zoe by a few inches. So many fans will never forgive Joss for this.]]
* The French film ''Film/{{Z}}'' does this ''with the ending titles.'' The bad guys have been caught and are all going to jail, the heroes have won out, freedom is on the march again in Greece, and then we get a news broadcaster discussing how the bad guys all got off light, some of the good guys went to jail for nothing, and, instead of the credits, ending titles listing all the things the military junta banned afterwards in Greece: "long hair on males; mini-skirts; Sophocles; Tolstoy; Euripedes; smashing glasses after drinking toasts; labor strikes; Aristophanes; Ionesco; Sartre; Albee; Pinter; freedom of the press; sociology; Beckett; Dostoyevsky; modern music; popular music; the new mathematics; and the letter "Z", which in ancient Greek means "He is alive!" The book is based on RealLife, and this more or less how things actually ended for Greece after WWII.
* Diabolus' fickle finger can also be detected in the end of ''Film/ForrestGump''; simple Forrest has finally achieved all he ever wanted in winning the heart of his troubled childhood sweetheart Jenny, who herself has finally fallen in love with a good man who loves her completely and unconditionally and can give her a good life... [[spoiler:so Diabolus gives her a terminal illness.]] She's perfectly fine at the end of the book, however, though [[SuddenSequelDeathSyndrome this is remedied in the sequel]] 'Gump and Co.'
* ''Franchise/PlanetOfTheApes'':
** ''Film/PlanetOfTheApes2001'': Leo spends the entire movie trying to escape and then stop General Thade before returning to his own time, only to find that Thade has somehow taken over Planet Earth in his absence.
** In ''Film/RiseOfThePlanetOfTheApes'', the airborne viral agent Caesar used to make the apes smart [[spoiler: is lethal to humans, and is spreading across the world]].
* The Canadian ''Film/{{Cube}}'' horror film series:
** The ending of the first ''Cube'': The female lead, one of two sympathetic characters in the whole movie, evades every trap, figures out how to escape, is right on the threshold of getting out... and is killed by the villain, who is NotQuiteDead. She dies, the villain dies, and only the mentally deficient guy escapes. To make this worse, the probability of the villain to be able to get to her is about 20,000 to 1.
** ''Film/Cube2Hypercube''. After surviving many perils, the heroine, who turns up to be a special agent, manages to escape the Hypercube and return to the normal world... where her superior has her summarily shot in the back of the head for no apparent reason. The worst is that she obviously knows what's coming, but merely closes her eyes instead of trying anything.
* The ending of ''Film/PitchBlack''. The out-of-nowhere alien grabs the female lead just as she's about to escape. This is played as somewhat karmic, since [[spoiler:she killed some people to save herself and the ship. To atone, she refuses to leave without saving someone, which ultimately gets her killed]].
* The ''Franchise/{{Saw}}'' series of movies is chock full of Diaboli ex Machina, some coming within ''seconds'' of the protagonist thinking he's found a way out of the nightmare.
** The [[Film/SawIII third movie]] is particularly sadistic, but actually gives an explanation for it. [[spoiler:The traps in the movie weren't actually designed by Jigsaw. They were designed by his ridiculously AxCrazy apprentice, Amanda, whose philosophy differed from Jiggy's in that she thought the people were irredeemable and explicitly deserved an unpleasant death. She catches a bullet to the neck.]]
** The ending of ''Film/SawVI'' also counts: [[spoiler:William, the health insurance exec protagonist has been put through utter hell and has apparently learned his lesson about the true implications of deciding who lives and who dies based on greed and advances to the final game...and finds himself face to face with the wife and son of a man who died because William cancelled his coverage. And it's ''their'' game, not his. Cue the son flipping a switch which injects William with gallons of acid]].
* The ''Franchise/FinalDestination'' movies are built around Diabolus hunting down people who escaped his clutches the first time around and dispatching them in a variety of unpleasant and unlikely ways.
** ''Film/FinalDestination5'' is the most egregious example though. [[spoiler:A new rule introduced in the film is that if a survivor kills someone, they will live as long as the person they killed would've. And by the end, Nathan has killed a man on accident, and Sam killed Peter, who had killed Agent Bloc, in self defense. But then it turns out that Sam and Molly are boarding Flight 180 from the first film, which proceeds to first tear apart (killing Molly), then explode just as it did in the first film, with no explanation given for why they're dying now (especially since Molly appeared to be the intended target, and she was never a survivor). And down below, Nathan learns that the man he killed had a fatal disease that would have killed him in days (something never hinted at before), and proceeds to get crushed by falling debris.]]
* ''North Dallas 40'': Long before the demons stuffed Carney and Anderson's kicks (which see below), [[spoiler:it had Dallas bungling the snap on the point-after after we hear the commentator talk of the kicker being called "Mr. Automatic" for having successfully converted several consecutive previous attempts, thus preventing Nick Nolte's last-gasp TD from tying the game. New Orleans Saints fans might find that last bit familiar... As might Tony Romo (who co-incidentally ALSO played for the real Dallas on his fateful play)]].
* ''Film/EpicMovie'' parodies this in one of its few actually funny jokes [[spoiler:by having a waterwheel run over the orphans just before the start of the closing credits, and having "Borat" making an observation. Unfortunately, it ruins it by [[VulgarHumor him turning around and slapping his almost bare butt]]]].
* Averted by ''Film/{{Clerks}}'', which originally ended with [[spoiler:a robber killing Dante]], but after the [[ExecutiveMeddling distributor]] complained that this was pointlessly violent and tragic, the scene was removed.
* [[spoiler:The allied bombing raid]] at the end of ''Film/DasBoot''. Sure, it was hardly an AssPull, what with World War II going on, but it's still just ''mean as hell''.
* ''Film/NightOfTheLivingDead1968'', [[spoiler:in which the only survivor of the zombie attack is shot on sight by the rescue party]].
* Echoed in the end of ''Film/DeadMenWalking'', [[spoiler:where the sole survivor makes it out of the zombie-filled prison, only to be shot dead by one of the snipers sent to keep the zombies from escaping]].
* The film ''Whoops Apocalypse!'' follows a desperate attempt to stop a nuclear war, which would have succeeded were it not for a hypnotist routine being disturbed - a navy officer is programmed to believe there is a large fire in progress when the hypnotist snaps his fingers (desperately yelling 'FIRE!'). Owing to an unfortunate intervention, this is never undone. When the officer receives the good news that the missiles don't have to be fired, he is so relieved that he doesn't respond to the questions being asked - leading to somebody snapping their fingers to get his attention.
* ''Film/TheWagesOfFear'' has the only surviving driver from the deadly nitroglycerine convoy plunging to his death on his way home for no readily apparent reason.
* ''Film/{{Cloverfield}}''. [[spoiler:The three surviving protagonists get on an evac helicopter headed out of New York before a massive bombing run to obliterate the beastie, but Clovie takes down the copter, eats Hud, and forces the last two to take shelter under a bridge, awaiting annihilation in the impending bombing run.]]
* Creator/AdamSandler delivers this on himself in the ''middle'' of ''WesternAnimation/EightCrazyNights'', by explaining his hate for the holidays with a flashback where a younger version of himself sparks a MiracleRally for his basketball team. [[spoiler:They win the game, but younger Sandler finds out that his parents were absent because they were too busy being dead. The game was played during Hanukkah, hence his holiday hate.]]
* In both ''Film/LoveAffair'' and its remake ''Film/AnAffairToRemember'', the two lovers are set to reunite atop the Empire State Building after six months apart. They're going to get married, and life will no doubt be blissfully happy--until the woman is hit by a car and paralyzed as she's crossing the street in front of the Empire State Building, thus missing the rendezvous. And the man didn't get any info on how to contact her after they left the trans-Atlantic ship six months before. Bummer.
* ''Film/PayItForward'', both infamously and egregiously. That came out of ''nowhere.'' AND served NO point. Except to ruin any good feelings you had.
* ''Franchise/{{Halloween}}'':
** ''Film/Halloween5TheRevengeOfMichaelMyers'' ends with the police ''finally'' catching Michael and locking him up for good. Then a mysterious man dressed in black bursts in, kills the officers there, and breaks him out of prison.
** ''Film/HalloweenResurrection'' changes the end of ''Film/HalloweenH20TwentyYearsLater'' by [[spoiler:indicating that Laurie Strode did not, in fact, decapitate Michael Myers, but rather [[MuggedForDisguise a paramedic with whom Michael switched clothes with]]. All so the franchise can continue]].
* Parodied in ''Film/WaynesWorld''. Just as everything is going smoothly, a series of increasingly unlikely disasters occur, culminating in an electrical fire that destroys Wayne's house and kills Garth while the slimeball villain gets the girl. Fortunately, Wayne and Garth turn out to have other ideas...
* In ''Film/TheBlueLagoon'', a movie based primarily around emotional and physical self-discovery, Diabolus is personified in the form of a three-year-old boy. Richard is exploring one of the islands in the archipelago while Emmeline is watching over their son. Emmeline nods off to sleep in their rowboat and while doing so, their son Paddy throws one of the oars overboard. Richard swims out from the island and retrieves the oar, but is spotted by a shark. Emmeline throws the other oar at the shark to distract it and Richard is forced to abandon the other one to escape, and their boat is swept out to sea. To make matters worse, Paddy has gotten his hands on a bunch of dead-and-berries, swallowing a handful before his parents stop him. With a dying baby and no hope of rescue, Richard and Emmeline eat the remaining berries...[[ShootTheShaggyDog barely hours before a ship with Richard's father (Emmeline's uncle), who had been searching for them for several years, happens upon their boat]].
* In ''Film/{{Screamers}}'', the captain survives the LateToTheTragedy, survives the Twist Ending, and makes it to the Emergency Evacuation Pod in time to [[LastOfHisKind make it off the planet alive]], only to take a [[BearsAreBadNews cyborg teddy bear]] along with him for the ride home.
* ''Film/WalkHard'''s Dewey Cox dies 3 minutes after his last performance.
* ''Film/MontyPythonAndTheHolyGrail'' ends with our heroes assembling an army to fight the dastardly French and reclaim the Grail once and for all. Just as the army begins its assault, modern-day police vans hove into view and arrest everybody, including the cameraman, thus ending the film.
* The ''Film/{{Phantasm}}'' sequels ''all'' end with the heroes defeating the Tall Man, only for him to come back and devastate them. [[spoiler:In [[Film/PhantasmIVOblivion the fourth film]], he kills Mike, one of the franchise's two leads... a death followed by a flashback to Mike as a kid, with no idea what's coming.]]
* ''The Suspect'' builds up one of the main characters - a small-town sheriff - to be NOT the stereotypical racist asshole seen in other towns...only to [[spoiler:have him turn out to actually be racist AND criminally evil, just to excuse a final plot twist - betraying and killing an innocent man]].
* ''Film/DumbAndDumber'' plays this for laughs, since Jim Carrey himself came up with the idea to prove that Harry and Lloyd are dumb enough to waste such a golden opportunity. The girl the duo went halfway across the country to return a briefcase to turns out to be married, and in the final scene, when they encounter a bus full of swimsuit models looking for a pair of assistants to travel with them and oil them up for photo sessions, they (being idiots) direct them to the nearest town.
--> '''Lloyd:''' "Do you realize what you've done!" [runs off and flags down the bus] "You'll have to excuse my friend. He's a little slow. The town is back ''that'' way."
* ''Film/TwoThousandTwelve'': Tamara and Gordon: After all the sexual tension, the hinted pairings and each of their respective [[SugarWiki/MomentOfAwesome Crowning Moments of Awesome]], [[spoiler:Gordon is pulled into the Arc's gears, and Tamara is drowned when water floods into a room she's trapped in, even though the room next door (the one with the main characters! [[SarcasmMode Imagine]] [[DeadpanSnarker that]]!) has an air pocket, and yet everyone else lives. Gordon gets forgotten quickly (did anyone actually ask about him?), though Tamara kinda [[HeroicSacrifice saves the girl and her dog]], but other than that, they are both just killed and forgotten about]].
** Just to make it worse, [[spoiler:Tamara's death]] doesn't make any ''sense''. The reason she gets trapped is that water is pouring into the ship through the stern hatch, and several bulkhead doors slide shut to contain the flooding. Given that there is only one way for water to get into the ship and the watertight bulkheads are working properly, ''there is no reason for her compartment to keep filling up.''
** To say nothing of [[spoiler:Sasha successfully landing their plane, only for the ice to collapse from underneath the front of it]].
* At the end of the pre-Bond Daniel Craig vehicle ''Film/LayerCake'', the protagonist has [[spoiler:killed his treacherous boss, gotten the Serbian head-chopping war criminal off his back, made a pretty penny double-crossing the wealthy crime-lord-turned-tycoon, established his friends as London's new crime lords, gotten the girl, and plans to retire to a life of leisure]]. Then he walks out of the club and [[spoiler:is immediately shot dead by a minor character with no previously shown propensity for violence]].
* Subverted in ''Film/CabinFever'', in that the one guy who apparently survives is the JerkAss, and just as you're thinking, "You mean the ''asshole'' lived?" he gets cut in half by machine gun fire.
* ''Film/RememberMe'' had Robert Pattinson, playing the angsty Tyler, finally bonding with [[WellDoneSonGuy his father]]. While Tyler is waiting in his father's office, it seems everything will be fine... [[spoiler: until he gets killed in the September 11 attacks in said office]].
* [[FridgeLogic If you think a bit more]] about ''Film/{{Knowing}}'', the survivors from the plane crash and later subway accident weren't so lucky after all. For those who haven't seen the movie, [[spoiler: the sun incinerates Earth and all life on it a few days later. Bonus points for the whole world learning about its upcoming inevitable demise with several hours to spare..]].
* Toward the end of the Eddie Murphy - Martin Lawrence movie ''Film/{{Life|1999}}'', the two find out that the warden's hunting friend is the same corrupt, racist sheriff who had them sentenced to life in prison, and the warden basically declares that he screwed them over and "gave the state of Mississippi 50 years of free labor" which the warden overheard and literally shot him out of disgust. The warden then tells them that he'll sign the papers to release them the next day. [[spoiler: That night he died on the toilet before he could sign the papers the next day.]]
* At the end of the 50s BMovie, ''Film/TheMolePeople'', {{Love Interest|s}} Adad inexplicably runs back towards the cave entrance during an earth tremor and ends up getting crushed by a collapsing pillar. It turns out this massive IdiotBall moment was the result of ExecutiveMeddling: Studio execs forced them to kill off Adad because they thought Adad and Dr. Patrick (played by John Agar) would constitute a "mixed marriage" and wanted to avoid encouraging "miscegenation." [[http://www.imdb.com/media/rm1256234240/tt0049516 The woman on the movie poster is Adad, by the way.]]
* ''Film/{{Vertigo}}''. Just as it seems EarnYourHappyEnding ensued, [[spoiler:a nun enters, scaring Judy who falls to her death]].
* ''Film/{{Haywire}}'' has a particularly bizarre one where, in a movie that otherwise strives for realism, the heroine manages to outmanoeuvre her opponents in a car chase only for the car to crash anyway because a freaking ''deer'' jumped into it.
* In the last minute of ''Film/TheCube'', the man finds out that his escape was an illusion and he's still in the cube.
* ''Film/{{Scream 1996}}'': [[spoiler:[[SacrificialLion Tatum]] manages to really hold her own against the killer when her time seems to have come. She manages to knock him on his ass ''twice'', and puts up the best fight so far. One might think she could escape to warn Sidn- wait why is she [[IdiotBall crawling through the cat flap]]?]]
* ''Film/{{Flight}}'': In order to make sure that Denzel Washington's character is forced to pay for his crime (even if he might have managed to detox all on his own), the door to the next hotel room over just so happens to be unlocked (actually, locked open), and the balcony open so that the wind can make the door 'knock' until Denzel notices and decides to check it out and thus find a pile of liquor.
* ''Film/EvilDead2013'' has Diabolus coming around - and sloppily so - in the remake. [[spoiler: You really thought both David ''and'' Mia would end up surviving the ordeal, do you? Well, then get a {{Senseless|Sacrifice}} StupidSacrifice from David [[NiceJobBreakingItHero which actually makes things WORSE]].]]
* ''Film/{{Impostor}}'' revolves around a man trying to prove that he's not an alien-created replicant of himself with a bomb in his chest. At the climax of the movie, the man and his wife find the alien crash site where he was allegedly killed, and discovers his wife's body inside the spaceship, proving that his wife was the replicant instead. Then suddenly, in the last few minutes, the authorities that were chasing him through the whole movie discover the man's body as well, proving that he was also a replicant, and the man [[ShootTheShaggyDog promptly explodes and kills everyone in the area]].
* In ''Film/DawnOfTheDead2004'' at the end of the movie less than half of the characters make it to the docks and escape in a boat. In the credits, they reach an island and are swarmed upon by a horde of zombies with their fates left unknown.
* ''Film/TheDevilInside'' had a particularly infamous example. The three remaining protagonists, one of whom is possessed by a demon, have escaped the hospital the demon was tearing up in their van. Suddenly, [[BodySurf the demon jumps into the body of the driver]] and forces him to [[KillEmAll swerve into the path of an oncoming truck, killing all three]]. [[NoEnding The end.]]
* Harry Osborn in ''Film/TheAmazingSpiderMan2'' has been a persistent figure throughout the film and successfully executes a plan to get back at Oscorp for screwing him over. However shortly before the climax [[spoiler:he injects himself with the venom of the spider that bit Peter and it has [[PsychoSerum bad effects]], to say the least. He straps himself to an experimental PoweredArmor then hunts down Spider-Man. After putting two and two together he realizes that Spider-Man is Peter Parker and understands that an earlier slight he suffered at the hands of Spider-Man meant that he was being slighted by Peter, someone he thought was a friend. He snatches Gwen, flies up to the top of a clock tower, and [[ILetGwenStacyDie the rest more or less writes itself]]]]. Really, aside from setting up future story arcs, his sudden appearance is solely so [[spoiler:Peter can wind up grieving the death of Gwen and rebuilding his HeroicResolve thereafter]] because he had otherwise served a greatly different purpose for most of the movie.
* The Butch storyline in ''Film/PulpFiction'' arguably features a couple of these. Just as Butch is able to retrieve his heirloom watch [[spoiler:after shooting Vincent in his apartment]] and is driving out of town, he just happens to come across his rival, Marcellus Wallace, just randomly crossing the street in front of him and who manages to recognize Butch. Things are further complicated after Butch hits Marcellus with his car, they get into a gun fight, and he seeks refuge in a pawn shop, not knowing that it's run by a couple of sadistic Neo-nazis who [[spoiler:kidnap both him and Marcellus with the intention of sodomizing both of them]]. You could also argue that the Diabolus Ex Machina with Butch's complete chance encounter with Marcellus manages to ultimately be a Deus Ex Machina of sorts in the end, as Butch's decision to [[spoiler: rescue Marcellus from Zed's crew ultimately results in Marcellus calling off his hit on Butch]].
* In the 1974 car-chase film ''Dirty Mary, Crazy Larry'', just as the protagonists escape from the police and are celebrating their victory, they are suddenly killed when they randomly collide with a freight train. The credits roll over pictures of the burning car.
* A common criticism of the BittersweetEnding to ''Film/LaLaLand'', where [[spoiler:Mia and Sebastian break up and don't get back together again, despite affirming that they'll always love each other, and Mia ends up having a child with someone else]]. Though the director was clearly trying to go for a more realistic and less "fairy tale" ending, many felt that it didn't gel with the rest of the film, which wasn't averse to standard Hollywood magic tropes [[spoiler:(such as an extremely famous casting director happening to be one of the few people at Mia's one-woman show and immediately gaining such an interest in her that she's willing to give her a good part in an upcoming big picture)]]. Many were similarly unconvinced at [[spoiler:the final breakup]], finding it contrived, unnecessary drama, and a rather hackneyed attempt at being subversive when so much of the rest of the movie had no trouble garnering acclaim when it was typical fanciful Hollywood magic, and were unconvinced that the fantasy sequence couldn't have just been the true end of the film, or [[spoiler:Mia and Sebastian getting back together when their careers have settled more instead of Mia apparently moving on immediately to another man and having a baby when one of the main reasons they broke up in the first place was that she could focus on her career]].
* The 1978 disaster film ''Film/{{Avalanche}}'' leads this into {{Narm}} territory. After spending 3/4ths of the movie introducing us to the various characters in the film, the titular avalanche kills a vast majority of them because they don't see it coming. Then, by ''[[EpicFail sheer incompetence]]'' do many others die. The worst case is the male lead's mother. She survives the avalanche, survives the kitchen of the winter resort blowing up, survives suffering a concussion and going into shock and we're shown her being taken to a hospital. However, she doesn't survive ''that'' as the stupid driver decides to wipe out by driving down the hilly road like a madman, sending everyone except the leading lady to a fiery death. That's not counting the DisasterDominoes caused by the first responders racing to the rescue.

* ''The Hapless Child'' by Creator/EdwardGorey is this trope turned UpToEleven over and over and over again. Bonus points for an ending which seems to be headed towards DeusExMachina but goes with Diabolus ex Machina instead.
* ''Literature/{{Animorphs}}'' killed a major character in the finale. Fair enough - their lease on survival was [[GoodThingYouCanHeal well overdue]]. But then, not content with successfully leaving realistic loose ends arising from what came before, Applegate brought in a completely unheralded [[TrippyFinaleSyndrome Hindu Borg Collective]] to really ruin her readers' day in the last handful of chapters. WordOfGod stated that she felt the fans would have preferred to see the main characters go out fighting.
* Proof that the Diabolus has been around [[OlderThanFeudalism for a long, long time]] exists in the ancient [[Myth/GreekMythology Greek myth]] of Orpheus, the bard, who walked into Tartarus to bring back his wife, Eurydice, who had died on their wedding-day. After giving a performance that made the Furies weep, Hades gave his permission for Orpheus to bring her out with him -- so long as he walked all the way out without turning around and looking back. The catch? Nobody told him he had to wait before ''both'' were outside... For a second, he sees her shade, before she is pulled back to the underworld, crying his name...
** Some versions of the myth omit the Diabolus and have him lose his nerve for some other reason; thinking that he heard her cry out, for instance, or just plain ol' lack of willpower.
* Creator/TomHolt has a good working relationship with the Diabolus. This is particularly exemplified in ''Little People'', where he introduces an entirely new metaphysical rule just to ensure the DownerEnding.
* ''Literature/TheEpicOfGilgamesh'' is another of the Diabolus' old-school performances. After Gilgamesh has gone through unbelievable trials to procure a flower that grants eternal life, it's eaten by a snake on his way home. Proof that even the Diabolus ex Machina cannot resist the classic appeal of being ScaledUp...
* "Literature/ThePitAndThePendulum" uses both this and DeusExMachina.
* ''Literature/PerdidoStreetStation'' by Creator/ChinaMieville's summons the Diabolus ex Machina with an unholy ritual of DungeonPunk [[FunctionalMagic Thaumaturgy]]. The fact that two completely separate incidents, with no relation between them, ensures that ''all'' the main characters will spend the rest of their days being utterly miserable makes this one of the nastiest examples of the demon's works. DeusAngstMachina was invited to the party, and danced all night long...
** Mieville's other books, ''Literature/IronCouncil'' and ''Literature/KingRat'', do this to a lesser extent. The first involves one of the main characters doing something incomprehensibly stupid that denies the revolution against the tyrannical government of New Crobuzon much-needed reinforcements (though it's implied they wouldn't have won anyway). The second has the reader being informed casually that the children who were the original victims of the BigBad of the story were condemned eternally to hell alongside him (and the main character essentially doesn't care). ''Iron Council'' even has the chutzpah to tack on an epilogue that tries to make it not seem like the complete and utter betrayal that it is. The author has said a happy ending would be a betrayal to reality and the everyday suffering of the oppressed. He believes life is a continuous stream of Diabolus Ex Machina.
* The last 3 chapters of ''[[Literature/HisDarkMaterials Northern Lights]]'', apparently for the purpose of introducing the rest of the trilogy. Shouldn't the author have been concerned with connecting it to previous events as much as upcoming events? Omitted from TheFilmOfTheBook.
* ''Literature/HouseOfLeaves'' has the moment that Will Navidson, Tom, and Billy Reston finally come upon poor Jed and wounded Wax in the middle of the labyrinth after two weeks, and after [[spoiler:Holloway shot Wax]]. Jed is so happy. [[spoiler:Then Holloway reappears and blows Jed's head off]].
* Ian Irvine goes all out in his ''Well of Echoes'' trilogy (which [[TrilogyCreep became a quadrilogy]] almost, it seems, so Diabolus could strike). The world is saved! All is harmonious! At which point one of the BigBad ''whose son explicitly identified him as dead earlier'' turns up. To top it all off, the heroes then destroy all the world's magic, hoping to overload his personal magic source, but that backfires, leaving him the only one with any real magic in the entire world and the rest of civilization pawns to his whims. All so the author could go on and write a dictatorial dystopian trilogy as a follow up. Go figure.
** The author loves his {{cliff hanger}}s, with only one of his fantasy books actually having a proper, satisfactory ending. The others have such glorious situations as [[spoiler:one character inadvertently summoning an interdimensional invasion force to her world, the magical field failing at a pivotal battle, rendering the vital magically powered walking tanks useless in the face of a horde of giant winged and clawed mutant monster things, and all the protagonists being captured by a BigBad and sentenced to be flayed alive]]. No happy endings here, folks.
* In ''TabletopGame/{{Warhammer 40000}}: Literature/GauntsGhosts'', [[spoiler:Lijah Cuu]] is effectively a manifestation of Diabolus. At the end of ''The Guns of Tanith'', he kills off [[spoiler:"Try Again" Bragg]]. In ''Sabbat Martyr'', although the fighting is effectively over and the nine chosen assassins have been slain, he is subverted by Chaos psykers into killing Saint Sabbat. Although he does not succeed and [[spoiler:dies in the process]], he still succeeds in killing [[spoiler:Colm Corbec before he gets killed too]].
** Poor [[spoiler:Sehra Muril, the red-haired girl with a "deliciously dirty laugh". She was going to be first FEMALE VERGHAST SCOUT if it hadn't been for Cuu!]]
* Creator/HansChristianAndersen, "The Flying Trunk": Things are going well for the beggar guy with the titular trunk with his romance with a princess, [[spoiler:until the trunk gets destroyed by shrapnel from celebratory fireworks. Seriously. For a Hans story, that's pretty rough. Guess that's why it's not as well known as his other tales..]].
* ''Literature/TheKiteRunner'', by Khaled Hosseini. The protagonist and his best friend's son are getting along well and all set to move to America when [[spoiler:the main guy tells boy he might have to go back to the orphanage for a short time, and the little boy tries to commit suicide and stops talking]].
* ''The Princetta'': The main characters return from their adventures and are all set to live HappilyEverAfter, Malva and Orpheus get together... [[spoiler:and then Orpheus is murdered at the last minute.]]
* A rare good use: ''Literature/AllQuietOnTheWesternFront''. The narrator is hit by a stray bullet on a day so quiet the official report was a TitleDrop. It works because we've already established that Fate is a ''bitch'' towards soldiers. (The movie adds {{Retirony}} by making it the final month of the war.)
* In Creator/RobertAHeinlein's ''Literature/TheCatWhoWalksThroughWalls''. All fictional universes are real alternate universes in their reality. One of the characters points out that a hero (a writer) is not permitted to resurrect the BigBad of his favorite fictional universe because of this trope. The character asks if the hero can just retire as head of the training school but apparently the risk is that the story will evolve to need a serious villain, who will come into existence if written.
* ''Literature/TheReynardCycle'': In ''Defender of the Crown'', Reynard foils a conspiracy to kill the Queen by drugging her with a sleeping potion that causes her to appear as though she were dead. When the conspirators attempt their coup, he's waiting for them. Problem is . . . [[spoiler: He inadvertently poisoned her, she's actually dead, and this information is revealed in a room full of witnesses who now need to be silenced. Some of whom are children.]]
* In Meredith Ann Pierce's ''Literature/TheDarkAngelTrilogy'', Aeriel and [[spoiler:Irrylath]] have finally become an official couple after two years of WillTheyOrWontThey. So of course [[spoiler:it turns out that her body was actually destroyed and reformed into an immortal substance earlier that book, meaning that theirs is now a MayflyDecemberRomance. This is {{Info Dump}}ed by the mentor, who is now a ''voice inside Aeriel's head" who demands that she leave Irrylath and go RidingIntoTheSunset. Because IWantMyBelovedToBeHappy (and wants the world to last longer than “a handful of generations more”), she agrees, and tells Irrylath to go marry the RomanticFalseLead]]. Nobody's too happy about this except the child bard who gets to turn the whole story into a pretty song [[spoiler:(and the RomanticFalseLead, who is specifically described to be observing the two’s farewell "with barely guarded joy" even though the hero shuts her down pretty quickly)]].
* ''Literature/FinalDestination: Dead Man's Hand''. After the set up disaster the survivors are being transported by a cop, who dies in a freak traffic light accident (the group manages survive the car going out of control though). At the very end of the book the FinalGirl, who thinks she's beat Death and won, gets a call from her doctor, who says she has very advanced HIV, contracted from being splattered in the cop's blood at the beginning of the book.
* Creator/EllenHopkins's book ''Burned'' throws a ''completely random'' [[spoiler:car crash]] to cause an [[spoiler:inconvenient miscarriage and kill the protagonist's {{Love Interest|s}}]]. The author seems contractually required to provide a DownerEnding or BittersweetEnding because TrueArtIsAngsty, but all her other protagonists got themselves in trouble with their own actions and not a snowstorm. Note to author: [[VoodooShark It doesn't count as foreshadowing if you don't foreshadow until five pages before the event!]]
* ''Literature/TheRamayana'': AFTER Rama rescues his wife Sita, wins the epic battle against the demons, and gets crowned king, he puts her through not one but two trials by fire. Because his subjects believe she might have cheated on him while she was being ''held hostage.'' She asks to be - and is - swallowed up by the earth after trial by fire #2. This last part is usually omitted in retellings for good reason.
* ''Literature/TheDresdenFiles'' book ''Literature/{{Changes}}'' has a very nasty one at the end - after barely managing to win the climactic battle, [[spoiler:Harry gets shot and killed]]. However, it is then ''subverted'' in the next book, ''Literature/GhostStory''. [[spoiler: Harry arranged for himself to be killed and had his memory of arranging the assassination erased. He did this for extremely good reasons, and the suicide's motivations and consequences are examined in great detail.]]
* ''Literature/SeekerBears'', by Erin Hunter. A young polar bear, Kallik, is orphaned and alone. After much wandering and hardship she gets caught by humans, who plan to re-release her alongside Nanuk, a mother who'd lost her cubs, in the hopes that she would adopt Kallik. After some consideration, both bears decide that this is an acceptable arrangement. [[spoiler: Nanuk immediately dies in a helicopter crash]]
* In ''Lord Sunday'', the final installment of 'Literature/KeysToTheKingdom'', Arthur finally collects the 7 Keys. Up until this point, the series has been fairly predictable, although things have been getting kind of real in the background, what with [[spoiler:the deposed Trustees being mysteriously murdered and some people dying from plagues]]. However, it's here where everything truly goes downhill for Arthur. All he wants to do is end the fighting, but [[spoiler:the Will has other plans. It uses him to bring in a tide of Nothing to destroy the Universe, because it turns out it's 1/2 of the Architect of said Universe, and wants to die, but it can't until its creation is destroyed. The main characters are frozen by the power of the Keys, unable to do anything to save themselves for the few moments they have until destruction]]. Fortunately, it gets better. It turns out that [[spoiler:they were frozen because the Atlas was recording the Universe for Arthur to recreate it.]] The catch? [[spoiler: Arthur's mother had died just moments before.]] A series that had been very light-hearted up until this point takes a sudden turn: Arthur went on that entire quest with the only result being [[spoiler:the death of his adopted mother]]. The closing dialogue of the main story? "Wow, Arthur! You won!" "Yeah...I guess we won." Freaking. Ouch.
%%* [[Literature/SecretHistories In From Hell with love]] [[spoiler:At the end of the book an Immortal disguised as Isabella stabs Eddie; she then bites his poison tooth and dies. While Eddie is slowly dying]]
* At the end of ''Literature/HarryPotterAndThePrisonerOfAzkaban'' it seems as though Harry will be able to leave his abusive foster family to live with his godfather, while the true criminal will go to jail. Then [[spoiler: Remus Lupin]] turns into a werewolf (this being the night just having happened to be a night with a full moon and Remus having forgotten to take the potion, which would keep him safe), and in the confusion, the criminal escapes, [[spoiler: meaning the innocent man convicted in his place needs to go on the run rather than take in Harry. Although, it later turns out that to live with the man in question would have compromised Harry's security from potential attackers]]. Trelawney did predict it a chapter before it happened, but the reader can always hope, no?
* At the very end of "Nuclear Holocaust Never Again", the second book in the "Never Again" series by R. J. Rummel, things are looking pretty good. The heroes have managed to SetRightWhatOnceWentWrong and have confronted the parents of the at-this-point still an infant villain, who have willingly [[RaiseHimRightThisTime let the heroes adopt him so that he doesn't grow up to become a nuclear-war-causing dictator.]] Then, [[spoiler: John, Joy, and the child are blown up by a religious extremist's bomb]]. At least the world is safe, [[spoiler: [[ResetButton until the sequel anyway]]]].
* Shows up in ''Literature/{{Shiver}}'' in the form of [[spoiler:a white-tailed deer. It appears in the middle of the road at exactly the wrong time, causing the crash that wrecks Grace's car. Both occupants survive, but with no way to keep Sam warm until help comes, he turns wolf for good. The characters are forced to try an incredibly dangerous plan to bring him back]].
* ''Literature/GreenSkyTrilogy'': Yay! The children have been found, the last of the old-guard Ol-Zhaan has rendered himself harmless through excessive narcotic use, the Erdling radicals have been jailed, the two races are finally figuring out reconciliation and want to make it work. All we need to do is make this mostly symbolic gesture of destroying the last weapon...oops. Fortunately, Snyder wrote and charted a {{Canon}} sequel to her books in video game form.
* ''Literature/TheCountOfMonteCristo'' {{lampshade|Hanging}}s and ends up subverting the trope. Initially Dantes blames God and fate for all the terrible things that occurred to him, but with the help of a fellow inmate, is able to reason out how certain ''people'' wanted him to suffer, not God. Thus, it becomes a core part of his philosophy that once he breaks out, he can't count on Diabolus to hand out random punishment. It has to be up to him.
* The ending of ''Literature/{{Malevil}}'' tastes a little of this, because of a DistantFinale. Some 575 pages are spent on a six-eight month period and the final 20 pages are a 3-year epilogue. More tragedy strikes in the final pages then the whole novel before because it covers a much larger span of time, bringing the story to a BittersweetEnding.
* At the end of ''Literature/MySistersKeeper'', Anna finally gets medically emancipated from her parents...[[spoiler: and is then killed in a car accident, yet her kidneys--the organ she had been asked to donate earlier in the book, leading to the aforementioned emancipation quest--are perfectly intact to give to her sister, rendering her actions pointless.]]
** Another Picoult example, at the end of ''Literature/HandleWithCare'', after an long, grueling trial initiated to gain funds for Willow's treatments, [[spoiler: the O'Keefe's win the trial and the money]], and immediately after, [[spoiler: Willow drowns in the icy lake behind her house, rendering the trial pointless.]]
* ''Literature/BridgeToTerabithia'': all goes well for Jess, he finally warms up to using his imagination... and then [[spoiler: Leslie dies randomly, which drives home the point that cruel reality trumps imagination..]]. The inspiration for Creator/KatherinePaterson writing ''Bridge to Terabithia'' was her son's best friend [[spoiler: likewise being struck by lightning]].
* The end of Part 1 of ''Literature/TheSexGates''. Lee and Rita are going to have a baby, Rita is finally opening a facility that should make the lives of technologically-deprived poor people much better... and then one of those same poor people fatally stabs her when he's supposed to be shaking his hand. They're forced to push Rita through one of the titular gates, which saves her life at the expense of [[GenderBender turning her into a man]] and [[TearJerker destroying her unborn child in the process]] - and Lee loses his balance and falls through as well, turning into a woman.
* ''Literature/TheJungle'' is ''made'' of this, at least until [[AuthorTract Jurgis discovers Socialism]]. Even then, the [[WhatCouldHaveBeen original ending]] had one of these come out of absolutely nowhere in ''literally'' the last sentence of the book to render the entire novel [[ShootTheShaggyDogStory completely pointless]]. This ending was ultimately cut.
* ''Literature/ASongOfIceAndFire'' is made of this. No one, good or bad, ever seems to enjoy a permanent victory.
** The worst example is most definitely the Red Wedding. [[spoiler: After much struggle and loss, Robb and Catelyn are going to retake the North from the Ironmen, and Arya is heading to meet them and finally reunite with at least part of her family. Then Robb and Cat are brutally murdered by their allies, meaning Arya now has nowhere to go, the North's cause is lost, and the Lannisters have basically won the war.]]
** After months and months of trying desperately to connect again with family after going through sheer hell, it looks like Arya is about to meet up with Robb and their mother as she nears the Twins with the Hound. Nope: that ''doesn't'' happen [[spoiler: thanks to her turning up just in time to get a front row seat to the massacre that occurs outside the Wedding]]. Then, [[FromBadToWorse It Gets Worse]]... and, damn that all-too-brief HopeSpot.
** Sansa gets to avoid marrying Joffrey when he gets engaged to Margaery instead. Everything looks all set for her to head to Highgarden and escape her gilded prison -- just for Tywin to force her to marry Tyrion in order to keep her claim to Winterfell in Lannister hands and force her to stay in Kings Landing. And, then [[FromBadToWorse It Gets Worse]]. Yet again, the offered HopeSpot makes the resulting disappointment that much worse.
** [[spoiler:Then Joffrey, Tywin, Pycelle and Kevan die and Cersei's incompetence gets her overthrown by the Faith Militant. But they overlooked the fact that Qyburn is still loyal to her. And on and on this cycle goes...]]
** [[HeroicBastard Jon's]] final chapter in ADWD is also this. [[spoiler: Last we knew, Stannis was gearing up to fight to Bolton's. Jon then receives a letter from the [[BastardBastard Bastard of Bolton, Ramsay Bolton]], who claims that Stannis is dead, Stannis' army crushed, that he has captured Mance, [[FlayingAlive flayed his spearwives]] and he's coming north to kill Jon unless Jon hands over his bride 'Arya' (actually Jeyne Poole) along with others under the Watch's protection. Jon is appalled by the letter, announces he will march south to confront Ramsay Bolton, and the wildlings volunteer to join Jon. Then Bowen Marsh and his conspirators assassinate Jon in a mutiny 'for the Watch'. The only upside to this is plenty of readers think that the letter isn't true, and that Jon isn't permanently dead. But if they are.. ''sheesh''.]]
** Balon Greyjoy's actions make things infinitely worse for the Stark faction (and his own son Theon), which does make sense as he's doing a lot of them simply out of hatred for Ned Stark defeating his rebellion and so is gunning for the whole family, and then when there's a point in the story when he might actually need to do something himself instead of directing his family, he dies by falling off a bridge. So he was entirely pointless for anything other than making things worse for the Starks and Theon.
*** It's later revealed that his younger brother Euron hired a Faceless Man, presumably Jaqen H'ghar, to kill his Balon while making it look like an accident.
** A lot of the bad things that happen occur due to people scheming behind the scenes, and a lot of them are foreshadowed several times in the text, including the Red Wedding and Jon Snow's assassination. However, there are a few times where the protagonists are screwed by plain dumb luck (i.e. Author Fiat). Commonly cited examples would include Theon somehow taking Winterfell with only 20 men, which is the driving force behind Robb losing the war, a lot of the things happening to prevent Ned Stark from succeeding in his investigation at the right time (crippled by his horse falling on him and knocked out of it just long enough for Robert to go hunting, Cersei's Hail Mary plan of killing Robert actually being successful, and news of Jaime's capture (which would make Ned way too valuable a hostage to execute) arriving too late at King's Landing to save him. Also included would be the storms that delay Stannis from reaching King's Landing earlier, coupled with Edmure Tully's accidental screw-up which allows Tywin to reach King's Landing along with the Tyrells. Of course, all of these Diabolus Ex Machina for the Starks end up being Deux Ex Machina for the Lannisters. Discussed in detail [[http://turtle-paced.tumblr.com/post/168750213542/a-few-people-in-my-inbox-asking-if-i-could-explain here]]
* Literature/OrsonScottCard calls these "dirigible endings"; he once wrote an essay on writing in which he mentioned having taught a writing class where one student had written a story about a cult whose leader had convinced all its members to give away all their possessions and climb to the top of a mountain. The writer then couldn't figure out how to end the story, so she had a [[ZeppelinsFromAnotherWorld dirigible]] fall on them, crushing them all. Marion Dane Bauer told a similar story in her book on writing; she'd say to her writing students "If you end your story by having your main character get hit by a truck, you have just flunked."
* ''Franchise/StarWarsLegends'': So the New Republic has made peace with the Imperial Remnant, the Jedi's image has recovered somewhat from Darth Sidious's propaganda and from Luke Skywalker's mishandling of Caridagate. [[TheMafia Black Sun]] is too busy licking its wounds to be any threat. Sure, there are still some interplanetary troubles, just like there were in the Old Republic, but nothing the Jedi can't--[[Literature/NewJediOrder What the kriff?]] There's been an implacable extragalactic invasion force massing at the edge of the galaxy since about the time Sidious became Chancellor?
** What's that? The weird little alien who was a teacher to Jacen was really a Sith and was setting him up to be turned to the Dark Side? And it worked, years later?
** And how can we forget, despite his death being one of the most critical moments in the whole franchise, Palpatine is revealed to be effectively immortal, as he can now transfer his essence into almost anyone (particularly the army of clones of himself he just had lying around). And now he's ready to cement his status as the most powerful force user of all time by turning Luke to the darkside, being able to transport anything anywhere or any time, and destroying entire planets and fleets with a newly invented "Force Storm". That's right, he doesn't need a Death Star.
* In the novelization trilogy of ''Anime/MobileSuitGundam'', Char Aznable is able to convince Amuro Ray to join him and help end the One Year War. Even more, he warns them of the Solar Ray weapon Gihren Zabi has aimed at A Baoa Qu and Amuro races off to warn the crew of the ''Pegasus II''[[note]]Note: Here, ''White Base'' was known as ''Pegasus'' and they get a second one during the second book[[/note]] and the other Federation soldiers of these developments. [[spoiler:Cue one of Char's wingmen getting too trigger happy with his Rick Dom and shooting the G-3 Gundam in the back, blowing it up and ''killing Amuro.'']]
* ''Literature/HaloGhostsOfOnyx'': Admiral Patterson is down to one carrier and three destroyers, facing two damaged Covenant destroyers. One is taken out, leaving a single Covenant ship utterly defenseless. And then a Covenant fleet 32 ships strong comes out of slipspace between the lone destroyer and the four UNSC ships, and promptly annihilates the human vessels.
** Made all the more wrenching by the fact that Admiral Patterson had already managed to defeat a numerically superior Covenant fleet, something which even the best UNSC commanders have trouble doing.
* ''[[Literature/CircleOfMagic Battle Magic]]'' by Creator/TamoraPierce does this near the ending. After fighting Emperor Weishu's vast armies and actually beating one back from the capital, though with the knowledge that they can't do it forever, everyone suddenly wakes up as Weishu's captive because he's had sleeper agents in the city for decades. The presence of imperial agents wasn't foreshadowed in any way and the previous threat was ''always'' the military force. [[spoiler:This is the setup for a subsequent DeusExMachina--literally, the gods of Gyongxe come out and ensure that Weishu won't even ''think'' of coming back.]]
* In the last ''Literature/TheWheelOfTime'', despite setbacks, the good guys are actually winning - and then Demandred shows up with [[spoiler:a massive Sharan army, which by the way has more channelers than the White Tower, Black Tower, Aiel, Sea Folk, and Seanchan ''combined'']].
* Swedish writer Simona Ahrnstedt does this in her debut novel ''Literature/{{Overenskommelser}}''. Beatrice and Seth, the two protagonists, have what can only be described as a really hot date. Surely they will sort things out now, after eight months of misunderstandings? Surely now Beatrice won't have to marry Rosenschiöld (who's like forty years older than her and treats women like dirt), to whom she was forced to get engaged? But alas, not only does she have a tyrannical uncle. She also has a sadistic [[TheSociopath sociopath]] for a cousin, who now makes sure that she's separated from Seth. Cue a whole year of more misery for Beatrice...
* At the end of Knut Hamsun's ''Literature/{{Victoria}}'', it looks like Johannes and Victoria will finally get a chance to live out their love, but Victoria suddenly gets tuberculosis and dies.
* In ''Literature/MidnightsChildren'', Ahmed and his business partners are told "ShameIfSomethingHappened" and must make a payment. When they go to deliver it, a monkey comes out of nowhere and tosses their money sacks in a gutter. This forces Ahmed to relocate to Bombay, which sets many events in motion.
* ''Creator/RoaldDahl'' does this a few times but ''Literature/JamesAndTheGiantPeach'' has the most egregious example. James lives a happy, contented life until one day his parents are randomly killed by a rhino. Taken UpToEleven in the film version, where the death is done offstage, in the following voiceover: "And then, one day, a terrible thing happened. A [[GiantSpaceFleaFromNowhere giant rhinoceros came out of nowhere]] and gobbled up his poor mother and father."
* The ending to Volume 7 of ''LightNovel/TheUnexploredSummonBloodSign''. Kyousuke has created the Colorless Little Girl, an artificial summoned being designed specifically to defeat his nemesis, [[BigBad the White Queen]]. The Colorless Little Girl utterly [[CurbStompBattle curb-stomps]] the White Queen, and appears to successfully kill her once and for all. On top of that, Kyousuke manages to settle the score with [[AbusiveParents his father]]. [[spoiler:And then the White Queen reappears, having somehow survived. To make matters worse, she reveals that this was AllAccordingToPlan. By allowing the Colorless Little Girl to defeat her, she's ensured that the Girl will be warped into a monster greater than the Queen ever was (this part isn't an AssPull, as the concept was established earlier in the series). To defeat the Colorless Little Girl, Kyousuke will have no choice but to work with the White Queen... [[TheBadGuyWins meaning that she's finally achieved her goal]].]]

[[folder:Live-Action TV]]
* ''Series/BuffyTheVampireSlayer'':
** Poor little Cassie from "Help", rescued effortlessly from both an evil cult and arrow booby-trap, only to die from shock due to a heart condition (which was mentioned) as the arrow trap (which one of the villains sets up and discusses) activates. Buffy catches it without even blinking but it is too much for Cassie.
** Tara was lethally shot through a window and died almost instantaneously while in the middle of the room on the second floor. The gunman was outside on the ground shooting a pistol randomly into the air and yet on pure luck managed a hit so precise that a Marine sniper perched on the opposite rooftop with a rifle would have been hard-pressed to match it. Seriously, this one's a TropeCodifier.
** In one of the Buffy comics, Halfrek the vengeance demon has cursed somebody that every descendent of his will die on their 30th birthday, and to ensure this happens she sends a variety of demons and monsters after one particular descendent. Spike wants to stop her mainly out of spite and figures that if he can keep the guy alive until midnight, he's off the hook. Then, after Halfrek has given up, at one minute past midnight, the guy falls out of a window for no reason, and dies anyway...
** Tara's sanity gets sucked out, but despite being attended to by Dawn for some time, waits until Glory punches a hole in her wall to start babbling about how Dawn's the glowing green energy girl.
** Xander is told a lot of nasty things about his [[spoiler:marriage with Anya by an old man who claimed to be Xander himself from the future. He then finds out that "old Xander" is an impostor demon, and that everything it said was a lie. He actually participates in fighting the demon and the Scoobies manage to kill it. Then Xander decides to leave Anya at the altar, anyway]].
** Actually [[spoiler:(doubly, once because evil swaps with good and once because the returning-home-spell doesn't change her fate in the other dimension)]] inverted in "Doppelgangland" when [[EvilTwin Evil Vampire Willow]] from the Wishverse comes to the Buffyverse, gets the I-want-to-go-home going and after saying goodbye the viewer is reminded that she gets back to the exact time she came from, only to [[spoiler:die a second time]].
** The crown jewel of this trope may be Angel [[FaceHeelTurn losing his soul and becoming evil again]]. In one fell swoop the OfficialCouple is [[ShipSinking broken up]] and a new BigBad with intimate knowledge of all the heroes is introduced, all because Angel will lose his soul if he ever has a moment of true happiness . . . something that was never mentioned until after it already happened.
* ''Series/{{Endurance}}'': During the final five of ''Tehachapi'' and the final four of ''High Sierras'', whichever team came in last in the Endurance Mission would automatically be sent to Temple unless they won the next Temple Mission. [[spoiler: Neither team overcame this obstacle.]]
** In ''Fiji'', the two teams who would go to Temple after the final Temple Mission were decided based on a [[LuckBasedMission drawing of nuts]]. The order which the teams finished said Temple Mission determined how many nuts each team would have in the drawing bag. Essentially, whichever team won the final Temple Mission could still go to Temple. [[spoiler:This was what got the red team eliminated even though they won the mission.]]
* ''Series/GameOfThrones'': Frequently, partially because this trope and its counterpoint are applied equally to every faction and GreyAndGrayMorality means one faction's ''deus'' can be seen as another's ''diabolus''.
** Joffrey throws a SpannerInTheWorks of ''his own faction'''s plan to banish Ned Stark in exchange for peace by having Ned executed instead.
** The Red Wedding puts a surprise end to House Stark as a viable faction with an unexpected betrayal and massacre that reduces them to a few children, many of whom are (incorrectly) presumed dead.
** Three episodes later, the same thing happens to the Lannisters when their king is poisoned at his wedding and their TokenGoodTeammate is put on trial for it. This directly leads to Tyrion killing Tywin and fleeing, thus depriving the Lannisters of their two most intelligent and capable members and leaving the realm in Cersei's hands. Things quickly fall apart for them from there.
** The duel between Oberyn Martell and Gregor Clegane ends this way when Gregor manages the strength to trip and literally crush Oberyn.
** This happens twice in Season 4 with two instances of Stark kids ''almost'' reuniting but something prevents it, resulting in the characters just missing each other. It seems the writers will do anything to keep this family separate, even as they come within a hair's width of reuniting.
*** Bran and Jon are almost reunited at Craster's Keep when Bran and his party are there, with Jon arriving to deal with the mutineers -- but they are prevented from reuniting. Bran wants to go to Jon and let him know he's there but Jojen Reed stops him, explaining that Jon [[BigBrotherInstinct will want to protect Bran and stop him from going further north to keep Bran safe]] if he finds them there and so they leave the keep without letting him know they were there.
*** Likewise, Sansa is with Littlefinger in the Vale, which is where Arya and the Hound are heading to see Arya's Aunt Lysa. Arya and Sansa nearly reunite at the Vale -- but they are prevented from doing so because, when the Hound and Arya arrive, Arya is told her aunt is dead and they leave. Apparently, no one bothers to inform Littlefinger or anyone else that ''Arya Stark'', long presumed dead, has shown up at the gates looking for her aunt.
** In Season 7, Euron Greyjoy comes out of nowhere and creates and mans a fleet out of apparently nothing then destroys two different fleets with apparently negligible losses and thereby preventing the show from ending.
* Many of the murders in ''Series/ColdCase'' are played this way, since due to the flashbacks we actually get to know the victims and the people in their lives:
** "Shuffle, Ball Change:" A teenage boy who wants to become a professional dancer finally earns the respect of his father, who had previously thought him a sissy. [[spoiler: His older brother beats him to death that same night because he thought he was becoming TheUnfavourite.]]
** "Triple Threat:" Similarly, a teenage singing prodigy who wants to move from opera to pop finally earns the respect of HER father. [[spoiler: Before he can tell her how proud he is, she's poisoned by her {{Yandere}} voice coach.]]
** "The Letter:" An interracial couple vow to run away together, the times (the Depression era) be damned. [[spoiler: Drunken [[TheKlan Klansmen]] randomly burst in and gang-rape the woman, forcing the man to MercyKill her.]]
* ''Series/{{Heroes}}'':
** Charlie is killed by Sylar for her power. Hiro decides to go back in time to save her, but overshoots yesterday and winds up six months in the past. He develops a strong relationship with her, and she becomes his first love interest. Just before leaving with Hiro for Japan, she reveals she has a blood clot in her brain that'll kill her right around the time Sylar kills her anyway. This rips Hiro's heart into pieces and makes his power go wonky, accidentally putting him in Japan, far away from her, so she stays at the diner and is killed by Sylar anyway.
** In the fourth season, Hiro goes back in time to the diner where Charlie worked and convinces Sylar to use his powers to remove the clot in her brain. Almost immediately afterwards, at the end of the episode she was healed in, she gets kidnapped by the Big Bad and deposited in 1944, thereby robbing Hiro of any potential relationship with her.
** Happened a second time with poor Hiro, albeit this time less touching and more stupid. He goes back sixteen years, and meets his dying mother. She gives him the catalyst, and he vows to keep it safe from Arthur, who wants to use the catalyst to fuel his army of supersoldiers. Somehow, for no explained reason, Arthur knows that Hiro has the catalyst and teleports exactly to where Hiro and Claire are. He steals the catalyst, sends Claire to the present, and almost kills Hiro.
** Sylar has benefited from this trope so many times it's not even funny. He technically "died" in Company custody halfway through the first season, but got a mysterious off-screen resurrection. Eden's CompellingVoice and Mohinder's power-disabling serum both worked against Sylar at first, but conveniently and inexplicably failed right when they were about to kill him. In the finale of the first season Niki uses her SuperStrength to wail on Sylar with a parking meter, Hiro runs a friggin' ''katana'' through his body, and he ''still'' survives.
** In Chapter Four, Danko stabs Sylar in the spot in his head should have prevented his HealingFactor from working. Sylar survives, explaining that he used ShapeShifting to move the spot to another part of his brain. Previously, Sylar and James Martin (from whom Sylar acquired the poower) had used it only to assume the appearance of another person.
* The Diabolus has occasionally been employed by ''Series/TheOuterLimits1963'' and ''Series/TheTwilightZone1959'', as indicated above -- they have a healthy partnership.
** A particularly impressive example of their partnership is the famous ''Twilight Zone'' episode "[[Recap/TheTwilightZoneS1E8TimeEnoughAtLast Time Enough at Last]]", where an unfortunate, timid man has locked himself in a bank-vault to get the peace to read his many books -- and because of that, survives a [[TheEndOfTheWorldAsWeKnowIt nuclear holocaust]], leaving him the last man alive in the world. Then he realizes that this gives him plenty of time to read his beloved books, and thus unwittingly invokes the Diabolus Ex Machina, who promptly breaks his glasses.
* In the season two finale ("Twilight") of ''Series/{{NCIS}}'', the team manages to foil a devious terrorist plot. As they are celebrating their success, Diabolus strikes in the form of a high powered sniper rifle fired by the BigBad that drills a hole in Kate's head. To add insult to injury, Kate had just taken a bullet for Gibbs and was spared serious injury thanks to her BulletproofVest.
-->'''Kate''': I was sure I was going to die before-- ''(BoomHeadshot)''
* ''[[Series/BlakesSeven Blake's 7]]'' is loaded with Diaboli ex Machina. For example, people who say they hate Servalan, and have no reason to like her, keep betraying the protagonists to her, even though she has never [[RewardedAsATraitorDeserves rewarded a traitor and kills them each time]]. In "Rumors of Death," she's been deposed in a revolution, and she's in a dungeon cell, awaiting execution. Avon picks this time to care about anything other than himself, for the first time in the series, avenging his old girlfriend's death. So he frees Servalan in return for information. He makes that a priority over everything else, including winning and safety (usually his highest priority).
** Servalan is some form of walking Diabolus Ex Machina generator - most grievous example is what was meant to be the finale, her trapped on a ship on the edge of the galaxy that was about to explode, orbiting a planet that was also ''soon going to explode''. Come next season, it is confusingly revealed that somehow the fact that the ship was being eaten apart by a ravenous space virus made the teleport TEN THOUSAND TIMES STRONGER than ever before, and even though she had no idea how to operate it by pure luck managed to land herself NOT in empty space for a start (because the teleport had no safety mechanism to prevent that), and then of all the thousands of possible planets not only a habitable one, not only a populated one, but one governed by her own people... COME ON!!!
* Just think: if it weren't for the miniseries, this is how ''Series/{{Farscape}}'' would've ended: [[spoiler:They're finally safe from the Scarrans and the Peacekeepers, the wormhole to Earth has been closed forever -- but it's okay! Because John is going to marry Aeryn! And then a completely unforeshadowed alien descends from the sky and blasts them into little pebbly bits]]. And vice versa, since the cliffhanger was why there was such a demand for a miniseries to begin with.
* In ''Series/TheWestWing'' episode "18th and Potomac", the death of Mrs. Landingham, President Bartlet's personal secretary, has Diabolus' fingerprints all over it; after a gentle little running subplot about Mrs. Landingham picking up her first new car, Diabolus arranges for a drunk driver to run a red light and kill her offscreen at the end of the episode with no foreshadowing whatsoever. This also contributes to a bit of DeusAngstMachina, as what with Bartlet's M.S scandal and various other crises and such, it wasn't as if Bartlet didn't already have ''enough'' reasons to be a bit angsty at the time. This example, however, can partially be forgiven in that it leads to Bartlet's excellent [[SmiteMeOhMightySmiter rant against God]] in the next episode, in which he even {{lampshade|Hanging}}s the trope (see the page quote), and his equally awesome RedemptionInTheRain sequence.
** Another example -- a lesser one because it's a newly introduced, comparatively minor character, but still a punch in the gut -- is in the next season finale, "Posse Comitatus," when C.J.'s stalker is apprehended and she ''just'' begins a relationship with the special agent who'd been assigned to protect her... and he leaves her sight for a minute to pick up a candy bar and a flower from a convenience store, finds himself in the middle of an armed robbery and is shot and killed.
** It kind of depends on whether you view Senator Vinick as a good guy or not (being that he's a Republican presidential campaign in a show about a Democratic presidential administration), but the nuclear power plant disaster that occurs completely out of nowhere in the middle of season seven and which utterly derails his presidential campaign [[spoiler: and ultimately costs him the election]] occurs largely as a halfway convincing way to level the playing field after a full half-season of Vinick being the clear frontrunner by a huge margin and Matt Santos, his opponent, lagging way behind in the polls.
* ''Series/GoodTimes'', James Evans, Mississippi. For a ''comedy'' titled "Good Times", Diabolus sure was busy YankTheDogsChain depriving the Evanses from having any. All because of the executives had to intervene. The show was originally created to combat stereotypes about African-American families. The Evans started as a solidly middle class, two parent household. Unfortunately, the suits felt this wasn't realistic, so James died, and the Evans ended up becoming a poor and struggling single-mother led family.
* ''Series/DoctorWho'' season finales tend to be based on unfortunate circumstances plunging the state of the world from bad to worse.
** There's a "[[DiscreditedTrope classic]]" Jon Pertwee/Tom Baker-era {{Padding}} technique, at a time of four-part serials being the standard, of 1) ending the second episode with the exciting {{Cliffhanger}} of the Doctor getting captured, 2) having the Doctor spend most of the third episode cleverly escaping, then 3) using a DiabolusExMachina to end the third episode with the exciting {{Cliffhanger}} of the Doctor getting captured again by the enemies he escaped from.
** The ending to the 2010 episode "Cold Blood". They've stopped the bad guys, got the humans and the Silurians at least on the right track to start living together in a thousand years, and are all set to escape when a crack in the space-time continuum appears, leading to not only the death of [[spoiler: Rory, but his erasure from existence. Luckily, he's revived in time for the season finale.]]
** The last of the 2009 specials, "The End of Time", involves a prophecy that the Doctor is soon to die. It concludes with the Doctor [[spoiler:vanquishing the Time Lords and sending Gallifrey back into the Time War, seemingly defying the prophecy. Then Wilfred Mott gets stuck in a box. Which is about to be flooded with radiation. And the door is locked. And it won't open unless somebody goes in the other side of the box. And there's no override. And the sonic screwdriver won't work]]. You can almost hear the writers straining to make this into a situation that requires the Doctor to sacrifice himself.
** The single surviving Angel that shows up at the end of "The Angels Take Manhattan" to suddenly time-warp Rory back to old New York. The Doctor tells Amy that if she goes back in time with him, he will never be able to see her again as the Angel activity has so screwed up the time stream that he can't fly the TARDIS there. She chooses to go with Rory. Why can't the Doctor write her a letter (he reads children's books by her in later episodes), or park his TARDIS in New Jersey and take a car? Why was the Angel suddenly there in the first place? Because Amy and Rory had to be written out somehow.
** [[spoiler:Subverted]] in "Last Christmas": the Doctor comes back to Clara at the end of the episode after the crisis has been resolved[[note]]Up until this point, they'd been communicating, but not actually in the same place[[/note]] to find that it's several decades later and she's an old woman. [[spoiler: Then Father Christmas turns up and reveals this is just another [[DreamWithinADream layer of the dream]], and the Doctor's able to wake up again and rescue Clara for real. According to WordOfGod, this was done because it was uncertain whether or not Jenna Coleman would return for the next season meaning the trope would have been played straight had she left.]]
** PlayedForLaughs when Missy tells Clara the story of how the Doctor escaped fifty invisible android assassins.
--->'''Clara:''' So the androids think he's dead, and the Doctor escapes?\\
'''Missy:''' No, he's the Doctor. He fell into a nest of vampire monkeys. But that's another story!
* ''Series/PrisonBreak'' did this in the episode "Selfless" - Scylla had been stolen, everyone was free to go, the release papers had been handed over, and then [[spoiler:it turns out that the cop was playing them all along and they're in an even worse situation than they had been before]].
* ''Series/{{Supernatural}}'':
** The Season One finale: John's been possessed and shot, Dean's been tortured, but everyone is alive and Sam is driving them to the hospital, and it looks like everything will be fine. Until a huge truck slams into the Impala, totaling the car, and the episode ends with all three men bloody and unconscious. As they supposedly recover in Season 2, Dean nearly dies and [[spoiler: John dies and gives up the Colt to save him,]] allowing the next 4 seasons worth of plot to happen, as [[spoiler: one of them needed to die and get put in Hell, and the loss of the Colt triggers Sam's, then Dean's, first deaths later on in the season]].
** "Mystery Spot" has this trope happen, as Dean's comical deaths, but it is invoked for the sake of a lesson, then reversed.
* By way of CrackDefeat, an example where the demon is revealed ''after'' the fact: Dorothy Jane of ''Series/TheTorkelsons'' has made it to the final of a contest of which the winner will get to be a foreign exchange student in UsefulNotes/{{Paris}}. After her final interview she comes out and announces that she lost, even though she got the highest score. Because the French family the exchange student would homestay with, wanted a boy. Which made the final interviews [[ShaggyDogStory meaningless]], because there was only one boy amongst the three finalists.
* The ''Franchise/LawAndOrder'' franchise uses this trope to turn a slam-dunk case into an hour-long question of "Will they get away with it". Several JustForFun/{{egregious}} examples:
** "Marathon" (''Series/LawAndOrder'' s10e6): Briscoe and Green catch a young Latino thug fresh from mugging and shooting a white housewife. Lenny hears the guy admit it. His word against the perp's. They find physical evidence linking him to the shooting. It gets tossed one piece at a time. When they finally corner him in the end, he {{Karma Houdini}}s his way out by dropping the dime on a notorious serial rapist, cutting himself a sweet deal in the process. ([=McCoy=] gets him to admit what he said to Lenny: "I gave that white bitch what she deserved")
** "Suicide Box" (s13e16): A young black male shoots a cop outside of a diner, out of anger that his brother's murder had been swept under the rug. They had him dead to rights... then the mitigating factors rolled in: His brother's death had been ruled a suicide (the M.E. who handled the autopsy did a rush job due to understaffing), the man who shot him never denied it (but the cops never looked at him). His and his mother's protests were brushed aside by the cops. And, oh yeah, his brother's body? Gone. The funeral home buried a casket full of trash (an ongoing fraud scheme, it turned out).
** "Screwed" ([[Series/LawAndOrderSpecialVictimsUnit SVU]] s8e22)''': The episode features the trial of Tutuola's stepson, Darius (crimes committed in the earlier episode, Venom (s7e18)). Except that ALL the evidence except his confession had been thrown out due to questions about Fin's credibility, also Darius (well played by rapper Ludacris) was only going to trial to hurt and embarrass his mother, Fin's ex (who denied him for most of his life). When Fin's ex got on the stand, Darius (acting as his own council) forced her into dropping her own pain-filled bombshell: Darius was a child of rape... by her father. Acquitted of the murders, in the end, Darius can't even take joy in [[PyrrhicVictory beating the rap]] and rubbing Fin and his mother's nose in it.
** "Hell" ([[Series/LawAndOrderSpecialVictimsUnit SVU]] s10e14): This episode has the SVU team tracking down a member of an African terrorist organization who tried to murder a young girl. With the help of Elijah, who turns out to have been forced to be a {{Child Soldier|s}} in the same organization, and harbors massive guilt over what he was forced to do, they track down the culprit and arrest him. Everything looks like it'll end well...until the SmugSnake immigration officer reveals that Elijah didn't escape the terrorist organization until ''after'' he turned 18, which means he can be legally held responsible for the crimes he was forced to commit. It [[DownerEnding doesn't]] [[WhatASenselessWasteOfHumanLife end]] [[TearJerker well]].
** "Damaged" (s8e22): Three unrepentant teenage boys are on trial for raping a mentally retarded classmate. After a hard fought trial, the jury returns guilty. Everyone's happy. [[YourPrincessIsInAnotherCastle Not so fast.]] The judge sets aside the verdict, issues a directed verdict of not guilty saying the prosecution didn't prove its case, and piles on saying the retarded girl knew what she was doing and had "the time of her life." Add in a subplot in which [[spoiler:Det. Briscoe finds out his daughter has been murdered for testifying against a drug lord]], and this episode winds up [[DownerEnding wrist]]-[[TearJerker slashingly]] hurtful.
** "Cold" (SVU s9e19): It looks like the DirtyCop is about to get convicted, but then, out of nowhere, two bombshells are dropped one after another. The key witness against him? Its revealed that she's an illegal immigrant, rendering her testimony moot. And the autopsy reports that were the key evidence? They couldn't prove the cop raped one of the victims, ''[[WhatTheHellHero Novak knew it, and lied about]]''.
** "Zoonotic" (CI): The creepy doctor who had been infecting ex-girlfriends with diseases if they refused to engage in sex games with him and his friend, a sleazeball veterinarian who murdered a cop who may have been on to them, are behind bars without a trial. Everything is going swimmingly. And then at the literal last minute, it's revealed that the doctor got 5 grams of anthrax from South America, and he only had 3 grams in his apartment. This leads into the next episode, "A Person of Interest." The episodes originally aired as a two-part season finale.
** "Smoked" (SVU s12e24) shows they can happen even when the cops technically win. The victim's rapist, her killer (two different people) and the corrupt ATF agent who supplied the murder weapon are all locked up, and Benson assures her daughter that they will almost certainly be convicted, allowing the daughter to see them for closure. The daughter quietly accepts this... and then, without a word, pulls a gun and [[TheresNoKillLikeOverkill empties the entire magazine into the three men]]. Stabler is forced to shoot her, and, aghast at having killed what was essentially an innocent, [[PutOnABus resigns from the NYPD]].
** "Gray" (SVU s12e9) has a curious example of a Diabolus Ex Machina that turns into a DeusExMachina. Sonya Paxton is prosecuting a JerkJock who raped a pregnant woman, then injected her with a chemical that caused her to miscarry, and is doubtful they can make the case stick because the accuser is too scared to testify. To make matters worse, the SmugSnake defense attorney gets the sympathetic judge thrown off the case on the grounds that she is biased toward the accuser. Eventually, they do get the accuser to agree to testify... only for her to drop dead the very day of her scheduled court appearance. The detectives are understandably upset, until ME Warner reveals she died due to the aftereffects of the drug the perp used, meaning they now have a shiny new ''manslaughter'' charge to stick him with.
* In the second season of ''Series/{{Highlander}}'', Duncan Macleod successfully rescued his mortal girlfriend Tessa from a kidnapper ... only for her to be shot dead by a random mugger less than three minutes after the escape.
* Although this is generally [[ButtMonkey what's always happening]] to [[Series/{{Blackadder}} Edmund Blackadder]], one of the few times this happened with ''everyone'' is the end of the second series when [[spoiler:Edmund appeared to have escaped capture and greatly impressed the Queen, but then, ''[[TheStinger after the credits]]'', the MasterOfDisguise turns out to have survived getting stabbed with a sword and a throwing knife, came back, killed everyone, and assumed the Queen's identity with a near-perfect disguise]].
** A slightly less extreme example comes in the very next episode. [[spoiler:Parliament it trying to bankrupt the Prince Regent (Blackadder's employer), but fortunately, all the prince needs is one more MP to support him, and they'll be safe. So Blackadder goes and gets the one undecided MP, but just as the violent, bigoted, mindless old fool is explaining exactly why he'll support them, he drops dead for no given reason (except {{Rule of funny}} of course).]]
* ''Series/TwentyFour'' season finales used to be made of this trope:
** Day One: The Drazens are all dead, Senator Palmer is safe, as is Jack Bauer's daughter [[DamselScrappy Kim]], and the real mole inside CTU has been caught...but then Jack goes into the CTU server room and finds that [[spoiler:Nina, the aforementioned mole, killed Jack's wife, Teri, before she fled and was caught]].
** Day Two: The nuclear disaster has long since been averted, the terrorists' mastermind, while not dead or captured, has been sufficiently scared out of the US, and everything appears to be safe once again... until now-President Palmer makes a public appearance and shakes hands with a random "civilian" [[spoiler:who turns out to be a terrorist; with the handshake, she'd infected the President with some sort of biological agent. The episode--and season--ends with Palmer collapsing to the ground, the ending clock replaced with a heartbeat sound effect]].
** Day Five: the conspiracy has been exposed, President Logan is arrested and everything seems fine and dandy, [[spoiler:until the Chinese pop up out of nowhere and haul Jack off, meaning he has to spend the next twenty months enduring torture at their hands]].
** Day Nine: Jack is attempting to locate and capture [[spoiler: Cheng Zhi]], who has had Audrey held hostage by one of his snipers to force Jack to stand down. CIA agent Kate Morgan successfully sneaks into the sniper's location and kills him, saving Audrey. [[spoiler: Then a second gunman bursts in from out of nowhere and shoots Audrey dead.]]
** For that matter, this always notably pops up in roughly around the end of the third quarter of every season save the first.
*** Season two has Jack's Middle Eastern agent ally on their way to deliver a chip that will prevent the U.S. Government from unwittingly starting World War III, only for him to be attacked by a bunch of racist rednecks that kill him and steal the chip.
*** Season three has [[spoiler: Michelle Desller]] getting abducted by the henchman of the BigBad right when it looks like he's finally about to be caught.
*** Season four has Jack about to launch an operation to, again, capture the BigBad, but President Logan orders him to stand down at the last second since it was carried out through illegal means, thus blowing the best chance anyone's had to put an end to the whole mess.
*** Season five: Jack finally gets the recording that proves President Logan conspired with terrorists, and then the BadBoss in charge of CTU pulls a FaceHeelTurn to work with Logan so he can get a better job and destroys the recording.
*** Season six has Jack finally kill the terrorist he's been chasing after all season... and then he's contacted by the Chinese who are holding his previously thought-dead girlfriend hostage.
*** Season seven has major antagonist Jonas Hodges caught and the bioweapon his company was developing is destroyed... except for one canister. And its stolen by [[spoiler: Tony Almeida]] who reveals himself as TheMole by [[spoiler: killing FBI Director Larry Moss]].
*** Season eight has a twofold one: Jack failing to [[spoiler: rescue Omar Hassan in time before his execution after learning that the entire televised thing was already prerecorded]], and then immediately after [[spoiler: Renee Walker]] getting killed so the true masterminds behind the conspiracy don't risk getting recognized.
* ''Series/DesignatedSurvivor'' pulls one in the Season 2 midseason finale, with [[spoiler:the First Lady]]'s car getting T-boned in the closing minutes; revealed in the next episode to be the work of some random guy who was texting while driving.
* ''Series/DawsonsCreek'': in the grand finale, [[spoiler:Jen suddenly has, and dies from, a heart condition]]. It was well done, though.
* This was used in one of the season finales for ''Series/{{Alias}}''. The Big Bad of the season is temporarily defeated, [[OneTruePairing Sydney and Vaughn]] finally get to drive off into the sunset together... only for Vaughn to tell Sydney "I'm not who you think I am," and a semi to come out of absolutely nowhere, slamming into their car and ending the season.
* The Season 5 Finale for ''Series/{{House}}'': [[spoiler:Just when you think House has removed that annoying hallucination of Cutthroat Bitch, kicked the Vicodin, and gotten it on with his long time flirt interest Cuddy, it all turns out to be the biggest screw-over in the history of anything. It was ALL a hallucination! He's NUTS! It NEVER HAPPENED! Cutthroat Bitch was standing there the entire time in his mind, and so was the deceased Kutner. The season ends with House being led into a mental hospital]].
* An episode of ''Series/{{CSI}}'' involves a drunk-driving car accident and the death of the only survivor while in the hospital. The killer turns out to be the mother of the (underage) daughter killed in the accident, and thought that the other (legal) girl deserved to die as well. So she suffocated the bed-ridden, just-out-of-an-accident, just-coming-out-of-the-coma girl with a plastic bag from the gift shop. Right before the credits?... find out that, because they switched [=IDs=] if they got pulled over for driving, got misidentified at the crash site, was so cut, bruised, and bloodied that no one made the connection, the mother suffocated ''her own daughter'', out of spite.
** Still another involves the death of the daughter of a powerful drug lord. It ultimately turns out it wasn't actually murder, and her death resulted from a proverbial "[[ButterflyOfDoom series of unfortunate events]]" involving several people, none of whom were trying to kill her at all. Unfortunately, this explanation does not satisfy the drug lord, and he has every last one of them (including his own sister, the girl's guardian) murdered in the closing montage, and there's not a thing the team can do about it.
** Another one has a man returning from a war seeing his wife and newborn and even holding said newborn only to be gunned down by some random intoxicated guy.
* One of the last few episodes of ''Series/{{Monk}}'', Monk spends the episode trying to get on the good side of the kid of the only cop against his reinstatement. Then he gets cornered by a bear, [[spoiler:saves the kid, solves the crime, and the guy changes his mind. Unfortunately, the two officers who supported him changed their minds after nothing more than going back over his case records]]. The writers [[YankTheDogsChain Yanking The]] [[ShaggyDogStory Shaggy Dog's]] [[YankTheDogsChain Chain]] resulted in a mildly delusional HeroicBSOD.
* The final episode of Series 3 of ''Series/{{Primeval}}'' where humanity has been saved from evil Helen by a hungry raptor. However the Pliocene anomaly closes, trapping Danny 3 million years in the past.
* Col. Henry Blake was already written out of ''Series/{{MASH}}''. He'd [[{{Retirony}} gotten his discharge and left for home]]. But that wasn't enough, so at the end of his farewell episode, Radar gets the message that his plane was shot down. "There were no survivors."
* ''Series/{{Bones}}'' has the Season 8 premiere "The Future in the Past". It seems everything is finally resolved - Bones gets cleared from suspicion of murdering the S7 finale's victim, Pelant gets arrested for a murder he committed in his teens, Flynn restates Booth as the senior agent in the major crimes department, and both Brennan and Clark stay at the Jeffersonian. Then, out of nowhere, [[spoiler:Pelant erases his identity and creates a new one, as a representative of the Egyptian government, getting DiplomaticImpunity, and undoing all the team's work against him]].
* Some people actually have been screwed over by unexpected twists in RealityTV [[RealityShow shows]], this may qualify.
** Shi-Ann in ''Series/{{Survivor}}: Thailand'' tried to network with the other tribes when time came for the merge, only for instead, they're told they're living on the same beach... so when Shi-Ann's tribe loses, she's low man on the totem pole, so bye-bye Shi-Ann.
** Savage in ''Survivor: Pearl Islands'', who was screwed beacuse Lillian was brought back into the game and flipped at the merge, causing him to be voted out.
** Michelle in ''Survivor: Fiji''. Ten players in the game, and they're divided into two teams of five. Unfortuantely, Michelle's stuck with indifferent players and people on an alliance; not wanting to vote out their own alliance member, they gang up on Michelle, who was playing perfectly well...
** In the 11th season of the American ''Series/BigBrother'', Jessie was screwed with a sudden twist. The Coup de Tat, which would be awarded to the fan favourite, was given to Jeff. Jeff wisely uses this and puts up Jessie and Natalie. Jessie is voted out, partly by the [[ManipulativeBastard perceptive Kevin]] who knew Jessie was in control of the game at that point and that it'd advance him further if he got Jessie out. Jessie was actually ''quite'' humble about it. He was actually ''complimenting'' Jeff on his brilliant use of the twist, and saying that, had Jeff made the final two, he would gladly cast a vote for him.
** In the 9th season of ''Series/BigBrother'', when James was voted out, a twist was played to bring either James ''or'' Alex (Evicted several weeks prior) back into the house. He was voted back in, and ''immediately'' went on a rampage to find out who ''did not'' vote him back into the house, and he targeted Matt, who was sent to the Jury House.
** Happens in ''Series/TheAmazingRace'' occasionally as well. In the fifth season finale, what the audience doesn't find out is that Colin and Christie ''would've'' caught up to the leading team, and possibly finished first, but their taxi got a flat tire. In several other seasons (seven and seventeen in particular), despite traveling around the world, it's a language barrier ''in a large American city'' (thanks to taxi drivers who come from non-English-speaking backgrounds) that ends up hurting teams the most.
*** Then, there's Eric and Lisa from season 15, ''who are eliminated at the starting line''. How? The teams were made to find one of eleven Japanese license plates and show them to the host. There were ''twelve'' racers.
* The [[Creator/{{Syfy}} Sci-Fi Channel]] adaptation of the short story "Literature/TheColdEquations" ends on this. The basic premise of the story is that a young girl has stowed away on a spaceship carrying urgently needed medical supplies to a distant colony - and, because of her added mass, there isn't enough fuel to land the ship without crashing (and killing everyone on board), so, according to regulations, the pilot is supposed to throw the girl out the airlock so the cargo can arrive safely. It's established fairly early on that the cargo weighs about the same as the girl, and that jettisoning either the cargo or the girl would save the ship. Near the end, the two of them discover that the cargo wasn't what they thought it was, and jettison it, so they're safe now. That's when Diabolus shows up. To the surprise of the pilot and audience, the ship ''still'' has too much mass, because they waited too long and are now closer to the planet. So SomeoneHasToDie anyway.
* The Series One finale of ''Series/{{Sherlock}}'' has [[spoiler:Moriarty walk out fairly close to the end. Sherlock removes John's explosive-laden outer layers, [[HoYay jokes are cracked]] and all seems to be right with the world. Then Moriarty comes back, and the series ends with Sherlock and John being aimed at by multiple snipers while Sherlock aims his own gun at the explosives, which are now at Moriarty's feet]].
* While not the end of the series (although it could have served as such if the writers strike had not been resolved), season 4.1 finale "Revelations" of the ''Series/BattlestarGalactica2003'' is a major WhamEpisode that also pulls this trope. Hard. (And things get worse before they get better.)
* The sixth-season ''Series/DegrassiTheNextGeneration'' episode "Rock This Town" involves many of the main characters attending a birthday party for their friend Liberty. It soon gets out of control when a group of kids from another school show up, but it turns out to be fairly harmless, and everyone has a number of embarrassing moments...until the very end, where Diabolus strikes its head by having one of the main cast (J.T.) stabbed out of the blue by a guest character who never appeared in any episode before or after the one in question.
* In ''Series/TheWalkingDead'', Rick and Glenn spread walker blood all over some raincoats and wear them to blend in with them. Just when you think they're safe, an absolutely random rainstorm shows up, stays just long enough to dull the smell from the blood by washing it away, and it stops raining after the zombies have noticed they're not undead.
* Several episodes of ''I Shouldn't Be Alive'' can come off as this. The people who the stories are about almost seem to have been cursed by some malevolent deity based on their awful luck. One episode had a man who had been stranded in a raft for weeks and had to drift from Africa to the Caribbean. He had just reached Caribbean waters, took good supplies, figured everything out and seemed set to make it all the way to one of the islands safely, when he went to spear a fish with his harpoon, his harpoon snapped in half, the fish did a barrel roll, punctured his raft, and swam away, leaving him to just barely patch his raft up.
* ''Series/XenaWarriorPrincess'': The overall finale has Xena execute an ambitiously dangerous plan involving her being killed, so she could go off and fight the spirit BigBad in the spirit world. She sets Gabrielle the task of bringing her back afterwards using her ashes, and magic spring water. It's not until Xena's actually won, and Gabs (and by extension the audience) is all ready for that happy ending, that Xena drops the bombshell, that [[spoiler:this time she has to stay dead, or her HeroicSacrifice won't mean anything]]. The twist is not hinted at before it happens, is a disproportionate response, and is largely unnecessary since she mostly seems to have a massive GuiltComplex about the original precipitating incident, which was an accident. Since Xena claims she knew beforehand, she comes across as something of a {{Jerkass}} for not pre-warning Gabs about it.
** Remedied in the "director's cut" version of the episode, which provides foreshadowing (though still a little too close to the end) and shows us that Xena didn't really know beforehand that she [[spoiler: would have to stay dead]].
* In the second season of ''Series/RobinHood'' every single thing [[MurphysLaw that can go wrong, ''does'' go wrong]] in order to [[spoiler:kill off Marian]]. Marian acts wildly OutOfCharacter. Robin and the other outlaws are inexplicably missing at a crucial moment. No one bothers to give Marian a weapon to defend herself with. Every single one of Guy's [[BerserkButton Berserk Buttons]] are pressed. The IdiotBall is thrown about with such abandon that it leaves [[PlotHole Plot Holes]] in the scenery. The contrived sequence of events unfold with the sole purpose of forcing Guy and Marian into the "right" frame of mind that leads to [[spoiler:her murder]]. (And it ''still'' doesn't make any sense).
* This is the driving force behind the plot, and the source of much of the humor, in ''Series/CurbYourEnthusiasm''.
* ''Series/StarTrekDeepSpaceNine'': In the episode "Duet," Aamin Maritza [[BatmanGambit pretends to be Gul Darhe'el so that a war crimes trial can be put on and Cardassia can admit to the atrocities it committed]]. Kira decides to be the one to try to end the cycle of violence between Bajorans and Cardassians by letting him go and telling everyone that he's actually Maritza, so an innocent man won't be executed for crimes he did not commit. Everything seems to be wrapping up, as Maritza realizes that he can work with the Bajorans to try to atone for the past in a different way. However, [[ChekhovsGun a Bajoran drunk who we hadn't seen since the beginning of the episode]] comes up behind him and stabs him in the back, killing him, not because he was Darhe'el, but simply because he was a Cardassian.
* ''Series/TheChasersWarOnEverything'' did a parody promo for ''Australian Story'' about a woman whose bad luck never seems to run out. e.g. she's diagnosed with cancer shortly after the death of her third husband. The parody latched onto the fact that although ''Australian Story'' is a documentary series about real people, some of the episodes are so depressing that the events they depict seem contrived.
* ''Series/DowntonAbbey'' is crawling with this trope in the third series, largely because so much successful CharacterDevelopment has happened that there's not as much interpersonal drama in the house to play off, and there's no overarching BigBad in the show, so the plot is rife with freak accidents and devastating twists with no forewarning. The [[WhamEpisode third Christmas special]] really takes the cake, though, when [[spoiler: Matthew is violently killed in a car crash right after Mary gives birth to his firstborn]]. All because the actor didn't want to come back for another season.
* In the last episode of series three of ''Series/{{Whitechapel}}'', a killer makes two attempts on the life of therapist Morgan Lamb. She manages to outwit and then outrun him, and takes sanctuary at the police station where she strikes up a rapport with Chandler. Finally, the killer dies after throwing himself off a building, dying in his mother's arms with the words: "I'm sorry...sorry I didn't kill Morgan." All's well that ends well -- except that the police take the killer's mother to the police station, she spots Morgan in her safe room, distracts the police and promptly stabs Morgan to death with a shard of glass from a coffee table.
* In the second to last episode of ''Series/HikoninSentaiAkibaranger'' the team is able to win back ''Akibaranger'''s timeslot from Ultra Ace, an ''Series/Ultraman'' {{expy}}, only for them to find out that not only are they dealing with the alien invasion that came with Ultra Ace, but that Saburo Hatte, the writer of the series, [[spoiler:accidentally triggered the "Iron Clad Suicide Run" flag, meaning the Akibarangers will stop the invasion, but will ''die in the process'']]! Then, we find out in the final episode [[spoiler:that, yes, they did die as they are taken up to Sentai Heaven by [[Series/ChoudenshiBioMan the first Yellow 4]], [[Series/MiraiSentaiTimeranger Time Fire]] and [[Series/BakuryuuSentaiAbaranger Abare Killer]]]].
* ''Series/{{Skins}}: Fire'' just couldn't leave [[spoiler:Naomi and Emily's happy ending]] alone.
* ''Series/MightyMorphinPowerRangers'' ends with the team retrieving the Zeo Crystal fragments, using it to reverse the damage done by Master Vile. Then Goldar and Rito show up, steal the Zeo Crystal and allow their bomb to go off, forcing the Rangers to watch helplessly as the ''Command Center explodes''. [[Series/PowerRangersZeo Until next season.]]
** ''Series/PowerRangersTurbo'' really hits this hard as Divatox leads an invasion on the Power Chamber after the Rangers' last fight deprives them of their weapons. The base is destroyed, the powers lost, they find out Zordon's kidnapped and, when they decide to chase after them, powers or not, Justin decides to stay behind. No powers, four Rangers and against a possible army of foes...
* Downplayed example in, of all places, ''Series/BreakingBad''. [[spoiler:The sequence of events is pretty unlikely and mainly serves to promote the moral of "actions have consequences" above all else (seriously-woman dies from drug overdose, woman's father is sent so far into a HeroicBSOD that he screws up his job, said job is airplane controller, [[StuffBlowingUp the results of said screw up]] happen directly over dealer of said drugs' house so he can see it), but ultimately, it does nothing that Walter wasn't doing already to himself.]]
* The second season of ''Series/{{Californication}}'' introduces a Gatsby-esque character by the name of Lew Ashby who spends his current life pining for the one that got away. He even throws parties in the hope that she'll show up. In the season finale, Hank finally gets her to come to a party and talks a nervous Lew into greeting her only for Ashby to [[spoiler:decide to blow some heroine, thinking it was cocaine, and subsequently die from an overdose]].
* ''Series/TheFollowing'' has become notorious for abusing this, often in tandem with the heroes' fondness of the IdiotBall, which is probably why it's slowly dying of DarknessInducedAudienceApathy. One such instance featured Joe Carroll seemingly burning to death in a boathouse, [[spoiler: only for later flashbacks to reveal that he'd rigged it to be able to escape ''exactly that scenario'', then had one of his few remaining followers pick him up a couple miles down the road, in a location that would've been in sight of the FBI but for their sheer idiocy, and went into hiding for a year]]. Oh, and the body they found in the wreckage? [[spoiler: Another of Carroll's followers was revealed to have switched out a bunch of database records prior to being gunned down for treachery, with the body that matched the fake records also being planted in the boathouse.]]
* ''Recap/TheFiveishDoctorsReboot'' shows the old Doctors, through much hardship and running down corridors, getting into the special in the form of three Dalek suits... but in the ending, Moffat's editor points out that the special is the same without the Dalek scene and overrunning by ten minutes, and so Moffat leans over and deletes the superfluous scene with the three Daleks. [[spoiler: It is inverted immediately, however, when the editor (but not Moffat) discovers the Doctors also played three sheet-covered Zygons in a scene that is kept in.]]
* ''Series/OneTreeHill'': In the final season, Brooke was the only one of the main group of characters (Haley and Nathan, Clay and Quinn, Brooke and Julian) who wasn't really having any issues, after [[TraumaCongaLine about seven seasons]] of the show beating the hell out of her. Apparently she wasn't allowed one season where none of the problems were hers, however, as just when things were starting to go well for her, her ArchEnemy Xavier Daniels (who [[WouldHitAGirl literally did beat the hell out of her]]) is released from prison and starts following her around, leaving her completely terrified that he would attack her again and unable to do anything about it because no one who could do anything would believe her. [[spoiler: ([[CassandraTruth He did]].)]]
* ''Series/{{Scrubs}}'': Jordan (as Diabolus) reveals all the secrets and issues among the main-cast to each other at the Season 1 finale, even though she has quite few to do with the specific persons (Ex Machina). There's also plenty of episodes where this happens, where a patient who is beloved dies, but there's a few examples that come to mind first. [[spoiler: One example is where one of the patients dies, and they use her organs for transplants they needed. The last few minutes of the episode result in every transplant patient dying (the first patient's condition, not recognized until after the transplants were done, was ''rabies''), and Dr. Cox leaving the hospital. Another example is either episode with Jordan's brother, Ben Sullivan. In both episodes, most of the episode is a fake-out, but both end with the worst news, the first with Ben having cancer, and the second where they're going to Ben's funeral. The last two episodes, and possibly best examples, are the episode where Mrs. Wilk is about to leave the hospital, but an intern named Cabbage gives her a disease that kills her, and the episode where, after Dr. Cox is arguing with Laverne about God and his plan for everyone, Laverne has a car accident, goes into a coma, and dies.]] Since ''Scrubs'' is a medical show, Downer endings happen a lot, and they really can't do much in those kind of situations.
* ''Series/{{Community}}'': Shirley's out-of-nowhere announcement that "[[spoiler:Pierce]] is dead!" in "Basic Intergluteal Numismatics". We don't even find out how he died until a few episodes later.

* Music/DepecheMode's song "Blasphemous Rumors" is about a girl who tried to commit suicide at age sixteen. She fails, and learns to love life again. Then she dies in an accident.
* Countless country songs take advantage of this, often to a {{narm}}y extent. In fact, it's a common joke in the American south that if you play country music backwards, the singer's wife will return to him, bearing his dog and his truck intact.

[[folder:Pro Wrestling]]
* Wrestling/MichaelCole winning at Wrestling/WrestleMania XXVII. He was a non wrestling non athlete going against one of the all time greats with another all time great backing that one up, but "won" because the anonymous general manager decided to reverse the decision on the grounds Wrestling/JerryLawler had help, even though that "help" was just evening the playing field since Cole tried to get Wrestling/JackSwagger to help him.
* Bad Influence, their entire existence. Wrestling/{{TNA}} had Wrestling/ChristopherDaniels and Wrestling/FrankieKazarian in a {{blackmail}} storyline which looked so ready to become a blood feud, only to suddenly be turned around on Wrestling/AJStyles so the two could ruin his life. TropesAreNotBad, as Bad Influence were very popular as a {{heel}} act, and everyone wanted to see AJ beat them up more than they wanted to see AJ spend time with Dixie Carter.
* Wrestling/{{M|ontelVontaviousPorter}}VP's Beat Down Clan was a logical place to go, seeing as he had been a megalomaniac ever since his FaceHeelTurn in TNA. Kenny King had been with him from the start, even Wrestling/BobbyLashley not being in on it was okay because he was at least ''implied'' to be more honorable than the other two. What knocked them into this trope was the entry of Wrestling/SamoaJoe and Wrestling/LowKi into the group. Joe in particular had been feuding with MVP almost since the start of his turn and him maybe putting aside his differences with Lashley might have made sense but King had cheated during Joe and Bobby's last match so him taking King and MVP's side was even more baffling. Sure, they've been known to be part of a close-knit group of like-minded friends behind the scenes, and this was alluded to in the ensuing promos, but at least a small mention of the two having "worked out their issues" would've been nice.
* Las Sicarias being infiltrated, beaten down and cheated out of a match by their sworn enemies C4 was [[HangingSeparately largely]] the [[PoorCommunicationKills fault]] of their new recruits Wrestling/MercedesMartinez and Wrestling/TheaTrinidad. Losing all their contenders to all SHINE title belts in the process though was the fault of the referee seeing Martinez choking out Allysin Kay during a three way title match, [=LuFisto=] arriving too late to stop her and giving [=LuFisto=] the winning pin fall anyway on a ''one count''. It also wasn't the fault of Martinez that after SHINE officials all but admitted they had messed up they put Martinez in another match with Kay, who she basically already beat, rather than [=LuFisto=] who got credit for it. But the heels had apparently gone long enough without the clear advantage.[[/folder]]

[[folder:Tabletop Games]]
* To some ''TabletopGame/BattleTech'' fans, Diabolus is behind the Jihad storyline. Let's see, the Clan invasion is finally called off, the Star League tentatively reestablished, and while there are still loose ends left over (like the threat of the Wolf Khan to come invading anyway once the original truce is up, or the aftermath of a nasty civil war) things finally seem to be ready to calm down a bit...but hey, we can't have that, right? This game isn't called ''[[StatusQuoIsGod PeaceTech]]''! So the Star League declares itself a sham and disbands again for no good reason just in time to cause the suddenly uber-powerful pseudo-religious lunatics known as the Word of Blake to go AxCrazy and start pulling cyborg super soldiers, nuclear weapons, and other stuff out of their nether regions in an all-out war against everybody...
* The [[{{Metaplot}} ending]] to the ''TabletopGame/{{Deadlands}}: Hell on Earth'' setting involved the [[PlayerParty PCs]] getting a chance to kill the {{Big Bad}}s of the game. After going through a bunch of [[{{Railroading}} Railroaded]] scenes, they're presented with the opportunity to win and a ship to do so ([[spoiler:but they have to [[PoweredByAForsakenChild sacrifice one of their own]] to the demonically-powered engine to do so]]). Then you get to a distant planet... and the ship crashes and the {{Big Bad}}s are re-released. At least the GameMaster ''should'' have been implying that this was the best possible result from the start; the [[SealedEvilInACan can]] that had the {{Big Bad}}s in it was always shaky at best. [[AllUpToYou Guess who gets to hunt them down]] and [[KilledOffForReal finish the job]] now?
* The entire universe of TabletopGame/{{Warhammer 40000}} was probably made by Diabolus.

* In the Richard Strauss opera ''Elektra'', the title character, in the midst of rejoicing over the deaths of her mother and her consort, suddenly drops dead at the end for no reason except to bring down the curtain on a crushing downer note.
* Creator/WilliamShakespeare is a notorious offender. For example, in ''Theatre/KingLear'' Cordelia's death comes out of the blue, transforming the play into a tragedy in its final act.
** ''King Lear'', like many of Shakespeare's other plays, was based on earlier stories that his audience would have been familiar with. Lear and Cordelia don't die in those stories. Shakespeare killed them off because he wanted to surprise the audience. This ending was subject to a lot of FanonDisContinuity in later centuries, and many performances ended with Cordelia marrying Edgar instead ... even though she already got married earlier in the play.
** ''Theatre/RomeoAndJuliet'' is one Diabolus Ex Machina after another. This is even {{lampshade|Hanging}}d; the line in the opening speech about them being "star-crossed lovers" is a reference to the practice of trying to predict the future using astrology, implying that Fate really is out to get them.
** The famous ExitPursuedByABear bear that appears in ''Theatre/TheWintersTale'' appears completely at random.
* In ''Theatre/{{Finale}}'', the reveal that [[spoiler:the world is ending in a week]] comes at the end of Act 2, and ''severely'' screws up everyone's plans.

[[folder:Video Games]]
* ''VideoGame/KingdomHearts3DDreamDropDistance'' is especially infamous for this. [[spoiler:Everything since the original ''VideoGame/KingdomHeartsI'' endures a big HappyEndingOverride as part of the GreaterScopeVillain's [[{{Asspull}} out-of-nowhere]] StableTimeLoop just to set up GrandFinale ''VideoGame/KingdomHeartsIII'']] -- which, combined with the overall ArcFatigue, just caused quite a few fans to call FranchiseKiller.
* A lot of the moral choices in the second VideoGame/ArmyOfTwo game end this way. You either choose the "bad" option, or you choose the "good" option...except that the guy you gave up some advantage to save turns out to be corrupt AND selling weapons to terrorists. Or a guy you choose to save instead of killing in exchange for money is later killed in a plane crash accident.
** ''Videogame/TheForceUnleashed'' 2 also uses this in regards to the outcomes of its moral choices. [[spoiler:At the end, Starkiller has beaten Darth Vader after he seemingly killed Juno, and the player is given the choice whether or not to kill him. And because all the play testers probably shouted "Why the hell would I not kill Vader now that I have the chance? I'm not {{Stupid Good}} like the Jedi", if you do try to kill him, a never before mentioned perfect Starkiller clone comes out of nowhere, kills you and all your friends (except Juno, she's already dead), and infiltrates the Rebellion in your place, leading to {{The Bad Guy Wins}}. Bear in mind, if you do decide to spare Vader, Juno turns out to be alive, and the clone seemingly doesn't exist. The latter point is {{handwaved}} by unlockables that state the clone was only ordered to intervene if Vader was in direct danger, but it is still a massive copout that saved the writers from having to give darkside choices realistic consequences, which the first game's bad ending was praised for.]]
* The updated ending to ''VideoGame/{{Portal}}'' - The first independently mobile entity apart from Chell turns up just to drag her back right after you thought she was free.
* In any game where a chopper is called in to rescue your party halfway through the game, it will probably get shot down or otherwise destroyed, as in ''VideoGame/ResidentEvil3Nemesis'', ''VideoGame/DinoCrisis'', ''VideoGame/ResidentEvil4'', or ''VideoGame/ModernWarfare''.
** ''VideoGame/Left4Dead'' had the infamous Chopper pilot dying at the end of the first campaign. It was nixed when many people found the ending too depressing and cheated out of their feeling of accomplishment. Ironically it was the fan backlash that caused Valve to create a filler campaign between No Mercy and Death Toll, reinstating what was taken out. They use this again in the sequel, to link all of the campaigns together. This meant that some sort of Diabolus Ex Machina would show up in the ''beginning'' of each campaign, serving as the Machina of the last campaign (this included a chopper pilot dying as well). And all those escapes turn sour because [[spoiler:the Immune carry and spread the disease]].
** In ''VideoGame/SeriousSam 3'', after seeing at least two choppers get shot down, (one of which he was ON at the time), Sam decides he's not going to get on any more choppers.
** ''VideoGame/TheConduit'' actually jokes about it, where Ford's way off an oil rig is supposedly a Leviathan. The Leviathan destroys a helicopter flying over the base:
-->'''Ford:''' ...And you're SURE there's no other way out of here?\\
'''Prometheus:''' Well, there ''was'' a helicopter...
* The path towards the fourth ending in ''VideoGame/{{Drakengard}}'' is shaping up to be a BittersweetEnding, which, given the only other "good" ending is also bittersweet, doesn't seem too bad. After all, after finding out that the CreepyChild BigBad is irredeemably evil even after the protests of her twin brother, the heroes have finally succeeded in killing her once and for all. Now the world is saved. Except, wait, [[EldritchAbomination something's falling out of the sky...]] Justified in that said CreepyChild was essentially the avatar or representative of said things falling out of the sky. We probably should mention that said things are ''pissed off as hell'' after she dies and with no seal holding them back, it's TheEndOfTheWorldAsWeKnowIt.[[note]]A {{Retcon}} from the second game. The first game more implies that killing her while she was the avatar of ''other'' evil entities kept them from holding said things falling from the sky back. Since this ending isn't canon to the sequel and both fit the general theme of the game's setting, take your pick.[[/note]] The real kicker is the fifth ending. The heroes cross over into another dimension to kill the mother of all the aforementioned elderitch abominations. She and the heroes are transported to modern day Tokyo and, after a climatic boss battle, get shot down by missiles from an aircraft. And as ''VideoGame/{{Nier}}'' reveals, this leads to the extinction of the human race.
* ''VideoGame/{{Apocalypse}}'': Bruce Willis/Trey Kincaid has defeated the four horsemen, (i.e. the [[TheDragon Dragons]]), and is about to take down the BigBad Reverend. Unfortunately, he gets a DemonicPossession ex machina. DownerEnding. Or maybe intended to be a CliffHanger leading to a VaporWare sequel?
* ''Franchise/MortalKombat'':
** Raiden's ending in the original ''VideoGame/MortalKombat1''. Evil vanquished: check. BBEG dead: check. Hey fellas; let's break the world ourselves!
** And Reptile's ending in ''VideoGame/MortalKombat4''. Go through the entire game, win the tournament, and then your BadBoss pops your head like a grape for asking for a reward. WTF? This always happens to him. The one time that he has a happy ending is in [[spoiler: ''[[VideoGame/MortalKombatArmageddon Armageddon]]'']].
** ''VideoGame/MortalKombat9'' takes it even further. After [[spoiler:destroying Quan Chi's Soulnado, thus saving the souls of Earthrealm,]] Nightwolf regroups with [[BigGood Raiden's]] [[TheChosenMany chosen]] right as Raiden and Liu Kang go to have a chat with the Elder Gods. At that moment, [[spoiler:the {{Cyb|org}}er [[McNinja Lin Kuei]] attack]]. Then, [[spoiler:a BrainwashedAndCrazy Sindel shows up]]. This is where it all goes to hell. Remember that scene three chapters back in Stryker's chapter when [[spoiler:Raiden torpedoed Motaro through a bridge to prevent him from killing Johnny Cage? Motaro's death caused [[BigBad Shao Kahn]] [[GodzillaThreshold to take off his kiddie gloves and get serious]]. He uses Shang Tsung's [[YourSoulIsMine soul(s)]] to empower Sindel, giving her a ''massive'' boost in strength. Sindel, in the span of less than a minute, [[NoHoldsBarredBeatdown goes to town on the heroes]]. Out of Nightwolf, Kitana, Jade, Cyber Sub-Zero, Smoke, Jax, Sonya, Cage, Kabal, and Stryker (Kung Lao had been killed by Kahn a few chapters prior), only Nightwolf, Kitana, Sonya, and Cage immediately survive; [[DiedInYourArmsTonight Kitana dies in Liu Kang's arms from her injuries]] and Nightwolf has to [[HeroicSacrifice sacrifice himself]] to take down Sindel, right as Raiden and Liu Kang return from their meeting empty-handed]]. Afterward, the game switches over to Raiden for the final chapter, having him deal with the tragic repercussions of this event, [[spoiler:including him accidentally killing the now-disillusioned Liu Kang, with Liu cursing at him in his dying breaths as he's lost his faith in the Thunder God, his former friend and mentor]]. And TheStinger reveals that [[spoiler:Shinnok, Fallen Elder God and BigBad of ''4'', is posed to strike a now vulnerable Earthrealm/Outworld, the implications being that he got a tip-off from his ''Armageddon'' self just like Raiden did and has been manipulating ''everything'' from behind the scenes, Quan Chi being his enforcer and eyes and ears in Shao Kahn's army]]. [[RunningGag And for good measure]], the rescue helicopter was also used to keep Sonya and Jax in the plot. Then Jax gets his arms ''ripped off'' instead of just upgraded, [[spoiler:Sub-Zero]] gets [[UnwillingRoboticisation roboticized]] because it had to happen to ''someone'', and Scorpion is tricked out of his redemption.
* ''VideoGame/HalfLife2 Episode 2'': After Gordon has whipped the Striders, [[spoiler:a Combine Advisor shows up, immobilizes Gordon, Alyx and Alyx's father Eli, rapes Eli's brain to death by jamming a nozzle up his spine to suck the brains out, but is then stopped by Dog before he can do the same thing to Alyx or Gordon]], leaving the game, instead of a happy ending, on a KickTheDog moment.
** Heck, look at ''VideoGame/HalfLife1'', [[spoiler:if you decide not to side with the ostensibly evil G-Man, you're immediately dumped into the middle of a bunch of angry monsters with no hope of victory]].
* ''[[VideoGame/FirstEncounterAssaultRecon F.E.A.R.]]'' ends with the protagonist being extracted aboard a helicopter with a couple of NPC teammates. The helicopter suddenly lurches and Alma is seen climbing aboard an instant before the game cuts to the credits. Which are worth sitting through for yet another whammy.
** The ExpansionPack ''Extraction Point'', takes this trope one step further [[spoiler:by killing off those NPC teammates and foreshadowing a devastating war]]. Ironically, [[spoiler:[[http://www.projectorigincommunity.com/forum/showpost.php?p=5928&postcount=7 Word Of God]] [[CanonDiscontinuity is not considering this as canon]]]].
* Halfway through ''VideoGame/ModernWarfare'', after you've completed the primary objective in Shock and Awe, there's a Diabolic NukeExMachina, when you get a call that the bad guys have set up a nuke in Asaad's palace, then one of your fellow chopper pilots gets shot down. You land to rescue her, and do so, but it's already too late, and the nuke knocks the escaping helicopters out of the sky and kills all of the American main characters. You have a minute of ControllableHelplessness before the protagonist, too, expires from radiation poisoning. As a result, [[ShootTheShaggyDog the shaggy dog has not just been shot, but totally annihilated]].
** And during the final mission, after stopping the nuke launch, an invincible Hind gunship appears and lays waste to your squad. Then the BigBad starts executing the survivors, but before he can get to you, in a semi-DeusExMachina, the Russian Loyalists arrive and destroy the Hind, distracting the BigBad and allowing your CO to pass you a pistol. It's not clear if either of you survive, though. The sequel reveals that both of you did, but the BigBad was then portrayed as a martyr gunned down by evil British, American, and Russian Loyalist forces and things just get worse.
** None of these compare to the one at the end of "[[WhamEpisode Loose Ends]]" in ''Modern Warfare 2''. After fighting of hordes of Ultranationalists, you and Ghost rush to rendezvous point. You get clipped by a mortar, but Ghost drags you the rest of way and TheCavalry kills the enemy forces. Then your commanding officer takes the info you collected, shoots both of you, and throws your bodies in a ditch. The last thing you see is him tossing a [[TearJerker lit cigar at your kerosene soaked bodies.]]
** The fake-surrendering Japanese soldiers who kill Roebuck/Polonsky at the end of "Breaking Point" in ''World At War'' could qualify, too, seeing as the mission had been a success up to that point, and Roebuck even said in the opening narration that they would all go home at the end. Even worse, [[SadisticChoice you have to choose which one to save.]] In about a split instant.
* Not quite the ending, but the climax of World 1 in ''VideoGame/FinalFantasyV'' is rather like this. Against all odds, you finally managed to get to the last elemental crystal in time, unlike all the other ones that ended up breaking. The bad guy's possessed puppet gets beaten back, there's a lovely reunion with one of the characters and his granddaughter, where he gets his memory of her back, and a reunion of two of the characters and their long-lost father... and then Bartz realizes that throughout the long reunion, they'd forgotten to turn off the Crystal-draining machinery and the crystal shatters. Of course if the BigBad ''stayed'' [[SealedEvilInACan imprisoned by its power]] there'd be no other 2/3s of the game.
* Ultros of ''VideoGame/FinalFantasyVI'' is a Diabolus Ex Machina personified. Four times in the World of Balance, he comes out of nowhere to cause trouble for the heroes, including trying to drop a weight on Celes's head at the opera.
** Kefka's rending of the world is another huge example, a huge example of a famous very well received Diabolus Ex Machina.
* Disc 2 of ''VideoGame/FinalFantasyVII'' is a Diabolus Ex Machina strewn throughout an entire disc. Aside from [[spoiler:[[ItWasHisSled Aeris dying at the end of disc 1]]]], the party chases Sephiroth to the Northern Crater, where they prepare to battle him once and for all, [[spoiler:until Sephiroth decides to [[MindRape break poor Cloud's mind]] and force him to learn that he's a [[TomatoInTheMirror failed experiment]]. This ends in Cloud handing over the Black Materia, and all hell breaking loose.]] So now, not only is Meteor looming, about to kill the world in one week, but the Planet has released its failsafe, a group of massive biomechanical creatures called the [=WEAPONs=] that are capable of wreaking serious destruction. So these monsters are on the rampage, the apocalypse is coming in a week, and the crew is slated for public execution. And the next time we see Cloud? [[spoiler:Alive, but totally catatonic.]] Wow...
*** It was revealed 20 years after the game came out that there was originally a ''really'' extreme one. Nojima had the idea that the entire party should be killed off except for the two characters the player brought with them, and planned to use the part where the party parachute into Midgar to kill off everyone. Mercifully, Creator/TetsuyaNomura talked them out of it, saying it was important to keep Aeris's death special by not just killing off characters at random.
* ''VideoGame/TimeShift''. You've killed the BigBad, retrieved the only remaining temporal jump drive in your particular dimension, taken down a planet-wide fascist government, and even saved the girl. [[spoiler:Then you cause a paradox.]]
* Parodied in ''VideoGame/IWannaBeTheGuy''. At the end of it, you defeat The Guy, take his gun, and return home triumphantly as the credits roll. You also walk under a tree with one of the game's [[EverythingTryingToKillYou deadly]] [[strike: [[EverythingTryingToKillYou apples]] ]] [[RunningGag giant cherries]] on it, which falls. If you're not expecting it and don't move, it lands on you, killing you and giving you the standard Game Over screen even though it's ''after the credits''. Fortunately the game still counts you as having beaten it.
* ''VideoGame/NeverwinterNights2'' has one of the most appalling Diabolus Ex Machina endings ever. Quite literally, RocksFallEveryoneDies.
** Remedied in the ExpansionPack that follows with you waking up afterward, albeit on the opposite side of Faerun, and you spend much of the game trying to figure out how the hell you got there. [[spoiler:Also you wake up with an entirely new Diabolus in the form of the Spirit Eater curse]].
** The rocks falling is {{lampshade|Hanging}}d later in ''Mask of the Betrayer'' by Ammon Jerro, in a rather hypocritical bit of humor.
--->'''Player Character''': I remember being disappointed that the fortress's structure wasn't more architecturally sound.
--->'''Ammon Jerro''': Yes. That powerful and evil beings insist on causing destruction even as they die is an unfortunate habit.
* ''VideoGame/{{Fallout 3}}'':
** The finale of the main quest is especially guilty of this, capping a brilliant game with a totally illogical ending that forces the player to [[spoiler:sacrifice his/her own life by entering a radiation-flooded room to save the world... even though your radiation-proof mutant friend is standing right beside you. That character will actually say something like, "This is your journey and I can't take it for you" or something similar. Jesus, Fawkes, just walk in and press the button so I don't have to die]]!\\
Due to gamer outcry at this being one of the dumbest endings in gaming history, one of the expansion packs, specifically ''Broken Steel'', changes this ending, allowing you [[spoiler:to send in say, a highly resistant super mutant, a ghoul who is actually healed by radiation, or a goddamn ROBOT! And if you go in yourself you don't die. You can still send in the girl though, if you want to be a dick. The game will still chastise you for being a coward, despite the fact that you found a way to accomplish your goal and get everyone out alive]].
** The [[spoiler:diplomacy]] path of the "Tenpenny Tower" quest. Sure, Roy Philips is clearly no angel from the moment you meet him, but there's no advance hint that he's bad enough to [[spoiler:repay your getting him into the Tower by murdering every single human in the Tower for little to no reason]].
* ''VideoGame/FatalFrame'':
** ''VideoGame/FatalFrame1'': Miku has managed to collect all pieces of the Holy Mirror and managed to save her brother, as well as Kirie from her continued [[TheCorruption possession of the Malice]]. Kirie fulfills her duty as the Rope Shrine Maiden, keeping the Hellgate closed. [[spoiler:Out of nowhere, Mafuyu decides to not leave with Miku, but remain behind with Kirie, so that she'll never have to suffer alone anymore.]] Cue the uplifting, though bittersweet ending to turn into an abrupt TearJerker ending.
** ''VideoGame/{{Fatal Frame II|Crimson Butterfly}}'': Mio finally finds her sister and is ready to leave the village. [[spoiler:Suddenly, Mio gets possessed and strangles Mayu, completing the ritual they were trying to prevent from having to go through the entire time, and leaving Mio with huge guilt when she realizes [[MyGodWhatHaveIDone what she has done]].]]
* The ''Franchise/BaldursGate'' series has a variety of endings, depending on your action in-game. One of them involves the Protagonist giving up their divine soul and turning their back on Godhood in order to be with their newly-found True Love - who, in her aftermath/autobiography is brutally murdered by her vengeful kin, leaving the Protagonist to raise their child alone, embittered, and hell-bent on committing genocide as return. This even applies if the Protagonist was, for the previous 100 hours of gameplay, a Lawful Good Priest of Peace and Healing... This is especially silly given that even if that attack somehow worked (and by the end of the expansion everyone in the party is so powerful that there's virtually zero chance of that), the player character either had the power to raise the dead themselves as a virtual afterthought ''or'' they were such a legendary hero that they were owed favors by multiple individuals (including a few gods) who could easily do it for them.
* The ending to Creator/{{Infocom}}'s text adventure ''VideoGame/{{Infidel}}'' has always been somewhat controversial with fans because it's a good example of this trope being used to ShootTheShaggyDog. The protagonist (despite being selfish, greedy, and foolish) makes it to the pyramid's burial chamber to claim the riches ... [[spoiler:only for the walls to collapse and trap him there to die]]. And this, after solving a bunch of very difficult puzzles (including a few 'learn by dying' puzzles).
* As {{retcon}}ned in the intro to ''[[VideoGame/{{Turok}} Turok 3]]'', the destruction of Primagen in ''Turok 2'' caused a [[EarthShatteringKaboom explosion that destroyed the entire universe]], which is what Joshua was trying to prevent in the first place, making that game somewhat of a ShootTheShaggyDog. Fortunately, the universe is recreated, and Joshua somehow survives and has offspring, only to be killed at the beginning of the third game.
* Near the end of ''VideoGame/FableII'' [[spoiler:Lucien tells you he killed your family. There's no reason for him to do this, other than to set up the neutral choice for the ending]].
** Private Jammy is a soldier stationed at Fort Mourningwood in ''VideoGame/FableIII'', named such for his good luck (he's been wounded a whopping total of 724 times). [[spoiler:However, once the Hollowmen arrive, he invariably meets his demise no matter what the player does. His ghost then comes back to continue serving as the Hero's loader in the mortar mini-game. What a trooper.]]
* ''VideoGame/FreeSpace2'' does this with a flourish: at the end of an arduous, complicated and desperate campaign to destroy the Shivan dreadnought Sathanas which threatens the (known) galaxy, you learn that the Shivans have about a bazillion more such ships.
* ''VideoGame/JakXCombatRacing''. Non-fatal example, but after you've won the game, [[spoiler:Rayn is suddenly revealed to have been manipulating you all along, wasn't poisoned, and oh yeah, she's now the biggest crimelord in the world. [[NiceJobBreakingItHero Well done, Jak]]]].
* ''VideoGame/SuperRobotWars'': This almost hit Lamia Loveless as part of a plot just to see Kyosuke Nanbu getting {{Emo}}, but she got better eventually. Either her recovery was part of Banpresto's plan all along, or as a reaction of fans outraging at the Diabolus Ex Machina that they set on her just because her default story is done and they want to put some [[DarkerAndEdgier dark and edgy]] feel on OG.
* You just wiped all the gangs out of Paragon City and finished ''VideoGame/{{Crackdown}}''. [[spoiler:Now it's a police state run by your employer, which is another gang.]]
* In ''VideoGame/SaintsRow'', under gang leader Julius, you destroy the three rival gangs in Stillwater and "unify" the city under the Third Street Saints. [[spoiler:Then, with the help of the undercover cop in the Saints, Julius is captured by the police. They use him to blackmail the Saints into helping an anti-gang mayor get elected. Afterwards, when you confront said mayor to negotiate Julius's release, the two of you are blown up in an assassination attempt.]]
** In the sequel, it's revealed that [[spoiler:Julius set all of it up to dissolve the Saints and gang violence altogether: without his or the player's leadership, he knew the gang would fall apart and things would become more peaceful. Obviously, it didn't work, if only because the man didn't understand the concept of a power vacuum]].
** It's also revealed in the sequel that [[spoiler:Dex, an ambitious ex-Saint, orchestrated a similar gambit during the finale, aiming to kill the player to destroy the gang (again), but for less noble reasons]].
* ''VideoGame/TheWorldEndsWithYou'': After surviving the Reaper's Game, Neku and Shiki discover that [[spoiler:only Shiki can come back to life]]. Neku is fine with this, until the Conductor hits him with the whammy that [[spoiler:in order to play the next game, the entry fee he has to pay is Shiki herself--and he only tells Neku this ''after'' he agrees to play the game, and the Conductor has "collected" Shiki]]. It's later revealed that the [[spoiler:Composer, the Conductor's boss and the guy responsible for reviving people, was absent. In fact, the whole game was invalid because of that; only the Conductor knew the Composer was gone and would have been shafted if anybody, including his subordinates, knew. Thus, it was just a cheat to keep the two in limbo and prevent from being found out]].
* In ''VideoGame/StreetFighterAlpha 2'', Charlie, who always dies in his endings due to ForegoneConclusion, manages to corner Bison, only to be shot on the back by his intended back-up chopper.
* [[TheWoobie Oichi]] in ''VideoGame/SengokuBasara 2 Heroes'' dies this way in her own story. On the other hand, TheAnimeOfTheGame ''Sengoku Basara''... well, puts this on many many characters. [[spoiler:Oichi included]].
* In the ending of ''VideoGame/StarWarsRepublicCommando'', your squad has taken out a massive separatist gunship and are ready for evac. Then, out of nowhere (and off-screen), Sev reports he's under attack and you lose contact with him. Despite the protests of you and your squad, your commander refuses to let you rescue him, and you all get on your evac shuttle, leaving him to die. A lot of players hated Yoda for that.
* Ameena's subplot in ''VideoGame/StarOceanTillTheEndOfTime'' ends on a big one. Ameena, IllGirl and blatant Expy of [[VideoGame/FinalFantasyVII another flower girl]], is finally reunited with her long-lost childhood friend. Then he dies (he was injured in battle a few scenes prior to this) and she succumbs to her illness seconds later. It's even more of a nightmare for the protagonist, since the girl was also virtually identical to his own best friend. Then [[spoiler: Fayt's dad dies, then Earth is destroyed]]...
* ''VideoGame/WorldOfWarcraft'', the Pit of Saron: when Scourgelord Tyrannus is defeated, the freed slaves run onto his overlook en masse, celebrating. Suddenly, Sindragosa appears and blows nearly everyone to smithereens, the players themselves saved by Sylvanas/Jaina's teleport.
* ''VideoGame/{{Aquaria}}'' pulls this in TheStinger: [[spoiler: the woman in black- who hasn't done anything of significance since the NoobCave- reveals herself to have been manipulating Naija in a BatmanGambit to destroy the BigBad. She then wipes the Naija's memory and spirits her away from her new family, leaving her right back where she started- lonely, isolated, and amnesiac]]. This was supposed to be a SequelHook, which would have been annoying but okay in the end. But now comes word that the dev team has [[CreativeDifferences splintered]] and moved on to other projects- including one hyped as a SpiritualSuccessor. [[NiceJobBreakingItHero Nice Job Ruining A Perfectly Good Ending, Bit Blot]].
** The creator has admitted in [[http://www.bit-blot.com/forum/index.php?topic=2384.0 this]] message board thread that there were never any fixed plans for a sequel, and that he wanted to avoid a happy ending, possibly making this an intentional example after all.
* In ''VideoGame/{{Killzone}} 2'', the ISA has busted their asses to get to and defeat Visari, only to find out that the Helghast have a huge reserve fleet coming.
* In TheStinger of ''VideoGame/SyphonFilterLogansShadow'', Logan and Xing return to their hideout only to find Mujari dead and Teresa wounded by Trinidad, who then shoots Logan in a moment of CutsceneIncompetence, although he gets off a LastBreathBullet. Xing starts [[CleanPrettyReliable CPR]] on Logan, and the story is left on a {{cliffhanger}} (which will never be resolved).
* ''VideoGame/DragonAgeII'': The Hawke family farm is gone, one of your new allies is dying of darkspawn taint, and just when you think it's safe to stop for a breather, an ogre comes out of nowhere to brutally smash one of your siblings into the dirt, reducing your party to you, your other sibling, and Aveline against the ogre and its hurlock buddies. ''And it's only the prologue.''
* ''VideoGame/MetroidZeroMission'' is a [[VideoGameRemake remake]] of the original ''Metroid'' that continues after the original ended. It accomplishes this by [[spoiler:having Samus shot down by Space Pirates while leaving Zebes, destroying her ship and suit]]. This is followed up by an inversion in the form of [[spoiler:an ancient Chozo temple giving Samus an older yet far more advanced Power Suit (the one she's pictured with in most incarnations). It even is capable of recognizing the incompatible Upgrades she received earlier in the game]].
* ''VideoGame/TheWalkingDead'':
** Episode 5 combines this with MortonsFork. [[spoiler: Kenny will sacrifice himself to save someone else]] regardless on whether or not you [[spoiler: saved Ben or let him die in episode 4]]. If [[spoiler: Ben lived]], then the balcony the group jumps off to get into the rooftops will collapse when [[spoiler: he]] tries to jump it, causing [[spoiler: Kenny]] to go down and [[spoiler: sacrifice himself to ensure Ben gets a MercyKill out of guilt]]. If [[spoiler: Ben died]], then [[spoiler: Kenny]] will live past the balcony, but will instead knock Lee's radio down an opening in one of the roofs later, one that just happens to be filled with walkers. Christa will go down and get it, but can't get back up. [[spoiler: Kenny will then jump down and hoist her up, before running off and leaving his fate ambiguous]].
** [[spoiler: Omid's death]] at the start of Season 2 Episode 1. If it wasn't for a random bandit showing up at just the right time, a series of seemingly inconsequential if slightly silly choices by Clementine (one - [[spoiler: leaving her gun on the sink while she went to find her water bottle]] - which the player could have actually avoided if it weren't for it [[ButThouMust being preventable by the game]]), and the bathroom door closing just before [[spoiler: Omid could successfully disarm the bandit]], then it wouldn't have lead to the rest of the events of the first episode. Whats worse is that [[spoiler: the Bandit likely had no intention of causing any of them any harm. She shoots Omid out of panic and drops the gun immediately but gets shot by Christa nonetheless]].
* In ''VideoGame/{{Zenonia}}'' ''4'', Regret spends most of the game trying to SetRightWhatOnceWentWrong with TimeTravel. ''Every time'' he changes the past, something else happens to ensure that the world is still doomed. Regret eventually decides to face the threat head on rather than running back to the past in a futile attempt to avoid it.
* Dalton in the ''VideoGame/ChronoTrigger'' /Cross continuity. He is quite clearly used as a comedic (and a not really super-powerful) villain in Chrono Trigger, but he manages to [[spoiler:exact his vengeance against the heroes]] as suggested in Chrono Cross backstory and in exclusives Chrono Trigger DS version dialogues.
* ''VideoGame/ClockTower'': Poor Jennifer. Between Scissorman, [[spoiler:Mary]] and seeing Lotte die ([[DoomedByCanon no matter what the player does]]), she may get a lovely HopeSpot in the form of either Laura or Ann running to greet her at the climax-- except said HopeSpot is promptly pushed straight off the ledge, [[CruelAndUnusualDeath into the Clock Tower's gears]].
* ''VideoGame/DeadSpace3'' pulls this in the ''Awakened'' expansion pack. The destruction of the WeirdMoon of Tau Volantis sends a signal to awaken the other [[EldritchAbomination Brethren Moons]], which have discovered Earth and are [[PlanetEater feasting on the planet]] [[LateToTheTragedy by the time Isaac and Carver return]].
* The penultimate Season 3 episode of VideoGame/SamAndMaxFreelancePolice has Max transformed into a giant attacking hell-beast due to his new psychic powers mixing with an Elder God. Sam, Papierwaite, Dr. Norrington, and a pregnant Sybil are inside him. If they don't fix things, Max will explode and take out most of eastern United States. To stop that, the government is ready to kill Max. [[spoiler: Things are actually looking up in the finale when the BigBad take a HeelFaceTurn and lets the gang get out before fixing Max himself. Turns out that they all took too long: Max is hit by the weapon just as his normal mind is restored. His psychic brain has already caught fire, signally that he'll explode. He manages to teleport into space to avoid killing everyone, but Sam is left defeated and broken-hearted. Sure, a Max from an alternate universe shows up to hang out... But that's because he just had the same thing happen to ''his'' Sam. So, things worked out, but both the leads went through some ''major'' crap before pulling a ReplacementGoldfish on each other.]]
* The ''VideoGame/BlazBlue'' series makes it clear that [[EarnYourHappyEnding its demands for anything resembling a happy ending will be paid with blood, in full with lots of overdue interest]], and yet even by those standards ''Chronophantasma'' is where this trope comes out in full force.
** One would be harder pressed to find a more fitting example than the end of ''Chronophantama''. [[spoiler:So Tsubaki is back with the good guys, Bang has been reunited with Lord Tenjou's son, Relius is a broken shell of a man, Terumi is dead, Take-Mikazuchi is defeated, Nu is unconscious, and all is right with the world, yea? Izanami pops right on in at the very end, has Phantom teleport Hakumen away (he was trying to kill Nu, something not even Celica could talk him out of), sics Phantom on Jubei (and reveals that she is Jubei's long-dead wife Nine of the Six Heroes), and reanimates Nu, who proceeds to hug.exe Ragna on the spot, fusing with him despite every effort he made to prevent it, wounding Noel and beating Jin to within an inch of his life in the process, with Ragna doing everything in his power just to keep from outright killing them. Bonus points for Izanami being the manifestation of death, as Rachel calls her, which implies a being of divine nature.]] That such a thing happens on the third game of the series (presumably out of four) suggests that Toshimichi Mori ''wants'' Ragna to die.
** On the subject of Ragna, he ''never'' gets a good ending in Arcade mode, but the endings for his ''Calamity Trigger'' and ''Continuum Shift'' Arcade runs can be seen coming. [[spoiler:In what must be a record for the poor sap, Ragna manages to stalemate with Nu-13 in CP Arcade (whereas all prior encounters ended with hug.exe), but when he attempts to activate his Azure Grimoire, Izanami intervenes and jams it. Terumi gloats about it, Nu stops Ragna from trying to wipe the smirk off Terumi's face, and that's how it ends. It ends this exact same way in Chapter 7 of the ''Chronophantasma'' story, too. Bonus points for evoking the Evil Plot Escape Clause, as losing Nu would compromise the villains' attempt to evoke the Master Unit.]]
** Tager gets hit with it, too. [[spoiler:His final battle is against Relius Clover, and when the fight ends, Kokonoe orders him to round the bastard up on the spot, but -- wouldn't you know it -- time gets scrambled at that point, with Tager back outside the Ibukido Ruins. Kokonoe notices something is amiss, and chalks it up to the Master Unit, with no further explanation.]]
** And then there's Makoto, who the villains make damn sure nothing goes right for if they can do anything about it. [[spoiler:In ''Continuum Shift'' Arcade, Makoto has just knocked Noel out when Hazama comes along and tosses the poor flat-chested girl into the smelting phase, whereas in ''Chronophantasma'' Arcade Tsubaki only gets one line in before Izanami forcibly reinstates Mind Eater and pushes her into a deathmatch with Makoto - after a fight in the Izayoi's Zero-Type mode no less. These instances are glaring because not only does the Evil Plot Escape Clause kick in - Noel is the lynchpin of Takamagahara and Terumi's plan to slay the Master Unit, while Izanami needs the Izayoi to kill Rachel Alucard - but ''both times'' attempts are made on Makoto's life in Story mode to prevent the incidents from repeating themselves. The latter also overlaps with DeusExMachina as Master Unit: Amaterasu ejects Makoto from that fight before it gets underway.]]
* ''VideoGame/{{Persona 2}}'': At the end of the first half of the duology, [[GodOfEvil Nyarlathotep]], having already lost his bet with the BigGood over whether humans can overcome the supernatural adversity he was stirring up, teleports one of his minions behind one of the characters and mortally wounds her with the Lance of Longinus, necessitating a reset of the universe and a forced amnesia of the main cast because if they remember what happened in the old universe it will split for some reason, setting up the second half of the duology.
* ''VideoGame/FireEmblemAwakening'', at its core, is about SetRightWhatOnceWentWrong, but it's pointed out several times that [[YouCantFightFate destiny tends to favor its intended path]], so the protagonists attempts are continuously thwarted by things going wrong that are completely unforeseen, but not quite qualifying for this. However, there is the example where [[spoiler: the Avatar and Basilio have executed a plan to fool Validar by allowing him to capture the Fire Emblem with fake gemstones placed in it, leading to Validar being defeated without being able to summon Grima. Once it looks like the future has finally been avoided, the future version of Grima (i.e. the possessed Avatar/Hierophant) appears and completes the ritual anyway, which he apparently could have done at any point in the level once the necessary human sacrifices were prepared and only held back because he wanted to have the current Avatar become Grima as he did. Also, there's the tiny fact that [[LoopholeAbuse the Avatar can kill Grima thanks to wielding the Fell Dragon's power and now that's possible with future Grima taking their place]]. [[NiceJobFixingItVillain Whoops]]]].
* ''Franchise/{{Halo}}'':
** ''VideoGame/HaloReach'' has numerous bad situations jump out of nowhere for the heroes. Reactivating a downed relay? Angry invisible Elite Zealots leap out to kill you. Blew up a Covenant control spire? Turns out an even bigger Covenant ship is there above it. Destroyed that ship at the cost of a friend? An entire fleet of ships just like it arrive. Fleeing from an air strike and reached a bunker? A sniper takes out your friend. [[spoiler:Made it safely to a ship heading off-planet with the Master Chief? Your last teammate gets killed and you have to stay behind to provide fire support, leading to your inevitable death.]]
** The original ''Halo'' game, ''VideoGame/HaloCombatEvolved'', had this as well. The Master Chief fought his way to the eponymous Halo's control room, supposedly gaining access to a super-weapon or at the very least preventing the alien Covenant from using it. Just when it seems like the UNSC is gaining the upper hand, the Covenant unwittingly release the Flood, which immediately devastates both the Covenant and UNSC, forcing the Master Chief and Cortana to destroy the entire ring in order to contain the Flood. By that point, the Flood had eradicated nearly every human on the ring.
* Similarly to ''Halo'', at the end of ''VideoGame/{{Marathon}} 2'', the defeated Pfhor use their [[EarthShatteringKaboom sun-shattering]] Trih Xeem on L'howon's sun, unintentionally releasing the [[OmnicidalManiac omnicidal]] EldritchAbomination known as the W'rkncacnter.
* ''VideoGame/TheWitcher'' and its sequels are infamous for pulling this frequently in its sidequests, as a means to enforce the GreyAndGrayMorality CrapsackWorld theme.
* ''VideoGame/TalesOfVesperia'' has [[AxCrazy Zagi]]. He pops up at random moments to fight the party, all due to his [[{{Yandere}} obsession]] with Yuri. He also has various upgrades throughout that make him more dangerous each time he's encountered - and how he gets said upgrades are completely unknown. This is ''[[TropesAreNotBad exactly]]'' why Yuri is so frustrated with him.
* ''VideoGame/TalesOfXillia2'' has the party finally collect all 5 Waymarkers needed to make the Land of Canaan appear, it does and then, out of the blue, it's revealed that one needs a soulbridge to get there. How do you get a soulbridge? Well, a person with the ability to use Chromatus needs to die, so that [[ExactlyWhatItSaysOnTheTin their soul can act as a bridge]]. Meaning the party needs to kill either Julius or Ludger.
* ''VideoGame/{{Undertale}}'' does this in both the [[spoiler: Pacifist]] and [[spoiler: Neutral]] endings, [[spoiler: Flowey appears out of nowhere to ruin your day. In the Pacifist ending you actually get your happy ending after all, but in a neutral ending he succeeds]]. If you get the true ending after getting the worst ending, the normally happy ending gets one of these [[spoiler: by showing the Fallen Human is still possessing Frisk's body and is hunting down and murdering the other characters]].
* In the original ''VideoGame/{{Contra}}'', the FinalBoss is a large alien heart, and defeating it is the only way to stop the alien invasion and save the world. In the Amstrad CPC port, however, [[spoiler:''for no reason at all'', its destruction somehow triggers the Earth's ''self-destruct mechanism'' which then promptly wipes out humanity and all life along with it]].
* ''Franchise/TheLegendOfZelda'':
** ''VideoGame/TheLegendOfZeldaOcarinaOfTime'': When Link pulls out the Master Sword, it (or possibly Rauru) puts him in a coma until he is an adult, which allows [[spoiler:Ganondorf to take the Triforce unopposed]]. While Rauru claims afterwards that the Sword demands an adult wielder, this is not foreshadowed beforehand, and it is contradicted in both earlier and later games.
** ''VideoGame/TheLegendOfZeldaTwilightPrincess'': One in the backstory. Ganondorf is exposed for his crimes and executed. When the Sages stab him in the chest with a giant sword, they are very surprised when he suddenly manifests the Triforce of Power, survives, and starts killing them. They have to exile him to the Twilight Realm instead. [[spoiler:This is because of timeline trickery. After ''Ocarina of Time'', Link came back and warned Hyrule about Ganondorf's ambitions and they were able to stop him. But in the original timeline, his plan went unopposed, and when he touched the Triforce it broke, with the Triforce of Power going to him. Since the Triforce transcends time and space, he received it again in the altered timeline at the same moment]].
** ''VideoGame/TheLegendOfZeldaSkywardSword'' has one at the very end: [[spoiler:At the conclusion of the FinalBoss, Demise suddenly curses the incarnations of Link and the descendants of Zelda to forever fight the incarnation of his hatred. There are no previous hints that he could do this (unless you count his rival Hylia incarnating as Zelda), and while the curse itself doesn't bring him back from the dead, it serves no other purpose than to ensure that the series will chronologically continue after his passing]].
* ''VideoGame/HauntingStarringPolterguy'': After poltergeist Polterguy [[spoiler:defeats the final boss, he returns into his human form again, but an anvil appears out of nowhere, lands on his head and turns him into a ghost again]].
* ''VideoGame/LANoire'' has Cole Phelps about to break the case against Courtney Sheldon involving illegal morphine when the Chief of Police interrupts the interrogation and drags Cole away to his office. The interrogation is suspended and is never resolved. [[spoiler: Cole is outed for having an affair with Elsa and is demoted to the arson desk. The demotion also keeps Cole away from the big case he was working on since he would have gotten to close to the plans that were laid within the Suburban Redevelopment Fund.]]
* Invoked in ''VideoGame/FateGrandOrder'''s 2016 Valentines' Day event. When the protagonist and [[RewritingReality Shakespeare]] learn that they'll be able to resolve all the chaos going on simply by having a short tea party with Nursery Rhyme, Shakespeare decides that this is too easy and boring. So he "[[ContrivedClumsiness accidentally]]" rewrites the encounter so that Nursery Rhyme decides to ''trap'' the protagonist in the tea party using her [[LossOfIdentity Nameless Forest Reality Marble]].

[[folder:Visual Novels]]
* Quick summary of diabolus in ''VisualNovel/Ever17'': Hurray! Everyone else already escaped and we've loads of time to get out ''plus'' a submarine! They get out safely, chatting while they go up and [[spoiler:the sub's battery dies. What the hell? You'd think it would've been recharging automatically before they called for it. So in order to fix the buoyancy problem, Takeshi distracts Tsugumi with a question about [[FunnyAneurysmMoment the Archimedes Principle]] and enters the airlock then jettisons himself out to his apparent death and Tsugumi's eternal loneliness. What. The. Hell]]. But it gets better.
* Quite a few Bad Ends for ''VisualNovel/OokamiKakushi'' fall under this. To be fair, not all of them are like this; some can be obtained by simply making the wrong decision (such as choosing to believe one girl over the other). As for ''others'', however, there are arcs where you don't immediately see the result of a combination of choices you made until much later, which tend to result in this trope. Probably the best example of this is one Bad End where Hiroshi attempts to commit suicide after [[spoiler:becoming a Kamibito and losing his friends]] only to be saved by Nemuru, who convinces him to keep living. Sounds like a happy, potentially [[SugarWiki/HeartwarmingMoments heartwarming]] way to end a chapter, right? [[spoiler:Cut to one month later, where Hiroshi comes across his old mufflers that have his old, strong honey-like scent attached, which causes him to go insane and attack his sister, which then leads to his implied execution.]]
* Whenever the glider in ''VisualNovel/IfMyHeartHadWings'' is completed, something will go wrong no matter what, unless it's the end of a route.

[[folder:Web Animation]]
* ''WebAnimation/HappyTreeFriends'':
** "Swelter Skelter": Nutty trips and his head cracks right open, at which point his brain fries in the heat like an eggshell, and Lifty getting trapped in a ''frozen explosion'', which Shifty then impales himself on.
** The end of "Wingin' It", when after surviving a plane crash and a shark attack, Godzilla shows up out of nowhere and eats Flaky.
** "Idol Curiosity": Just when Sniffles thinks he's evaded all the Cursed Idol's traps, the earthquake he evaded earlier in the episode somehow ''takes a cab'' and destroys his house. He manages to evade it again... and then he breaks in half for no reason, though this could be explained as an effect of Sniffles being cursed.
** "Spare Me": Sniffles spins around, which somehow causes his head to go flying off his body.
* ''WebAnimation/{{RWBY}}'': In the last few episodes of season 3 [[spoiler: a massive Grimm Dragon arrives and effectively screws over Vale and his allies]]. Somewhat Downplayed, in that they were effectively screwed by things that were foreshadowed, but things still went almost catastrophically wrong in a short period of time, after establishing a tend of the characters pulling through at the last minute.
* Website/GoAnimate: No matter how savvy the troublesome kids in the grounded videos are nor how far the measures they take to hide their wrong-doings, something invariably happens that exposes them, even when there is no ''possible'' way they could have been caught. This trope isn't just used for busting a troublemaker, however. For example: [[https://www.youtube.com/watch?v=YWjgtWsUkdE this video]] has an especially brutal instance of this where WesternAnimation/{{Caillou}} and his family are going to see a movie, and despite interference from [[TheMillstone Caillou]] (who doesn't want to see the movie, namely ''Disney/{{Zootopia}}'') they get to the theater on time...only for the theater to abruptly close just as they arrive for ''no stated reason whatsoever'' and the attendant present in front threatens to call the police on the family if they don't leave at that very instant.
* ''[[Machinima/SBBBrothers Sims Big Brother 5]]'':
** The main twist of the season is that there was a liar in the house. By "liar", we mean someone playing under a false identity. The Liar is revealed to be Logan, but not to the houseguests. One week, there is a double elimination week and Michael Goldsmith says they have to evict the Liar, or else they will lose a portion of the grand prize (which the Liar would receive). Knowing he is in trouble from the other alliance, Logan persuades the majority and the floaters that the liar is Darby. Thus, the house cast their votes for Darby and Logan, and since Darby receive more, she is evicted.
** Diablous ex Machina struck once before. In ''Sims Big Brother 2'', there was a week in which 6 people were taken into the Solitary chamber, making themselves immune from the vote during Public Voting Week (in which ''everyone'' was up on the block, sans the 6 in the chamber). However, the person who lost all of the challenges was more or less screwed. They couldn't use any of the luxuries, couldn't compete for Head of household, were automatically nominated for three weeks in a row, had to eat an instant meal diet, and if any of those rules were broken, they'd be expelled. Dora unfortunately lost....meaning she had many of the worst weeks of her life in the house. Is it any wonder that after becoming the Unlucky Houseguest, she [[SuicideByCop asked everyone to nominate her and vote her out?]]

[[folder:Web Comics]]
* ''Webcomic/TheOrderOfTheStick'' pulls two of these at various points to save the (un)life of its BigBad, Xykon -- first [[spoiler:when [[KnightTemplar Miko Miyazaki]] unwittingly pulls the rug out from a paladin who's about to smite Xykon and his [[TheDragon lieutenant]],]] and second when [[spoiler:Xykon's Soul Jar narrowly misses utter and permanent annihilation by falling ''just short'' of a portal to another dimension -- after the bird that was supposed to drop it in from point-blank range stopped shy for what was then no apparent reason]].
* Din and Jin from ''Webcomic/LasLindas'' seem to be this trope personified. Their latest "prank" rivals the [[Anime/CodeGeass Euphinator Incident]] in terms of everything going to hell in the worst way possible just when things were going good for the cast.
* The first half of ''Webcomic/{{Homestuck}}'''s fifth Act goes swimmingly for its focal group of [[InternetTroll Internet Trolls]]. They overcome their differences to defeat the evil Black King and prepare to receive the ULTIMATE REWARD for defeating him; then a scratch in spacetime releases an invincible demon who kills their robot army and forces the Trolls to hide deep in an asteroid field until they can think of a way to over ome the demon.
* In ''Webcomic/BittersweetCandyBowl'', Confrontation just gets worse and worse, with every choice the characters make just making things more dangerous for them.
* Maria's death in ''Webcomic/AndersLovesMaria''. Occurs in the second-to-last strip, wtih next to no foreshadowing, and Anders spends two splash panels just staring off into space before a TimeSkip to his life as a single father.
* In ''Webcomic/{{Sinfest}}'', [[http://web.archive.org/web/20120505172618/http://www.sinfest.net/archive_page.php?comicID=3523 to remove]] [[http://web.archive.org/web/20120505172618/http://www.sinfest.net/archive_page.php?comicID=3619 the happy]] [[http://web.archive.org/web/20120505172618/http://www.sinfest.net/archive_page.php?comicID=3624 endings]].
* Season 5 of ''Webcomic/SurvivorFanCharacters'' was full of these, given that the season was tagged "The Cursed Islands". Such "curses" involved having someone divvy up the tribes, but then get sent to Exile Island and have no control over which tribe they're sent to at the end of Day 3; a tribe being absorbed into the other tribes; someone having the choice to send themselves to Exile Island until the merge, but have absolutely no contact with their tribe mates until then; a random mutiny - one of the challenges was full of these; mainly, contestants would vote as to how many tribal councils they would be willing to go to with such debilitations as not being able to vote, having an extra vote against them, and not being applicable to win immunity. Miranda won the first, Brock won the second [[spoiler:and subsequently led to his elimination]], and Marius won the last [[spoiler:although he managed to ''win'' because of this curse]].
* In ''Webcomic/OurLittleAdventure'', [[http://danielscreations.com/ola/comics/ep0249.html the clone's escape is called this.]]
* Happens several times in ''Webcomic/SlightlyDamned''. Every things start getting good for the Protagonists, something happens to mess it up. Made even worse, since many of them double as HopeSpot moments. The lists include:
** The end of the "Escape from Hell" arc, where just before Sakido manages to get them out of Hell and into Medius, which she had always wanted to see (at the cost of going berserk, which would have killed her anyway, albeit probably allowing her to at least get a glimpse of her dream), she's promptly shot dead by a Holy Arrow shot by an Angel that for some reason was in Hell.
** In Weyville, just as Buwaro was about to express his feelings to Kieri...an Angel (with severe PTSD that's given him an intense hate for demons and anything remotely associated to them) suddenly shows up out of nowhere.
** In St.Curtis, everyone seemed to be having a good time, with the St. Curtis Arc seemingly shaping up into a breather arc, then the army of Hell decides to break the TruceZone that St. Curtis was shaping up to be. Also, [[spoiler:the Seraphim have gone full-blown cultist, complete with ritual sacrifices of angels, and are commanding most of the demons]].
* In ''Webcomic/{{Plume}}'', chapter 9 is chock-full of this. It starts with the protagonists having captured the villain and Vesper at the edge of having her vengeance, only for a sudden appearance of Azeel, who proceeds to wreck the party, leaving Corrick's amulet free for Dom to take and ushering what seems to be the ''true'' plot of the comic.
* In the climax of ''Webcomic/YetAnotherFantasyGamerComic's'' [[http://yafgc.net/comic/2913-final-confrontation/ Rannite arc]], [[TheAce Arachne]] - [[DeusExMachina who just happens to be]] specially trained for this purpose - manages to seal [[GodOfEvil Ranna]] into an unfamiliar body, subdues her and prepares to kill her with a weapon made to make sure Ranna's soul can't escape at the moment of death. But before she can land the coup de grace, she's [[TheGlomp tackle-glomped]] by [[TheDitz Princess Dewcup]], who wanted to show Arachne her new Drow body. And Ranna promptly [[BackStab throat-stabs]] Arachne. In an [[CrouchingMoronHiddenBadass impressive, but ill-timed bit of badassery]], [[FanNickname Drow-cups]] chokes out Ranna with a sleeper hold. Which allows Ranna to escape Arachne's vessel and return to her body. Which she ''then'' promptly uses to [[DeathFromAbove obliterate Black Mountain]] with a burst of raw magic. This is on top of several major characters meeting [[KillEmAll horrible ends]] in the course of the storyline.

[[folder:Web Original]]
* The finale of ''WebVideo/DoctorHorriblesSingAlongBlog''. MadScientist [[VillainProtagonist Dr. Horrible]] held at gunpoint with his own death ray? The gun explodes and he survives. The MadeOfIron superheroic jerk Captain Hammer who fired it? Injured and humiliated, but survives. Naive heroine, Penny, on the far side of the room, who has just realized Dr. Horrible and Billy Buddy are one and the same and in love with her? Sorry, Penny. You get {{Jossed}} with Penny-seeking shrapnel.
* {{Parodied|Trope}} in WebVideo/TheNostalgiaCritic's review of ''Film/MoulinRouge:'' he spends practically the entire review complaining about the movie before the WebVideo/TheNostalgiaChick and Music/{{Brentalfloss}} convince him it is fine as a {{guilty pleasure|s}}. But this being a review of ''Moulin Rouge!'', it needs to end tragically, so he randomly shoots Brentalfloss and mourns his loss. This is mocking one of their complaints about the movie, namely that Satine's consumption -- and her decision to break up with Christian instead of telling him about it -- seem like this trope.
* "The Grand Heist" in Creator/AchievementHunter's ''[[LetsPlay/AchievementHunterGrandTheftAutoSeries Let's Play Grand Theft Auto V]]''. The Fake AH Crew is able to get the money and race towards the Titan to escape. Ray stays behind and performs a HeroicSacrifice to get the other five into the air. As they're in the air, Gavin's doing his best to stay there and reach their target. [[spoiler:Suddenly, the Titan ''stalls'', clips one of the chasing helicopters and ''kills the rest of the team''.]]
* ''Roleplay/NanQuest'' appears to pull one: just as Nan, Santiago, and Kim have come through a frighteningly-literal hell to get to the end, they are just managing to get out; then, just as Kim goes to leave, part of the burning, crumbling building collapses, pinning her under there where it's likely she'll be burned to death. They reach for her hand, call her name, fade out...[[SubvertedTrope and then]] the timeline alters, the hotel is intact, Kim is a child again and perfectly fine who goes off with her mother (keeping her memories), and even Santiago gets a happy ending as a child/surrogate son for Nan.

[[folder:Western Animation]]
* ''WesternAnimation/SouthPark''... constantly.
* Even the kid-friendly world of ''WesternAnimation/AlvinAndTheChipmunks'' is not safe from the Diabolus Ex Machina. In one episode, involving a new cat dubbed "Cookie Chomper the 3rd", a DeathByNewberyMedal comes out of nowhere in the ''last two minutes'' of the show.
* This trope is played for laughs in ''WesternAnimation/StoneTrek'': Every episode ends on a happy note... until the ''Starship Magnetize'' explodes for no apparent reason.
* The early episodes of ''WesternAnimation/{{Sealab 2021}}'' always end with the ''Sealab'' exploding. The most notable example of this trope is the episode that's just an episode of the original ''Sealab 2020'' series, and so it's fairly normal and has a happy ending. Then the Sealab explodes thanks to bad directions.
* It didn't involve any dying, but... ''WesternAnimation/CodenameKidsNextDoor'', "Operation Elections": Nigel Uno has just led his school to fend off an attack against a rival middle school, and is making a speech as he's assuming his rightful position as 4th grade president position that was robbed from him by the Delightful Children, who had instigated the attack by the middle school. [[spoiler:And then the guy who earlier told him that he had won the election now tells him that he ''still'' lost the election to some random guy. Diabolus pours salt into Uno's wounds by suggesting that his fellow operatives ''also'' voted for the other guy.]]
* Happens to WesternAnimation/SamuraiJack ''all the time''. Because FailureIsTheOnlyOption here (if he ever ''did'' manage to go home and SetRightWhatOnceWentWrong, the show would end for good) ''every'' time a way home is within reach, something will cause him to lose the chance or compel him to forfeit it.
** [[spoiler:Even when he DOES manage to get back home, he ends up losing the woman he loves]]
* ''WesternAnimation/TheSimpsons'':
** In other election news, a lizard-suit wearing Homer Simpson seems well positioned to win a mayor recall election to replace Quimby, since no one else seems to be good enough. The suit turns out to be his downfall when it shrinks in the wash, and suddenly no one likes him, and since no one gets enough of the vote, Quimby stays in office.
** In "Brother from Another Series", Sideshow Bob appears reformed and gets work release when his brother Cecil offers him a job for a dam project. Bart is convinced that Bob is up to no good, but in the end it turns out Bob really ''has'' reformed and Cecil was trying to embezzle millions from the dam project. Bob actually helps stop Cecil and saves Bart and Lisa's lives, but when the police arrive to arrest Cecil, Police Chief Wiggum insists on arresting Bob as well for no good reason.
--->'''Bob:''' (''in the backseat of the police car with Cecil'') But I ''saved'' the children's lives! I'm a hero!\\
'''Cecil:''' [[ShmuckBait Tell them they'll live to regret this]].\\
'''Bob:''' ''You'll live to regret this!'' ...Oh, thanks a lot. Now ''I'' look crazy.
* ''WesternAnimation/HeyArnold'':
** The Devil sure loves stalking [[TheChewToy Eugene Horowitz]]...
** Used in-universe in one episode (that was actually Eugene-focused) where the drama teacher, having been dumped by his girlfriend, changes the ending of the school musical so [[DroppedABridgeOnHim the protagonist is randomly hit by a bus]], the villain steals his {{Love Interest|s}}, and then sings a gloating song about being a KarmaHoudini. The kids spend the rest of the episode trying to get it changed back.
* The show ''WesternAnimation/{{Cyberchase}}'' LOVED using these to keep the magical cure-all MacGuffin out of the protagonists hands. Hell, that's how they lost it in the first place.
* ''WesternAnimation/TheBoondocks'' episode "Ballin" has Riley coming close to [[BrokenWinLossStreak finally winning a game]] when the mentally challenged replacement center for his main competition turns out to be a [[spoiler:child prodigy at basketball]].
* In ''WesternAnimation/TotalDrama Island'', Bunny is [[SwallowedWhole eaten by a snake]]. When Geoff tries to catch the snake to get Bunny back, an eagle swoops in and captures said snake. Geoff [[HopeSpot gets another chance]] when the eagle lands at the edge of the dock, but then a shark jumps out and snatches up not only the eagle with the snake with Bunny inside, but a sizable portion of the dock as well. Although Bunny's demise has dramatic consequences, the incident itself is played for laughs.
* In ''WesternAnimation/TotalDramaPresentsTheRidonculousRace'', the double elimination that sends [[spoiler:the Rockers]] home isn't announced until after they reach the Chill Zone and narrowly avoid last place. It's also the only double elimination in the whole series and comes straight after [[spoiler:Spud]] finally gets some CharacterDevelopment and stops being TheLoad.
* ''[[Franchise/{{Peanuts}} It's Your First Kiss, Charlie Brown]]'': Final play of game, and we're looking at either Charlie slotting in the game-winning field goal from short-range, or Lucy humiliating herself in front of the crowd for pulling ''that trick'' (you know the one). Even Charlie pulling a John Carney wouldn't have been as bad as [[spoiler:Lucy pulling the trick anyway and ''not'' getting any of the blame for the loss, not even from poor old Chuck]].
* This is the purpose of the Kanker Sisters in ''WesternAnimation/EdEddNEddy''. They tend to show up anytime something's actually going ''right'' for the titular characters for a change (ex. "Over Your Ed", "Look Into My Eds").
* Happens on a regular basis in ''WesternAnimation/InvaderZim'', usually with [[ButtMonkey Dib]].
* ''WesternAnimation/AvatarTheLastAirbender'' does this ''three times'' in the Book 2 finale. First, it's quite clear that [[spoiler:Zuko's gonna do a HeelFaceTurn and join Team Avatar, but he instead does the [[FaceHeelTurn reverse]], betraying his uncle Iroh and teaming up with Azula]]. As if that wasn't bad enough, then, [[spoiler:while Aang appears to have mastered the Avatar State, Azula shoots him with lightning, killing him, and as a result, successfully taking the Earth Kingdom capitol of Ba Sing Se. [[BackFromTheDead He comes back]], at least]].
* ''WesternAnimation/TheLegendOfKorra'' isn't shy about doing this either. In the sixth episode of the fourth season, Korra has the villain on the ropes [[spoiler: only to be paralyzed by a vision of her EnemyWithout, who seemed to have been removed for good two episodes ago.]]
* ''WesternAnimation/ReBoot''. The final episode of the series has [[spoiler:Megabyte captured and our heroes celebrating. But then it turns out the captured Megabyte is an alias (a.k.a. a decoy) and that Megabyte has infiltrated the Principal Office and then takes over]]. Cue Cliffhanger.
* This trope is a recurring theme in ''WesternAnimation/GIJoeRenegades'', where FailureIsTheOnlyOption. Every time the Joes find something that will clear their names, it's a safe bet it will either get burned, blown up, smashed, stolen, or stabbed. [[spoiler:That is until the season one finale where the Joes returned to the Pentagon with all the evidence they needed to clear their names after destroying Cobra Mansion and defeating Cobra Commander, who survived and is ticked off by the way.]]
* During the ChristmasEpisode of ''WesternAnimation/{{Metalocalypse}}'', Doctor Rockzo, The Rock and Roll Clown (he does cocaine) sells all of Toki's Secret Santa gifts, for some cocaine. When Toki finds out, he prepares to give the clown a sound thrashing. Unfortunately, before he can reach him, Murderface's drunk Grandma crashes her scooter into a cross, trapping Toki under it. Rockzo escapes punishment, and even gets a handjob from Skwisgar's mom.
* ''WesternAnimation/DextersLaboratory'' has a brutal one in the original SeriesFinale "Last But Not Beast", combining it with a massive case of StatusQuoIsGod. Dexter and his family have finally learned how to work together and were able to stop the monster Dexter accidentally unleashed from Japan. However, he accidentally mentions his lab, which causes Mom and Dad to remember it, too[[note]]He had to reveal it to get them to work with him[[/note]]. What does Dexter do? Pull out a mind eraser gun, erasing the memories of the lab and everything after it! However, Monkey, who had aided the family earlier, loses his mask, making Dexter realize his pet monkey was the hero. So, Monkey goes and takes the gun and erases HIS memory, allowing Mandark, who was taken out early on, to claim victory and leaving Dexter to bemoan that he wished he destroyed the monster. And [[TheDitz DeeDee]] says ''nothing about it''.
* Early Creator/BillPlympton short ''WesternAnimation/YourFace'' is a plotless cartoon about a man who sits in front of his camera while a romantic song called "Your Face" plays, and the man's head transforms and morphs in all sorts of bizarre ways. At the end the man finally stops doing weird faces and looks at the camera as it pulls away--until a giant mouth in the earth opens up and swallows him whole.