When authors refer to other great works, people, and events, it’s usually not accidental. Put on your super-sleuth hat and figure out why.
While there are plenty of influences on The Lord of the Rings from early English and Anglo-Saxon poetry (see our "In a Nutshell" section of The Hobbit learning guide), all of Tolkien's direct references in The Return of the King are to his own mythology for Middle-earth, largely represented in The Silmarillion.