Glossary:Deus ex machina

A deus ex machina is a literary device, a way of ending a plot by bringing in an outside element to accomplish what the main characters have been unable to throughout the story. To qualify as deus ex machina, the means of ending the story (defeating the villain, saving the world, etc.) must have been no more than hinted at during the story, or possibly not mentioned at all. It must be done by a person or element which is outside of the influence of the main characters (although bringing in a main character from another story would count- for example, if the Fantastic Four spent five issues fighting Dr Doom, then on the last page Wolverine arrived and stabbed him), and it must completely resolve the story.