a god introduced by means of a crane in ancient Greek and Roman drama to decide the final outcome
deus ex machina
noun(de-us ex ma-chi-na)
a person or thing (as in fiction or drama) that appears or is introduced suddenly and unexpectedly and provides a contrived solution to an apparently insoluble difficulty