deus ex machina

noun

1.
any active agent who appears unexpectedly to solve an insoluble difficulty