Deus ex machina - Deus ex machina is a Latin phrase that is used to describe an unexpected, artificial, or improbable character, device, or event introduced suddenly in a work of fiction or drama to resolve a situation or untangle a plot (e.g., having the protagonist wake up and realize it was all a dream or an angel suddenly appear to solve all the plot problems of a story that won't resolve itself by the characters). The phrase has been extended to refer to any resolution to a story which does not pay due regard to the story's internal logic and is so unlikely it challenges suspension of disbelief; allowing the author to conclude the story with an unlikely, though more palatable, ending. In modern terms the deus ex machina has also come to describe a person or thing that suddenly arrives and solves a seemingly insoluble difficulty. While in storytelling this might seem unfulfilling, in real life this type of figure might be welcome and heroic.
http://www.blognow.com.au/strangephrasesandquotations