In this post, I want to talk about why you should be careful with deus ex machina when resolving a conflict in a story. I’ve made this mistake myself on occasion, so I hope my experience—and what I’ve learned from it—can help you avoid it.
The expression deus ex machina comes from Ancient Greek theatre. In some plays, a god would appear near the end of the story, sometimes lowered onto the stage by a mechanical device, to intervene and resolve a conflict that the human characters could not solve themselves.
Within the conventions of those plays, this kind of ending could make sense. For modern readers, however, a sudden solution that has not been prepared by the story can easily feel artificial.
What Is “Deus Ex Machina”?
A deus ex machina occurs when a major conflict is resolved by a character, event, or element that appears unexpectedly and has not been properly established by the story.
Imagine, for example, that I tell you a drama about a woman dealing with serious family problems. The situation becomes increasingly complicated until, just before everything falls apart, a stranger with magical powers suddenly appears and solves all her problems.
Unless the story has somehow prepared us for that possibility, the ending would probably feel like a cheat.
I like to think of fiction as a game whose rules are established at the beginning of the story. Readers are willing to accept almost anything—magic, ghosts, impossible technologies, talking animals—as long as the story teaches them how its world works and then remains consistent with those rules.
That is why deus ex machina can be so frustrating. The problem is not necessarily that the solution is impossible or unlikely. The problem is that it feels as though the author has suddenly changed the rules in order to escape from a difficult situation.
When that happens, readers may feel cheated rather than surprised.
Does “Deus Ex Machina” Always Involve Something Supernatural?
Not at all.
Although the expression retains the word deus because of its theatrical origins, a deus ex machina can be completely realistic.
It might be a character who suddenly appears with exactly the information the protagonist needs, an army that arrives unexpectedly to save everyone, a convenient inheritance, an accident that removes the villain at precisely the right moment, or an extraordinary coincidence that solves the central conflict.
Imagine a crime novel in which the protagonist, a detective, spends the entire story following clues and trying to identify the murderer.
Near the end, the detective happens to discover that the killer is the victim’s upstairs neighbor—a character who has never appeared or even been mentioned before. The detective has not solved the mystery by interpreting the clues; the answer has simply fallen into their hands.
Something like this could certainly happen in real life.
But fiction operates differently. Readers expect important resolutions to grow out of the elements the story has already given them.
The problem is therefore not coincidence itself, but coincidence being used to solve a conflict that the story has spent a long time building.
How Can You Spot a Deus Ex Machina Before It Happens?
It is not always easy to notice when your story is heading in this direction, especially while you are immersed in the first draft.
However, there are a couple of questions that can help.
1. Are You Complicating the Story Too Much?
Sometimes we keep adding obstacles, twists, and complications because we want to maintain the reader’s interest.
But if every new problem makes the situation more difficult without bringing the story closer to a possible resolution, you may eventually reach a point where there seems to be no believable way out.
And that is when a deus ex machina can become tempting.
Conflict is essential, but complications should not exist merely for the sake of making things worse. Ideally, they should also create possibilities, force characters to make decisions, and move the story toward its resolution.
2. Do You Know How the Main Conflict Will Be Resolved?
You do not necessarily need to know every detail of your ending before you begin writing.
But it can be useful to have at least some idea of how the central conflict might be resolved—especially if your story contains several interconnected plots.
Otherwise, you may reach the final chapters and discover that the situation you have created cannot be solved using the characters, information, and possibilities already present in the story.
A simple outline can help prevent this. You do not need to plan every scene, but knowing roughly where you are going can save you from having to invent a convenient solution at the last minute.
What Can You Do If Deus Ex Machina Seems Like the Only Solution?
Suppose you have already written most of your story and suddenly realize that the only way to resolve the plot is through an external element that has never appeared before.
Does that mean you have to throw everything away?
Fortunately, no.
The solution may already work. You may simply need to prepare it earlier.
This connects with the principle commonly known as Chekhov’s gun: if an important element is going to play a decisive role later in the story, it should usually be established beforehand.
A deus ex machina often does the opposite. It is like firing a gun in the final chapter that the reader never knew existed.
So if you discover that your ending depends on something that comes out of nowhere, go back through the story and ask yourself where that element could have been introduced naturally.
Here are two possibilities:
1. Rewrite the Rules of the Game
Suppose chance or coincidence really is the best way to resolve your plot.
Instead of eliminating it completely, you may be able to establish from the beginning that chance plays an important role in the world of the story.
The important thing is that the ending should feel consistent with what has come before.
If an apparently impossible event suddenly saves the protagonist in a realistic story where nothing similar has ever happened, readers may reject it. But in a story where unlikely coincidences, fate, or supernatural forces have already been established as part of the narrative logic, the same event may feel perfectly appropriate.
2. Introduce the “Gun” Earlier
Let’s return to our crime novel.
If the upstairs neighbor is going to turn out to be the murderer, introduce that character earlier.
Perhaps the detective meets him on the stairs. Maybe he offers apparently useful information. Perhaps he becomes part of a minor subplot, gives the detective a false lead, or is briefly considered a suspect before being dismissed.
Now, when the truth is revealed, the murderer has not appeared out of nowhere.
The reader may still be surprised, but the solution belongs to the story.
Of course, this requires subtlety.
If you draw too much attention to the neighbor when he first appears, readers may immediately identify him as important and guess the ending.
The goal is not to announce the solution in advance, but to make sure that, once it is revealed, readers can look back and see that it was possible all along.
A good mystery—or any effective plot twist—works a little like a magic trick. The audience knows there is a trick, but they should not see exactly how it is being done.
The same principle applies to deus ex machina.
Surprise your readers, certainly.
Just make sure the surprise grows out of the story you have already told.