deus ex machina
the god from the machine
Today this word meansA sudden resolution that forces a story's knot apart.
Latin for "god from the machine." Greek theaters had a crane, the mēchanē, that lowered actors playing gods from the air.
It served endings where a plot too tangled to resolve was settled by a god descending to pronounce on it — Euripides was especially fond of it.
Aristotle criticized the device in the Poetics as lazy plotting.