somebody or something, e.g. in fiction or drama, that appears or is introduced suddenly and unexpectedly and provides a contrived solution to an apparently insoluble difficulty
The beast is evidently as much of a pawn as Jonah; its providential appearance just as the sailors are tossing Jonah overboard smacks far too heavily of a deus ex machina — Julian Barnes
In Greek theatre actors representing gods were suspended above the stage on a kind of crane, by which they could be lowered to intervene in the action and bring about the denouement
Latin deus ex machina a god from a machine, translation of Greek theos ek mēchanēs. In Greek theatre actors representing gods were suspended above the stage on a kind of crane, by which they could be lowered to intervene in the action and bring about the denouement