You want the ending of a screenplay to be satisfying. You want the hero to overcome great obstacles to succeed in the end. Or to fail if it is a tragedy. Or even win in one way and loose in another, usually in a complex drama. But what you don’t want is for the hero to be rescued by an omnipotent force that could have rescued the hero long before the end. In fiction, such a force is called deus ex machina (God from machine). It comes from ancient Greek plays where the playwright often put the hero into so much trouble that they didn’t know how to get him or her out of it. So, instead of trying to figure out a way for the hero to do it, they just lowered a God onto the stage by a machine and made the God solve all the problems and sort everything out.
Don’t do this!
When you watch a film with a deus ex machina ending, you feel cheated. Why did I sit through this two hour film (or four hour play) if the problem could have been solved so easily? Just because the screenwriter was lazy?
Deus ex machinas are usually only found in bad B-movies, but occasionally they sneak into big budget movies as well. The eagles in The Hobbit (and in The Return of the King) are examples of that. When everything seems lost, they just swoop in a save the day. Granted, a big part of the battle has already been won by the heroes in those movies, but the outcome is still uncertain. Why couldn’t the eagles just have picked Frodo up at the beginning of the first movie and dropped him off at mount Doom?
In the case of The Return of the King is not the fault of Peter Jackson, Philippa Boyens and Fran Walsh. It was J.R.R Tolkien himself that came up with that ending. Maybe he was tired after writing a thousand pages and wanted to move on to something else. Maybe he thought he could get away with it. And he was probably right. But that doesn’t mean that you can! Deus ex machina endings usually spoils the whole movie. So, if you’ve put the hero into a situation that you can’t get him or her out of, think again! Don’t call in a God, or the eagles.