Deus ex machina
There are many examples of the same dramatic device in modern movies and novels. For example, in H.G. Wells's War of the Worlds, the aliens attacking Earth are suddenly killed by bacteria. The movie Monty Python and the Holy Grail makes fun of this plot device when the heroes barely escape from an animated monster because the animator died from a heart attack before finishing the movie's animation. Since the monster only existed in the animated scenes in the movie, the animator's death caused the monster to completely disappear from the movie.