Deus ex machina - Wikipedia
Deus ex machina (/ ˌ d eɪ ə s ɛ k s ˈ m æ k ɪ n ə,-ˈ m ɑː k-/ DAY-əs ex-MA(H)K-in-ə, Latin: [ˈdɛ.ʊs ɛks ˈmaːkʰɪnaː]; plural: dei ex machina; English 'god from the machine') is a plot device whereby a seemingly unsolvable problem in a story is suddenly and abruptly resolved by an unexpected and unlikely occurrence. Its function can be to resolve an otherwise