The way of opening the Doors was forgotten and the Doors were closed. During the Quest of the Ring, the Fellowship approached the Doors and attempted to enter Moria from there. At first Gandalf was unsuccessful at opening the Doors. The inscription was a riddle: "speak friend and enter." The answer was a password in an elvish language that would cause the Doors to swing open. Gandalf eventually solves the riddle, remembering the elven word for friend, "mellon".
When entering, the Watcher in the Water grabs Frodo's ankle to drag him into the lake. Sam slashes the tentacle with his knife, causing it to release Frodo and retract. The Fellowship runs into the mines while The Watcher slams the Doors behind them. A great noise is heard of stone and rock being thrown behind the Doors, and Gandalf believes that the two great holly trees on either side had been uprooted and thrown across the Doors.