See - deux ex machina.
JK Rowling, having wrote six books about Harry Potter and his quest to defeat a really really really inbred evil guy, realised in the course of writing the seventh that she could not think any no way for Harry to kill a much older and much more powerful enemy. So she invented the Deathly Hallows.
(Although it turned out the really really really inbred evil guy was a pathetic weak pansy with constant PMS.)
17👍 43👎