You know those stories where the ending comes out of nowhere and blindsides you with an other-worldly force that saves the main character from certain death and annihilation? They’re frustrating, right? Why have the main character suffer through countless trials and tribulations only to have a divine presence swoop in and save him or her?
It’s called "deus ex machina" and it’s a literary device that experts recommend you avoid.
What is deus ex machina?
The term is Latin and means "god out of the machine." It refers to the circumstance where you introduce a divine character at the denouement to resolve a story’s conflict once and for all. In ancient Greek theater, a crane would lower actors or statues portraying a god or gods onto the stage to set things right. It was completely unexpected.
Most creative writing professors, agents, and publishers strongly recommend you not use deus ex machina to get your main character out of his or her predicament at the climax of your novel. Why? Because it’s inherently unsatisfying for readers.
What deus ex machina is not
It’s not a plot twist. It’s not something you can throw in to keep your readers from guessing how your main conflict culminates. In no way, shape, or form does the appearance of a divine character who makes it all better contribute toward your character arc.
Deus ex machina does not make your character grow and change, nor does it change the meaning or understanding of your story. What it does is tell your reader that the conflict was unsolvable or hopeless. And you couldn’t think of a better way to get your main character out of their predicament.
Do you believe in Divine Intervention? If you do, deus ex machina might work in books you read. If you don’t, it looks like a cop-out. So what’s a writer to do when she or he has painted the main character into an untenable situation?
One of the worst deus ex machina devices used in literature and movies is the final scene that shows "it was all a dream." Think about a popular TV series where everything that happened over the course of a series was reversed at the end because "it was all a dream." We won’t name names, but it seriously rankled the viewing audience.
Nature, karma, the Divine Other—whatever you want to call the interfering power—if something other than your main character drops a bridge on the bad guy in the last seconds of your novel, your readers will huff and chuff.
Unless you set that bridge up earlier in your story. However, that defeats the whole premise of deus ex machina, which is by its very nature a sudden and unexpected turn of events.
But seriously, sometimes writers get away with it
Think about the movie The Matrix Revolutions. The Sentinel army is about to destroy Zion when Neo travels to the Machine City (no pun intended, I’m sure) to ask the God-like computer for peace. The computer agrees and stops the attack. Instantly. What was the computer’s name? Deus Ex Machina. Quirky coincidence? Probably not.
Think about some of your favorite old westerns where the cavalry arrives to save the day at the last moment. Deus ex machina? Probably. Or how about The Wizard of Oz? Was it mere chance or divine intervention that helped kill the Wicked Witch and send Dorothy home after all?
A perfect example of deus ex machina that actually works is Stephen King’s The Stand. It’s hundreds of pages of character arcs and plot twists that make you wonder how the good guys will win. And then the actual "Hand of God" comes down from the sky and detonates a live nuke to wipe out the whole community of bad guys, leaving only the good guy community still standing.
Where The Stand works is through the very subtle insinuation that "God" has their back. Every main character seriously doubts that this is real or possible, but they push forward because they understand there is no alternative. It’s either them or the bad guys. And only God knows what will happen when they meet.
In fact, the good guys sacrifice themselves at the end when the "Hand of God" comes down from the sky to detonate the atom bomb. But the detonation satisfies readers because one character—and one character only—believed this would be the culmination of months of preparation and hard work to get to this place/phase. And she died well before the end.
King leads readers all along the character arc of those who discount or discredit the "God" angle. In fact, none of the characters at the end believe God has anything to do with the final denouement. They’re just as astounded as readers are when it happens.
Reading satisfaction. Unless you’re not a King fan, then it may seem disingenuous. Slippery slope for the rest of us.
Shakespeare even drops his compass to include deus ex machina in some of his works. For example, As You Like It features deus ex machina with an absurd conclusion. Duke Frederick, the villain, meets a religious man and suddenly gives up his power to become a peace-loving man. A happy ending for all.
Is deus ex machina "Persona Non Grata" in fiction? Most people would say, "Yes." But maybe you can build the case for Divine Intervention like Stephen King did. The Stand was one of his most popular novels to date.
James Bond movies use a bit of deus ex machina to get him out of predicaments, and we don’t bat an eyelash. Sometimes Bond whips out a fancy new weapon that saves the day, but the viewing audience didn’t know about beforehand. We accept it, however, because it’s James Bond. He has all the cool tools.
What side of the fence are you on? Let us know in the comments.