The Battle for Power
When The Lord of the Rings came out, there were many people who compared the War of the Ring in Middle-earth to the events of the Second World War. There is little doubt that the Second World War served as a backdrop for the development of the story, just as Tolkien’s own experiences in the trenches during the First World War had done before it. The war was also part of the framework of the story in, for example, C.S. Lewis’ books about Narnia.
However, Tolkien himself denounced comparison of the events in his universe to those in the real world. He did not in any way wish to make an allegory of contemporary events. In his letters, he explains that he has always despised allegories. Tolkien wanted the story to encourage the readers’ own interpretations and reflections.
If a concrete reason for Tolkien’s conscious attempt to create a mythical ancient world has to be pinpointed, it was not so much the events of the Second World War, but a reaction to the dissolution of the British Empire, which the the author deplored. So in this respect, Tolkien’s work is much more retrospective than forward-looking.