Monday, January 12, 2026

What is a Deus ex Machina? Why is it "Bad" Writing?

What is a Deus ex Machina? 

In writing, a deus ex machina happens when something (character, object, ability, event) suddenly resolves a seemingly unsolvable situation, usually at or near the climax. The "something" is unexpected or unlikely, coming out of nowhere.

The term deus ex machina is Latin and translates into "god from the machine." It references ancient Greek theater, where a god character would be lowered on a crane (machine), or raised through a trapdoor on a riser (machine), to resolve the story's problem. This pulls the story toward its conclusion.


Deus ex Machina Examples

Some examples of a deus ex machina include:

- A powerful, skilled minor character who abruptly shows up to save the protagonist by defeating the antagonist at the end.

- A protagonist suddenly finding a magical object that defeats the antagonist.

- An unexpected rainstorm that puts out a fire surrounding the heroes' homes.

- A character who abruptly reveals she's the sharpest shooter in the region, and she can make the unlikely, extremely difficult shot that will definitively thwart the antagonist.

- A pack of wolves charging into the clearing to take out the bad guy at just the right moment.


Why is a Deus ex Machina "Bad"?

The deus ex machina has been around since ancient times, and so have its critics. It is often considered a "cheap" or "bad" plot device that writers use when they've written themselves into a corner. It's rarely satisfying and often comes from lazy or ignorant writing. But the reasons it's a problem, run deeper. . . .


1. Strong Plots Work off Cause & Effect, not Coincidence

Because the deus ex machina comes out of nowhere, it's coincidental. And almost always, coincidence weakens plot. One of the differences between writing nonfiction and fiction, is that in real life, coincidences are tolerated, but in fiction, they typically are not. This is because (ironically), the audience expects fiction to work off (to some extent) probability, even as they don't always expect reality to.

If an unexpected rainstorm pours in and puts out a life-threatening fire in a historical account, the audience will be amazed.

If it happens in a novel, they will roll their eyes.

In fact, when it happens in real life, it can make the account feel more shocking and miraculous. What are the chances of that?! the audience wonders.

But when it happens in fiction, it can make the narrative feel cheap. What are the chances of that?! The audience groans.

This has led some writers to lament how difficult fiction is to create; the audience expects you to write with strong cause and effect--intertwining consequences that lead to a (somewhat) probable, yet unpredictable ending.

Admittedly, though, I hesitate to use the word "probable," because, on the other hand, audiences love it when the odds are stacked against the protagonist. Perhaps a better word to use is "possible" . . . but someone may use that as an excuse to say a deus ex machina works, because it's "possible." . . . I'll talk about all this more below--it relates to preparing the audience for what's possible. So, even though it's highly unlikely Frodo will get the Ring to Mount Doom, the audience believes it's a real possibility, because they are prepared for that outcome. (The storytelling tropes here also help form the audience's expectations.)

In contrast, a freak rainstorm that comes out of nowhere to put out a fire, seems so improbable--impossible--it ruins the audience's willing suspension of disbelief. They feel cheated or annoyed, not satisfied and entertained.

A strong plot isn't a series of random events (coincidences); it's a series of cause and effect--events that build on each other toward a (possible) climactic end.

This isn't to say, however, that coincidences are never tolerated in fiction. Typically, the earlier in the story they show up, the more they will be tolerated. The inciting incident can appear as a coincidence, but the climactic turning point cannot. The further you get into the story, the less coincidence there can be, and the more cause and effect should be in place. 

This is in part because at the beginning of the story, the audience has fewer expectations in place--as a writer, you are still setting up (or "preparing") their expectations. They don't yet know the characters, "world," and situation. They don't yet have a strong, strict sense of cause and effect. They aren't deep enough in the narrative to predict possible (probable) outcomes yet.

Unless, of course, you are throwing in something so outlandish and improbable/impossible that it doesn't pass their "crap detector" test, and they can't willingly suspend their disbelief in the first place anyway.

The problem, of course, is that the deus ex machina (unlike the inciting incident) is not used to kick off problems, it's used to solve them.


2. Strong Plots Resolve Conflicts Based on Knowledge and Understanding

Internationally best-selling author Brandon Sanderson is known for his magic systems, for which he has developed three "laws."

Sanderson's first law of magic states: "An author’s ability to solve conflict with magic is DIRECTLY PROPORTIONAL to how well the reader understands said magic."

That's all fine and well, September, you may be thinking, but what does this have to do with the deus ex machina?

A lot.

As Sanderson realized later in his career, all of his magic system laws actually apply to storytelling in general. 

So let's unpack this.

"An author’s ability to solve conflict with magic is DIRECTLY PROPORTIONAL to how well the reader understands said magic." What this means is that if you are using magic to solve a problem, the audience usually needs to understand that magic beforehand to buy into that resolution. The more they know and understand how the magic works, the more accepting they'll be of it solving major problems.

He goes on to explain that the less the audience understands how the magic works, the more it should be used to cause problems, not solve them.

So in It: Chapter One, the antagonist's abilities are largely used to cause horrific problems. We don't (yet) understand what this entity is, and it's causing conflict for the heroes.

But in Sanderson's Mistborn, the heroes are using magic to solve problems. Kelsier teaches Vin the ins and outs of the magic system, and she uses it to defeat the antagonist.

As always, this is more of a spectrum in writing, and there are variations and complex situations--I'm greatly oversimplifying these examples to lay down a basic understanding of the principle.

But these ideas apply to storytelling in general.

"An author's ability to solve conflicts with _____ is directly proportional to how well the reader understands ____."

In other words, the reader needs to know about and understand whatever solves the conflict, before it solves the conflict.

A deus ex machina usually breaks this rule, because a deus ex machina is unexpected, unlikely, and unforeseen.

An abrupt rainstorm putting out a life-threatening fire at the climax (read: solving the major problem), doesn't work in part because the audience didn't know about it. The storm came out of nowhere.

However, an abrupt rainstorm pouring down on an already sinking ship (read: adding to the problem) near the climax can work.

With that said, though, it's still usually best to not largely rely on coincidences, or rely on them exclusively, at the climax.

A coincidental inciting incident can often work, because it's typically introducing problems. It often is a problem the protagonist has to (eventually) address. Or, if the inciting incident is an opportunity, it often leads to problems (it might be an opportunity, with strings attached).

It's also worth observing, that the inciting incident is near the beginning of a structural unit, where coincidence is more tolerated, usually because it somehow leads to problems (read: conflict), while the climax (aka major turning point) happens near the end of the unit, and is used to resolve problems (conflict)).


3. Strong Plots Foreshadow Major Turns

A significant issue with the deus ex machina is that it is unforeseen. Even if it's "possible," the audience isn't prepared for the outcome, so it feels cheap. The plot device lacks proper foreshadowing.

I love K.M. Weiland's explanation of foreshadowing. She writes, "If we sift foreshadowing down to its simplest form, we could say it prepares readers for what will happen later."

Foreshadow = preparation.

It prepares the audience for what is possible.

It's "improbable" that Frodo will make it to Mount Doom, but foreshadowing helps prepare the audience for it as a possible outcome (with Sam's help).

Great foreshadowing doesn't blatantly give away the major turning point, it simply prepares the audience for it by letting them know an outcome is possible. It's not too predictable, but it's not too unforeseen.

A random, freak rainstorm that comes out of nowhere to put out a fire, isn't foreshadowed. So, it is less tolerated. It will feel more like the writer is just making it up on the spot to solve problems. It won't feel integrated. Even if a writer does come up with an idea on the spot while writing, they usually need to go back and add in foreshadowing. This will make the plot more satisfying and cohesive.


4. Strong Plots Utilize the Protagonist's Agency

Another major sin of the deus ex machina, is that it often steals the protagonist's agency. In my recent post on what a protagonist actually is, I mentioned that a true protagonist influences the direction, the outcome of the story. A true protagonist is a "problem-solver" (or I may even say "re-solves" problems, for better or worse).

What the protagonist says and does should turn the direction of the story.

In other words, almost always, the protagonist's choice should be contributing to the major turning points. 

At the Council of Elrond, Frodo chooses to volunteer himself as the Ring-bearer, turning the direction of not only the scene, but the whole story itself.

In Star Wars, Luke chooses to rely on the Force and shut off technology to successfully shoot the Death Star, likewise turning the story.

And in The Hunger Games, Katniss chooses to risk suicide in an effort to save Peeta--again turning the story (and series).

The protagonist's choices should be contributing to every major turning point, and even many of the minor turning points, in the story. Their choices should lead to particular outcomes.

This is often critical to showcase at the climax, because this moment often completes the character arc and argues the theme.

Frodo chooses to keep the Ring, illustrating he has become corrupted by power. This speaks to his character arc and the theme (though of course, Lord of the Rings does have some variation, and Gollum choosing to attack Frodo and get the Ring, and Gollum dying in the lava, also cements his arc and contributes to theme).

Luke chooses to shut down tech and rely on the Force, illustrating he has put his trust in faith. This speaks to his character arc and the theme.

Katniss chooses to risk herself to save someone, illustrating she'll ultimately hold steadfast to her initial worldview--she won't sacrifice someone else to save herself. This speaks to her arc and the theme.

Often when a deus ex machina swoops in, it robs the protagonist and the story of this critical moment.

If someone from the Empire suddenly decided to go rogue and destroy the Death Star, Luke does not get to make his choice--the most crucial one that contributes to character arc, theme, and plot simultaneously. His agency at the climax doesn't really matter. This clearly weakens the story.


Fixing a Deus ex Machina

If you've written a deus ex machina, there is still hope. You can use these principles to help you fix it.

A deus ex machina is used to reach a desired outcome. So, work backward. You know the "effect," the outcome, you want, now think about what could "cause" it. What needs to be in place to get you there? Cause and effect > coincidence. And ideally, one of the "causes" will be what the protagonist chooses to do.

So, instead of having a pack of hungry wolves take out the antagonist coincidentally, consider what could cause the pack of wolves to find and target the antagonist. Perhaps the protagonist knows they are in the area, and she can do something to draw their attention. Or maybe she knows where they go, and finds a way to lure the antagonist there. Maybe she can find a place to hide, so they target him. Maybe she finds a way to put the scent of prey on the antagonist. The idea may need more work, depending on the story, but we've now created a sense of cause and effect and shown the protagonist exercising meaningful agency to bring it about.

We could also foreshadow the event by mentioning a wolf attack in the area earlier in the story, and by mentioning the wolves' resources are scarce, so they're starving. Maybe the protagonist knows and understands wolf packs (so by extension, so does the audience), so she knows just what to do with them.

By using these principles, we've already largely fixed a deus ex machina.

Let's look at some of my other examples.

The deus ex machina: A powerful, skilled minor character abruptly shows up to save the protagonist by defeating the antagonist at the end.

Possible fixes: The protagonist causes this situation, making the encounter happen--perhaps by arranging it beforehand, or realizing he can lead the antagonist toward that person, or by doing something else that indirectly (but clearly) leads to the event. Depending on the story, this may need to happen a bit earlier, so the audience forgets about it in the moment, but it nonetheless still has a clear bridge of cause and effect.

And ideally, this isn't a minor character that shows up out of nowhere, but a side or main character the audience has met before, and her skills were foreshadowed.

And it's best if the protagonist somehow deals the "deathblow" or paves the way to make that happen at the climactic moment. It's even better if the protagonist could somehow have this skill himself, but . . . that may not always work out. (And please keep in mind I'm talking about these things in general--obviously what you can do specifically, will depend on the framework of that story).

The deus ex machina: The protagonist suddenly finds a magical object that defeats the antagonist.

Possible fixes: Rather than having the surprise be the character suddenly discovering this object, have the protagonist actively searching for it, and have the fact it can defeat the antagonist be the surprise. Foreshadow that reveal, by indirectly alluding to the idea earlier. Have the protagonist put it together, and use the object against the antagonist. She knows how the magic works, so she realizes she can use it to defeat him. She connects the dots, given her background.

The deus ex machina: An unexpected rainstorm puts out a fire surrounding the heroes' homes.

Possible fixes: Foreshadow the rainstorm, early enough that the audience may forget about it. Don't use it to resolve all the problems. Have the characters' choices and efforts contribute more to the resolution. Perhaps, at minimum, they are able to slow the fire with hoses and buckets of water, so that it doesn't do severe damage, before the storm hits. They are able to hold it off (but it's becoming an increasing struggle). There is still tension and uncertainty, because we don't know if it will actually rain. But if they hadn't done what they did, certainly everything would have burned, before the storm ever arrived.

Or, you could change it, so that the storm doesn't save the day. The characters find a way to. 😉

Admittedly, some deus ex machinas are easier to fix than others. In some cases, you may just need to change the story more. Whatever the situation, though, let these principles be your guide:

- Put in more causes that lead to the effect

- Resolve problems based on knowledge and understanding

- Foreshadow the outcome

- Utilize the protagonist's agency

And as a note, the "knowledge" one and the "foreshadowing" one can often overlap.


Can a Deus ex Machina Ever Work?

Every rule in writing can be broken, but it should be broken for a good reason. It should typically be broken to make the story better, not worse. It shouldn't be broken out of ignorance or laziness. Almost always, a deus ex machina is not going to make a story better. However, that doesn't mean they don't ever show up in successful stories.

I will say, though, that when they do (arguably) show up in successful stories, the writers lessen the negative effects by trying to implement at least some of these principles (which is why I say "arguably").

For example, at the end of Jurassic Park, the T. rex suddenly shows up and takes out the raptors. Deus ex machina? Yes? Sort of? It is sudden and unexpected and resolves the major problem at the climax. But it lands . . . okay because we know there is a T. rex on the loose (and how and why it got loose), we already saw Alan and the kids deal with the T. rex, and we've been watching the characters actively deal with the raptors (exercising agency).

But if we never saw the T. rex prior and did not know about it, it would have landed horribly.

Does this deus ex machina make the story better?

The sudden appearance of the T. rex is a great callback, so I give it points for that. But theoretically, it would have been better if, after the initial surprise, Alan used what we'd learned about the T. rex to cause the rex and raptor encounter. He could have intentionally caused a great commotion to draw its attention, since rexes see based on movement.

However, as is, the story also gets away with it, because it's thematic. The main theme of Jurassic Park is that we can't control nature, and therefore need to respect it. The T. rex is one example of that (though it still would have been better if Alan had done more).

Indiana Jones: Raiders of the Lost Ark ends similarly. The villains open up the ark and die, while Indy is tied up. It resolves the major conflict, and it happens without Indy's contribution. While minor, Indy does still exercise a little bit of agency, by closing his eyes, and telling Marion to do the same. This also relates to the theme, which argues man shouldn't disturb the power of God, and Indy's (minor) character arc, which shows he's come to believe in the supernatural/God's power (to some degree), and respects it.

In contrast to these examples, we have Harry Potter and the Sorcerer's Stone, which has a sort of deus ex machina, as well. Out of almost nowhere, Harry is able to burn Quirrell with his hands. The contrast is that Harry is exercising strong agency in the moment--as he is the one making this happen and chooses to burn Quirrell and defeat him--but the concept was not foreshadowed nor was the knowledge obtained, unlike those other examples.

We do get a clear explanation of it all in the falling action, which connects to Harry's backstory--and that is something we did learn about. But theoretically, the story would have been better, if this possibility had at least been subtly foreshadowed. It would also be more effective if it were related to something Harry did. Perhaps he could have further "unlocked" this love-driven magic during the school year, as he learned to love his friends.

Yet like the other examples, this one is still very thematic and, like Indy's, relates to Harry's character arc. Harry learns in the story that love is the most powerful force (i.e. magic) in the world (the theme).

You're more likely to get away with a deus ex machina, if it at least relates to the theme and/or character arc, in addition to minimizing its negative effects, like these examples did.

And I want to point out that all of these characters were very active and exercised a lot of meaningful agency, prior to these exact moments.

Finally, I want to note that you are more likely to get away with a deus ex machina in the falling action. However, this arguably means it's not solving the main conflict, but rather, tying up smaller, remaining ones--tying up loose ends. After the protagonist has defeated the antagonist, then he discovers a magical object to fix a remaining issue. This still isn't ideal, and I don't recommend aiming for it, but you are more likely to get away with it after the climax has happened.

In the end, while a deus ex machina is certainly not what anyone should be aspiring to, we see that if the rest of the story is great, and its negative effects are minimized, the audience is willing to overlook it.

Though it probably rarely makes a story better.

Need help with a deus ex machina or other story issue? You may want to check out my services at FawkesEditing.com.

1 comment:

  1. One thing you didn't mention is how this deus ex machina ties into the inner development of the protagonist. E.g., if the MC has a sudden revelation about her own internal struggle, or power, and it allows her to handle to threat that she couldn't have done before. Now of course this can be foreshadowed.

    ReplyDelete

I love comments :)