In the Writer’s Glossary today…
Deus ex machina:
The term means “god from the machine” and comes from ancient Greek theatre, where actors playing gods appeared on
stage using cranes and pulleys. Today, it has come to mean a contrived plot device that introduces new characters, abilities or knowledge to get characters out of a sticky situation, against all odds.
Fantasy is often accused of using deus ex machina – characters use magic to solve everything or find a magical item at exactly the right time. The end of Lord of the Rings is probably the most famous example of this. Samwise and Frodo are stranded in Mordor, exhausted and unable to escape, until the eagles appear from nowhere and fly them out. The End.
The problem with deus ex machina is that your reader feels short changed. You’ve cheated because you couldn’t come up with a clever solution. Foreshadowing could be your friend here. A good rule of thumb is; use coincidence to get characters into trouble, but never to get them out.