Eucatastrophe is a term coined by J. R. R. Tolkien which refers to the sudden turn of events at the end of a story which ensure that the protagonist does not meet some terrible, impending, and very plausible doom. He formed the word by affixing the Greek prefix eu, meaning good, to catastrophe, the word traditionally used in classically-inspired literary criticism to refer to the "unraveling" or conclusion of a drama's plot. For Tolkien, the term appears to have had a thematic meaning that went beyond its implied meaning in terms of form. In his definition as outlined in his 1947 essay On Fairy-Stories, eucatastrophe is a fundamental part of his conception of mythopoeia. Though Tolkien's interest is in myth, it is also connected to the gospels; Tolkien calls the Incarnation the eucatastrophe of "human history" and the Resurrection the eucatastrophe of the Incarnation.
Examples in Tolkien's work 
It could be said that the climax of The Lord of the Rings is a eucatastrophe. Though victory seems assured for Sauron, the One Ring is permanently destroyed through Gollum's carelessness, and with it the Dark Lord and his fortress of Barad-dûr. This occurs despite Frodo, the chief protagonist, giving in to the will of the Ring and claiming it for himself. Essentially, it is an ostensibly dire situation which is nevertheless salvaged through some unforeseeable turn of events.
Another clear example of eucatastrophe is the recurring role of the eagles as unexpected rescuers throughout Tolkien's writing. Tolkien described Bilbo's "'eucatastrophic' emotion" at the eagles appearance in The Hobbit as one of the key moments of the book.
Distinction between Eucatastrophe and deus ex machina 
"Eucatastrophe" is often confused with deus ex machina, in that they both serve to save the protagonist. The key difference is that the eucatastrophe fits within the established framework of the story, whereas the deus ex machina, the "God from the machine", suddenly and inexplicably introduces a character, force, or event that has no pre-existing narrative reference.
In Tolkien's epic novel The Lord of the Rings, while some of the events may seem unlikely or even impossible, they still remain consistent with the overall story. The One Ring holds almost all of Sauron's power and his entire life force. If the ring is destroyed, so is Sauron. His destruction will also bring about the destruction of his stronghold, which is only held together by his power. This will in turn panic his followers, who flee or are killed in the ensuing destruction. It is a sudden, massive change that totally alters the landscape of what happened previously in the story, yet, unlike a deus ex machina, is completely consistent with the theme and story. The destruction of the One Ring event is a definitive resolution but not an incongruous one or illogical in terms of the story and setting. The protagonists are depicted as being aware from the start that destroying the ring will have such world-changing effects, and as such its destruction is the primary focus of the story.
See also 
- Mazur (2011). Encyclopedia of Religion and Film. ABC-CLIO. p. 174. ISBN 0313013985.
- Tolkien, J.R.R. (1990). The Monsters and the Critics and Other Essays. London: HarperCollinsPublishers. pp. 109–161. ISBN 0-261-10263-X.
- Tolkien, J.R.R. (1990). The Monsters and the Critics and Other Essays. London: HarperCollinsPublishers. p. 156. ISBN 0-261-10263-X.
- Tolkien, J. R. R., Humphrey Carpenter, and Christopher Tolkien. "Letter 89." The Letters of J.R.R. Tolkien. Boston: Houghton Mifflin, 1981. N. pag. Print.
- Solopova, Elizabeth (2009), Languages, Myths and History: An Introduction to the Linguistic and Literary Background of J.R.R. Tolkien's Fiction, New York City: North Landing Books, p. 29, ISBN 0-9816607-1-1