Peter Jackson's epic The Lord of the Rings trilogy is jammed packed with characters, subplots and backstory. Nonetheless, a lot of Tolkien's original story was cut out of the films. Based on the books by J.R.R. Tolkien, The Lord of the Rings is an expanded sequel to Tolkien's 1937 children's novel, The Hobbit. The story follows an epic quest to stop the Dark Lord Sauron, who crafted the One Ring to use as the ultimate weapon to conquer the world.

A group of fighters, that includes all peoples of Middle-earth, ban together with a mission to destroy the Ring once and for all. Told mainly through the eyes of four hobbits who bear the fate of the world on their small shoulders, the novels were adapted into three films, starting with 2001's The Fellowship of the Ring. Despite being 178 minutes long, the film was forced to compact a lot of Tolkien's backstory. As a result, certain things in the film are only clear to those who've read the book, such as the door to Moria.

RELATED: Lord of the Rings: How Aragorn Eventually Died

In The Fellowship of the Ring film, there is a scene where the fellowship decides to take a shortcut through the Mountains of Moria. They come across the Doors of Durin, a massive set of doors that requires a password to enter. Even though the doors were crafted by Dwarves and mark the entrance of a Dwarvish homestead, the scripture on them is written in Elvish. The riddle reads "speak friend, and enter," with the answer being "Mellon," the Elvish word for friend.

The Fellowship of the Ring never explains why, and for those who've never picked up Tolkien's novels, it probably doesn't make much sense. Elves and Dwarves are supposed to despise each other, so having a door leading to a mountain inhabited by Dwarves but accessible to Elves probably seems bizarre.

RELATED: Lord of the Rings: Where Frodo Goes at the End of the Series

Lord-of-the-rings-Gandalf-Balrog

The reason, though, is actually quite simple. The Doors of Durin date back to the time of peace between the Elves and Dwarves during the Second Age. In the Fellowship of the Ring novel, the door is explained to be the dividing line between two settlements -- the Dwarves of Moria and the Elves of Eregion. Before the animosity began, the two communities were allies. The riddle on the door symbolized their friendship, or as it said in the book, "Those were happier days, when there was still close friendship at times between folk of different race, even between Dwarves and Elves."

During the Second Age, the door would often be kept open or, at most, a single guard would be stationed outside. In times when the doors were shut, only an Elvish friend would be allowed to enter. This explains why the riddle says, "speak friend," as all an Elf needed to do to gain access was to speak the proper word and walk inside. Another reason why the scripture was written in Elvish was that the Dwarves were private people. Their language of Khuzdul is a secret that they don't share with outsiders, so writing it on a public door wouldn't have been allowed. As such, the choice to have Moria's password be in Elvish both reflects the friendship between the two peoples and Dwarven culture.

KEEP READING: Lord of the Rings: Why Saruman Doesn't Appear in Return of the King's Theatrical Cut