Device in movies whereby a sudden intervention resolves a plotline (4,2,7)
I believe the answer is:
deus ex machina
(Other definitions for deus ex machina that I've seen before include "Late delivery" , "An unlikely solution" , "Unexpected problem solver" , "Happy-ending contrivance (Lat.)" , "Contrived agent who unexpectedly solves the insoluble" .)