Deus ex machina
For example, in Euripides' play Alcestis, the heroine agrees to give up her own life in order to spare the life of her husband, Admetus. At the end Heracles shows up and seizes Alcestis from Death, restoring her to life and to Admetus. A more frequently cited example is Euripides' Medea in which the deus ex machina is used to take Medea (who has murdered people and babies) away from her husband Jason to the safety and civilization of Athens.