Definitions & Industry Terms

What is deus ex machina?

By the WriteLoom editorial teamUpdated 2026-06-07

Plan, draft, edit and pitch the same book in one project.

Start free in the Plan studio
Key facts
  • Deus ex machina is an abrupt, unearned plot resolution.
  • An external force resolves the conflict from nowhere.
  • The term comes from ancient Greek theater.
  • It is considered a flaw because nothing sets it up.
  • Proper foreshadowing turns a "rescue" into an earned solution.
Direct answer

Deus ex machina (Latin for "god from the machine") is a plot device where a seemingly unsolvable problem is suddenly resolved by an unexpected, unearned external force — a rescuer, coincidence, or power that appears from nowhere. Originating in Greek theater, where gods were lowered onstage to resolve plots, it is now considered a storytelling flaw because it bypasses earned conflict and feels like a cheat. A solution properly foreshadowed and set up earlier is not a deus ex machina — it is an earned payoff.

Chapter i·Why it matters

Deus ex machina names one of the most damaging ending mistakes: resolving a story with something unearned that makes the preceding struggle feel pointless. Readers feel cheated when problems are solved by lucky coincidence or a power introduced at the last second. Understanding the device — and that the cure is setup and foreshadowing, which transform a convenient rescue into an earned solution — helps writers craft endings that satisfy rather than deflate, which is central to a payoff that works.

Chapter ii·What to include

  • A sudden, unearned resolution.
  • An external force from nowhere.
  • The Greek-theater origin.
  • Why it reads as a cheat.
  • Foreshadowing as the fix.
  • The contrast with an earned payoff.

Chapter iii·Example

A novel's heroes are trapped with no way out, when an unmentioned ally suddenly arrives with exactly the right power to save them — a deus ex machina that makes the danger feel meaningless. Had the ally and ability been planted earlier, the rescue would have been an earned payoff instead of a cheat.

In WriteLoom

Everything this article talks about, in one project

WriteLoom's Plan studio tracks your setups and payoffs, so resolutions are earned, not deus ex machina.

Start free in the Plan studio7 days of everything, no card. Free forever to write.

Not ready for a workspace yet? Get the free six-part series on winning the writing game: finishing drafts, editing in the right order, querying with real math, and launching on a runway.