on Writing Forward:
If you’ve ever read a story in which characters are rescued from a dire situation in a way that is truly unbelievable, you’ve probably experienced deus ex machina.
Deus ex machina is a literary device that is best avoided, if possible.
It occurs when a difficult or impossible situation is resolved through unlikely or unbelievable methods, often through supernatural intervention.