Writing October 3, 2026

What is a deus ex machina?

The hero is trapped, the odds are impossible, and then something arrives out of nowhere and fixes it. The relief lasts about four seconds, and then the reader feels robbed.

A deus ex machina is a resolution that arrives from outside the story to solve a problem the story could not solve itself. The cavalry nobody mentioned. A disease that kills the invaders. A long-lost relative with exactly the right fortune. The mechanism is always the same: the author has written their characters into a corner and then reached in from above to lift them out.

The test is not "is it unlikely". It is "could the reader have imagined this solution ten pages ago". If no, it is a rescue, not an ending.

Where the phrase comes from

It is Latin for god from the machine, and it is a stage direction before it is a criticism. In classical Greek theatre a crane — the machina — lowered an actor playing a god onto the stage to settle whatever the mortals had made a mess of. Euripides used the device often enough that he was criticised for it in his own lifetime, which is a useful thing to know: the complaint is roughly two and a half thousand years old.

What changed is the expectation. Ancient audiences accepted divine intervention as how the world worked. Modern readers hold a story to an internal contract: whatever solves the problem has to come from inside the book.

Why it feels like cheating

Because it retroactively cancels the tension you already spent. If anything can turn up and fix anything, then nothing that happened mattered, including the parts the reader cared about most. The emotional logic is blunt: the reader was worried on the characters' behalf, and the ending tells them the worry was unnecessary.

It also takes the decision away from the protagonist. A story is largely a record of someone choosing under pressure; hand the final choice to a coincidence and you have removed the only thing the ending was for. This is the same failure mode behind most unsatisfying finales, and we go through the repairs in how to write a satisfying ending.

What it is not

Three things get mislabelled constantly.

Set-up paying off is not a deus ex machina. If the ally who arrives in chapter thirty was introduced in chapter four, owes a debt established in chapter nine and was last seen heading in that direction, that is structure. The difference is entirely whether the groundwork exists — which is what foreshadowing is for.

Luck is not automatically a cheat if the story is about luck, or if the lucky break makes things harder. A coincidence that creates a problem reads as fate. The same coincidence solving a problem reads as authorial panic.

A misdirection is not a deus ex machina. A red herring points the reader the wrong way on purpose while the real answer sits in plain sight. That is fair play. A rescue with no real answer behind it is not.

How to spot one in your own draft

You will not feel it as cheating, because you know why the rescue exists — you needed it. Look for the symptoms instead. A new character or capability appearing in the last ten percent. A sentence that begins luckily. A solution you cannot explain to someone without starting the explanation in that same chapter. And the clearest tell: your protagonist is passive in their own climax, receiving the resolution rather than causing it.

Middles are where these get manufactured, incidentally. A sagging middle that has stopped generating consequences leaves the ending with nothing to build on, so the author imports something. If your climax needs a miracle, the bug is usually several hundred pages upstream — see how to write the middle of your book.

Three ways to fix one

Plant it earlier. Often the solution is fine and only the timing is wrong. Introduce the person, object or ability in the first third doing something else entirely, and the ending converts from a rescue into a payoff with no plot change at all.

Make the character cause it. If help arrives, let it arrive because of a choice they made — a kindness done, a message sent, a risk taken. Earned help is not a deus ex machina; it is a consequence.

Charge a price. A rescue that costs something stops feeling free. If the cavalry arrives but the town is gone, the reader is not cheated, because the problem was not simply deleted.

Catching it before publication

This is one of the few craft problems a reader diagnoses better than the writer, and the question to ask is narrow: did the ending feel earned. Two or three honest answers are enough, and how to get feedback on your writing covers how to ask without steering them.

We make Arwy, an Android app for publishing a story chapter by chapter, and it is genuinely useful for this because readers react while you are still writing — you can tell from the comments on chapter eighteen whether anyone is expecting the thing you plan to use in chapter twenty-five. It is less useful if you want structural notes on a finished manuscript; that is a job for a developmental editor or a careful writing group, not a reading app.


Stuck on an ending that only works by accident? Arwy is on Google Play.

Writing something yourself? Everything we know about publishing it — free guides, how rights work, and what you can actually earn — is collected on Arwy for writers.

← All posts