Unmistakable Deus Ex Machina Examples in Literature

greek theatre production of the tragedy agamemnon
    greek theatre production of the tragedy agamemnon
    Stefano Bianchetti / Corbis Historical / Getty Images

You may have heard the term deus ex machina in reference to a book, play, or movie. But what does it mean, and where does it come from? Keep reading to learn about the history of deus ex machina and see how it applies to several examples in literature.

Meaning of Deus Ex Machina

Deus ex machina is a term from ancient Greek and Roman theatre. It’s Latin for “god from the machine,” and references a common drama practice in which a crane would lower an actor dressed like a god. The god would typically appear at difficult times in plot to solve the characters’ problems.

The modern meaning of deus ex machina references this classic resolution technique. Nowadays, the term describes any plot device, not necessarily a god, that wraps up a complicated conflict. It’s usually used as a criticism when a reader feels that the resolution came too easily and wasn’t earned by the character’s actions.

Deus Ex Machina Examples in Literature

Think about a book or movie with an unsatisfying ending. Perhaps the hero was saved by a character who hadn’t been introduced before, such as the woodsman in “Little Red Riding Hood” or the fairy godmother in “Cinderella.” Read these examples of books and plays that are often criticized for using a deus ex machina to get their characters out of a sticky situation.


Ancient Greek tragedian Euripides was one of the first writers to use an actual deus ex machina in the form of the sun god Helios. Medea, Euripides’ tragedy about the wronged lover of Jason, focuses on Medea’s desire for revenge. She first kills her husband Jason’s new wife, Glauce, with poisoned robes, which also kill Glauce’s father, Creon.

However, Medea is not satisfied, and she decides to kill her own children to hurt Jason even further. She takes a knife offstage, where the sound of screaming can be heard…

...until Helios’ chariot soars across the stage with Medea and her children in tow. They flee to Athens, never to see Jason again. Staging Medea involved a crane that could hoist Helios, Medea, and her children high above the stage.

jason and medea in euripides
    jason and medea in euripides
    Print Collector / Hulton Archive / Used under Getty Images editorial license

As You Like It

William Shakespeare preferred to end his comedies with a wedding. But in As You Like It, the comic misunderstandings seem so entangled that there could be no happy ending. Rosalind, dressed as the male shepherd Ganymede, is in love with Orlando but promised to Phoebe. Celia is in love with Oliver, Audrey has left William for Touchstone, and no one knows what’s going on. The situation seems bleak, until…

...Hymen, the god of marriage, intervenes in the final act of the play. He straightens the entire mess out, links each partner to each other, and clears up all misunderstandings.

Lord of the Flies

The deserted boys in William Golding’s Lord of the Flies have spent the entire novel both building and tearing down their fragile society. When rescue fails to come, despite the ongoing signal fire, the boys lose hope and turn violently against each other. It seems that all is lost…

...before a navy ship docks onto the island, rescuing the boys. Their very precarious social and moral predicament is suddenly solved without any effort on their part. This deus ex machina serves a thematic purpose, however, as the boys must face their inhumane behavior through the eyes of the naval officer.

Lord Of The Flies lobby card 1963
    Lord Of The Flies lobby card 1963
    LMPC / LMPC / Used under Getty Images editorial license

Harry Potter and the Chamber of Secrets

Readers of J.K. Rowling’s Harry Potter and the Chamber of Secrets may have noticed a deus ex machina in the book’s climax. After entering the legendary Chamber of Secrets, Harry finds himself face to face with Tom Riddle, the younger version of the evil wizard Voldemort. Riddle sends a basilisk – an enormous fanged snake – after Harry. Things seem hopeless for Harry, until…

...a magical Phoenix flies into the Chamber, dropping the sorting hat in front of Harry. Inside Harry finds the sword of Gryffindor, which he uses to kill the basilisk. The Phoenix’s tears even heal Harry’s wounds. Professor Dumbledore later reveals that Harry’s loyalty caused the Phoenix to fly to him, but many consider this moment to be a deus ex machina.

My Sister’s Keeper

Jodi Picoult’s tragic novel My Sister’s Keeper features a sister at a crossroads. Anna was essentially born to be a marrow donor for her older sister, Kate. As such, she has spent much of her life feeling minimized by her parents. When Kate needs a kidney, all eyes turn to Anna, who refuses to donate one of hers. A moral struggle continues with no solution in sight, until…

...Anna is in a car accident at the book’s climax, which renders her braindead. She becomes an organ donor before her parents disconnect her from life support. Kate has her life saving kidney, and their parents are faced with an ironic tragedy that took their overlooked daughter away from them.

The Importance of Plot Structure

While a deus ex machina can illuminate a book’s literary themes, it can leave the reader feeling a bit unfulfilled. It’s important to plan out a plot so that the character’s resolution feels earned. For more tips on plotting a story, check out an article about the essential elements of storytelling.