Deus ex machina is a Latin phrase translating as "god out of the machine." It refers to a convention in Ancient Greek plays where an actor playing a god would rise onto the stage on a lift or be lowered from a crane, and would resolve the plot in a favorable manner. "Deus ex machina" thus refers to an sudden and/or improbable character or event occurring near the climax to resolve the plot.
In modern usage, machina may be omitted as implied.
See Special:Whatlinkshere/Etymology:Deus ex machina for a list of articles using this term.