Deus Ex Machina: The Unexpected Savior in Storytelling

This entry is part 20 of 38 in the series Fiction Writing

You’re deep into a story. The tension is building. The hero is cornered, out of options, and you’re turning pages to see how they solve it. Then a solution drops out of the sky with no setup, no logic, and no connection to anything that came before. The writer waves a wand and the problem vanishes.

That’s deus ex machina. It’s Latin for “god from the machine,” and it’s one of the oldest bad writing habits in existence.

A person or thing (as in fiction or drama) that appears or is introduced suddenly and unexpectedly and provides a contrived solution to an apparently insoluble difficulty.Merriam-Webster

Where It Comes From

The term originates in ancient Greek theater. When a playwright wrote himself into a corner, a god would be lowered onto the stage by a crane — the “machina” — to resolve everything. Euripides used it regularly. Aristotle criticized it, arguing that the resolution of a plot should arise from the story itself, not from something external to it. That was around 335 BC, and the advice still holds.

The device has survived for two thousand years because it solves a real problem writers face: how to get your characters out of an impossible situation. The temptation is obvious. You’ve written your hero into a corner so tight that no logical escape exists, and rather than rethink the story, you invent an escape that has no foundation in what came before. It works mechanically. It resolves the plot. But it betrays the reader’s investment in the story.

Why It’s Bad Writing

The fundamental problem with deus ex machina is that it breaks the contract between writer and reader. When someone reads a story, they’re investing time and attention on the assumption that the events will follow some internal logic. The hero doesn’t have to win. The ending doesn’t have to be happy. But it has to be earned. When the resolution comes from nowhere, the reader’s investment is retroactively wasted. Every clue they tracked, every possibility they considered, every page they turned in anticipation — none of it mattered because the answer was never in the story.

It also destroys character development. If a character doesn’t solve their own problem through skill, sacrifice, or growth, then their arc is meaningless. The hero’s journey only works if the hero actually journeys. When an external force swoops in to handle the climax, the protagonist becomes a passenger in their own story.

Mark Twain put it well: “Truth is stranger than fiction, but it is because Fiction is obliged to stick to possibilities; Truth isn’t.” Fiction has to play by its own rules. Deus ex machina is the writer breaking their own rules.

The Eagles in Lord of the Rings

The most famous modern example, and the one that generates the most debate, is the eagles in The Lord of the Rings. I’ve read the books multiple times since I first picked up that big red edition in 1969, and I’ve seen all three Jackson films in both theatrical and extended versions. The eagles are deus ex machina. They just swoop in and save the day.

It happens more than once. Gandalf is rescued from the top of Orthanc by an eagle. The eagles arrive at the Battle of the Black Gate to turn the tide. And most famously, after Frodo and Sam are stranded on the slopes of Mount Doom with lava closing in, the eagles appear out of nowhere to carry them to safety.

Tolkien defenders argue the eagles were established earlier in the story and therefore aren’t truly deus ex machina. I disagree. Establishing that eagles exist in the world is not the same as setting up a logical reason for them to appear at precisely the right moment. The eagles show up when the plot needs them, not because anything in the story demanded their arrival. That’s the definition of the device. It threw me out of the book, and it threw me out of the movie.

Tolkien was a genius. The Lord of the Rings is one of the greatest works of fiction ever written. But even great writers reach for the easy solution sometimes, and the eagles are the easy solution.

When It Works: War of the Worlds

Not every deus ex machina is a failure. H.G. Wells’ War of the Worlds uses the device deliberately and effectively. The Martians are invincible. Humanity throws everything it has at them and nothing works. Guns, artillery, military strategy — all useless. The reader is watching the extinction of the human race in real time.

Then the Martians die. Not from human weapons, but from Earth’s bacteria. They have no immune system for a planet they didn’t evolve on. It’s a deus ex machina in the strictest sense: a solution that comes from outside the characters’ actions. But it works because it serves the theme. Wells’ point isn’t that humanity was clever enough to defeat the invaders. His point is that humanity was helpless, and survival was a matter of biological luck, not heroism. The deus ex machina is the message.

This is the rare case where the device is the right choice. Wells wasn’t lazy. He was making an argument about human insignificance in the face of forces beyond our control. The “contrived” ending is the whole point of the book.

How to Avoid It

The practical problem for writers is straightforward: you’ve trapped your characters and you need to get them out. The temptation to reach for an external rescue is strong, especially late in a draft when you’re tired and the deadline is close. Here’s how to resist it.

First, work backward from the resolution. If you know how the climax ends, you can plant the elements earlier in the story that make the ending feel inevitable rather than contrived. The best plot twists are the ones where the reader looks back and realizes the answer was there all along.

Second, let your characters solve their own problems. The resolution should come from something the protagonist knows, has, or becomes during the course of the story. If your hero needs a weapon to defeat the villain, that weapon should exist in the story before the final chapter. If your hero needs a skill, they should have learned it or struggled with it earlier.

Third, if you find yourself reaching for a deus ex machina, that’s a signal your plot needs restructuring. The impossible corner your character is in might mean you need to go back and change the setup, not invent a miraculous escape. Sometimes the best fix for a broken ending is rewriting the middle.

Fourth, test it with a simple question: could a reader have predicted this resolution was possible based on what came before? They don’t need to have predicted it would happen. But the elements that make it possible should already be in the story. If the answer is no, you’ve got a deus ex machina on your hands.

📝 Disclaimer

The views and opinions expressed in this blog post are solely those of Richard Lowe and are based on personal experience and research. This content is for informational purposes only and should not be construed as professional legal, financial, accounting, or business advice. Always consult with qualified professionals before making important business or legal decisions. Richard Lowe is not a lawyer, accountant, or licensed professional advisor, and this content does not establish any professional relationship.

6 Responses

  1. Well done. I couldn’t agree more with your thesis and examples. I have no nits to pick re: LOR or Star Trek, both sacred cows of the fantasy and sci-fi genres, respectively (hence the reactions you’ve gotten so far). I have, however, PM’d you about a couple other nits I have to pick with your post, so be on the lookout for my message.

    1. Thanks for the PM and the comment. My examples certainly hit a few “sacred cows”. LOTR and ST are taken very seriously by some people. I personally love the books and the TV shows (well, most of them) but that doesn’t mean the writing is without flaws. Thanks again.

  2. Mr. Lowe, with all due respect, I’m not sure your definition of DEXMachia, and the way you define it to support your article is the way that the term is classically understood regarding the art and craft of storytelling.
    For example, your LOR summary doesn’t feel consistent at all with the generally accepted understanding of the DEXMachina term. You may not like the climax of how Gandalf, Frodo, and Sam escape death, but the means that lead to their survival is totally set up in the context of the script story, and which is also depicted on screen. This reason alone means it is not a valid example of a violation of DEXMachina.
    To wit, if a character is not directly involved with the means leading to their survival or salvation, it should not be interpreted as a story craft violation/ i.e. DEXMachina.
    Regarding the “Comics” example you cite — I don’t believe it’s fair to take a swipe at a whole genre without citing specific story/plot points of a specific storyline to support your point. And specific story points are what is required to support your point because DEXMachina is very much about poor plot/story construction, and not necessarily protagonists that live to fight another day because of outside or third party help.
    Seriously, take another look at how DEXMahchine is defined beyond the basic dictionary entry you include in your article. I think your interpretation is off in a significant way that means your words will not be very helpful to the fledging writer.

    1. I understand your points. It’s not the way “I” define the term – that’s the dictionary definition.

      Let’s take the rescue of Gandalf at Isengard. Classic deus ex machina. Gandalf didn’t call the eagles, no one sent them to rescue him, there was no preparation in advance to show the eagles even existed. Bam. He’s rescued from an impossible situation by complete chance or design or something. We, the readers (and viewers), don’t know. It’s the same with the rescue of Sam and Frodo. You could argue their rescue was set up by Gandalf’s rescue, but that’s a deus ex machina setting up another one. I’ve read the trilogy dozens of times and watched the movie (extended versions) another dozen times, and I haven’t seen any setup at all for the rescues.

      The character doesn’t have to be involved in the setup, but there must be a setup of some kind somewhere so the rescue or saving is not a complete shock. “I didn’t see that coming” is fine in good storytelling (in fact, it’s often an objective) but “there’s no way that I could have seen that coming” is not good storytelling.

      The Ents, to show an example that is NOT deus ex machina, tear apart Isengard. Their strength and abilities are shown well beforehand in both the movies and the trilogy. So when they get angry and destroy Isengard, it doesn’t come totally out of nowhere. It’s believable because of the storytelling that went on beforehand. For me, the rescue of Gandalf as well as Sam and Frodo is not believable, because there is little to no setup. There’s barely a hint that the eagles even exist, much less have the kind of relationship with other beings that they are willing and able to rescue people.

      I actually don’t mind the rescues in LOR. My point is with a little bit better storytelling, the deus ex machina could have been avoided. Even a mention of the size (they gotta be big to carry a man) or even a rumor of one carrying a man. Anything at all to set it up.

      I do agree that the “comics” example needs to be expanded and I’ve added that to my to do list.

      1. I have an idea to offer, and a nit to pick.
        (1) idea: Remember that the Eagles were employed for rescue in _The Hobbit_, based on their existing friendship with Gandalf. (And their great size was of course mentioned too.) True, this is not a setup for people who had not read the earlier work before experiencing LotR in book or film form, but I suspect that such people are fairly few.

        (2) nitpick: Please be even more careful with your punctuation, good sir. Plurals (such as ‘Ents’) are not formed with apostrophes; neither is the possessive form of ‘it’ (its, not it’s). These are small errors, true, but they can jar the attentive reader out of the intended flow of the narrative.

        Thank y’all for your attention…. 🙂

        1. Thanks for your comment. Appreciate it. In fact, most of my friend had never even heard of the Hobbit before seeing Lord of the Rings. On #2, I’ll give the article a once over for punctuation.

Leave a Reply

Your email address will not be published. Required fields are marked *