A story can have a big surprise.
Sometimes a story has a big problem. The characters cannot fix it on their own. 
Sometimes a story has a huge problem. The characters cannot fix it. Then, something sudden and unlikely happens to solve it. This is called a deus ex machina. This is a Latin phrase. It means "god from the machine."
In ancient Greek theater, actors used real machines. They used a crane to lower gods onto the stage. They also used a riser to bring them up. This made the audience feel wonder and surprise. A famous example is the play Medea. In that story, the sun god sends a chariot to save Medea. 
Many people think this is a bad way to write. They say it feels too easy or lazy. It can break the logic of a story. But some people like it. They say it can be a grand way to end a play. It can show how humans relate to gods. Even modern stories use it. In the movie Avengers: Endgame, some fans felt a character's arrival was a deus ex machina. It is a tool that can change how a story feels.
Have you ever watched a story where the characters face a problem that seems impossible to solve? Suddenly, something unexpected and very unlikely happens to fix everything at once. This storytelling trick is called a deus ex machina. The name is a Latin phrase that means "god from the machine." It is used to bring a happy ending or to surprise an audience. Sometimes, writers use it to make a funny moment in a comedy.
This idea comes from the way ancient Greek plays were performed on stage. Actors playing gods used real machines to appear before the crowd. They might use a crane, called a mechane, to lower them from above. Other times, they used a riser to bring them up through a trapdoor. These machines helped the gods enter the story in a spectacular way. The audience would feel great wonder and astonishment when they saw them. 
Many famous writers from long ago used this special device. An actor named Aeschylus first used it in his play Eumenides. Later, a playwright named Euripides used it very often in his tragedies. In his play Medea, the sun god Helios sends a dragon-drawn chariot to save her. In the play Alcestis, the hero Heracles appears to bring a woman back to life. Some critics believe Euripides was the one who truly made this tool famous.
Even though it is an old idea, we still see it in modern stories. For example, the writers of the 2019 film Avengers: Endgame used a time travel plot. Some people felt the sudden arrival of Captain Marvel was a bit like a deus ex machina. In the book Lord of the Flies, a navy officer arrives to save the children. J.R.R. Tolkien’s stories also feature the Great Eagles helping Frodo and Samwise. These moments can feel very sudden to the people watching or reading.
Not everyone thinks a deus ex machina is a good way to write. The famous thinker Aristotle said that a story's ending should come from the actions within the plot. Many critics today say it can feel lazy or too easy for the characters. They feel it can break the logic that makes a story feel real. However, some people argue it can be a powerful way to show how humans connect with the divine. It remains one of the most debated tools in all of storytelling.
A deus ex machina is a specific type of plot device used in storytelling. It describes a denouement, or an ending, where an unsolvable problem is suddenly resolved. This resolution comes from an unexpected and unlikely occurrence. Writers use this technique to resolve irresolvable situations. It can also be used to surprise an audience. Sometimes, it serves as a tool to bring a happy ending. In other cases, it functions as a comedic device.
The term is a Latin calque, which is a word-for-word translation. It means "god from the machine." This name comes from the conventions of ancient Greek theater. In these plays, actors playing gods were brought onto the stage using physical machines. One type of machine was a crane, known as a mechane, used to lower actors from above. Another method involved a riser that brought actors up through a trapdoor. These mechanical interventions allowed deities to enter the drama in a spectacular way. This created a feeling of wonder and astonishment in the Greek audience. 
Ancient Greek playwrights used this device in various ways. Aeschylus is credited with introducing the idea in his play Eumenides. However, the device became an established stage machine through the works of Euripides. More than half of the surviving tragedies by Euripides employ a deus ex machina. One famous example is found in his play Medea. In this story, the sun god Helios sends a dragon-drawn chariot to rescue Medea. This chariot carries her away from Jason to safety in Athens. Another example is the play Alcestis. In that play, the hero Heracles appears to seize Alcestis from Death and restore her to life.
This device has appeared throughout history in many different forms. In the 1650 play Andromède, characters ascend into heaven to become gods. William Shakespeare used the device in plays like As You Like It and Cymbeline. During the 17th and 18th centuries, writers used it for political reasons. In Molière's Tartuffe, an agent of King Louis XIV saves the heroes. This helped make a controversial thesis more palatable to the ruling powers. Even comedy uses the device, such as in Aristophanes' Thesmophoriazusae. In that play, the playwright Euripides is parodied by being brought on stage via the mechane.
Modern storytelling also contains many examples of this technique. In the 2019 film Avengers: Endgame, the time travel plot was used to solve a corner the writers had written themselves into. Some critics also noted that Captain Marvel's sudden arrival in the final battle felt like a deus ex machina. In literature, J.R.R. Tolkien's Great Eagles carry Frodo and Samwise out of Mordor. This has been critiqued as an unlikely resolution. Similarly, a navy officer rescues the children in Lord of the Flies. William Golding called this a "gimmick," though others see it as a true deus ex machina. Even H.G. Wells used it when Martians are suddenly killed by bacteria in The War of the Worlds.
Despite its popularity, the device faces heavy criticism from scholars and writers. Aristotle was one of the earliest critics in his work, the Poetics. He argued that a plot's resolution must arise internally from previous actions. He believed that using a god to fix a plot could be seen as a lack of creativity. Many modern critics agree, stating it damages a story's internal logic. They feel it challenges the reader's suspension of disbelief because it is too unlikely. Friedrich Nietzsche also criticized the device. He believed it created a false sense of consolation and represented a shift in Greek culture.
However, some scholars defend the use of the deus ex machina. They argue it is an integral part of certain plots. In the case of Euripides, many plays began with the meddling of gods. Therefore, it was natural for the gods to finish the action. Some believe the device allows mortals to probe their relationship with the divine. It can also be a spectacular agent of subversion. It can challenge cultural assumptions or undercut standard genre conventions. Even in comedy, such as Monty Python's Life of Brian, the unlikeliness is used deliberately for effect. This shows that the device remains a complex and debated tool in art.
🖼️ Images & Media (2)
More to explore
✨ What else?
Related topics you might enjoy
🪜 Step back
Simpler topics to build understanding
What is Nepedia?
A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.