Doors of Durin
The Doors of Durin, also known as the West-gate or West-door of Moria, were built into the Walls of Moria in the dark cliffs of the Silvertine, and formed the western entrance to the great Dwarven city of Khazad-dûm.
The Doors were constructed in cooperation with the artificers of the Elven Kingdom of Hollin, sometime between S.A. 750 and 1500. The two greatest craftsmen of the Second Age, the Elf-lord Celebrimbor and the dwarf Narvi, built the Doors in order to aid the two people meet and cooperate, since Hollin was on the west side of the Silvetine.
These were the days before Sauron's dominion in Middle-earth, and the friendship between Elven and Dwarven kingdoms was a rare and special event. During this peaceful time the Doors stood open, allowing unfettered trade, but during the War of the Elves and Sauron (in S.A. 1697) the Doors were sealed shut. When Khazad-dûm was abandoned in T.A. 1981 the way of opening the Doors was forgotten.
Gollum took refuge in Moria; but when he had at last discovered the way to the Doors he could not get out.
The Company of the Ring entered Moria through the Doors, but Gandalf could not find out the password to open them. Merry Brandybuck unknowingly gave Gandalf the answer by asking, "What does it mean by speak, friend, and enter?" When Gandalf realized that "Mellon", which means "friend" in Sindarin, would open the door he sprang up, laughed, and spoke the word. Shortly thereafter, the Watcher in the Water attacked the Fellowship and shut the Doors behind them.
They were fashioned as flush doors, the jambs invisible to the eye, and matched so perfectly with the mountain rock that when closed the Doors could not be seen. The slabs were made by Narvi out of a grey material stronger than stone, and inlaid by Celebrimbor with ithildin, which could only be seen in starlight and moonlight. When visible, the fine silver-like inlay showed a hammer and anvil (the emblems of Durin), a crown and seven stars, two trees surmounted by crescent moons, and a single star (the emblem of the House of Feanor). The inscription on the archivolt read:
"Ennyn Durin Aran Moria. Pedo Mellon a Minno. Im Narvi hain echant. Celebrimbor o Eregion teithant i thiw hin."
"The Doors of Durin, Lord of Moria. Speak, friend, and enter. I, Narvi, made them. Celebrimbor of Hollin drew these signs."
The inscription was stating the password that would cause the Doors to swing open.
The name Moria means "Black Chasm" and was a derogatory description of the place which the Dwarves did not like, and was given after Durin's Bane took over the city in the Third Age. It is therefore a mystery why that name appears on an inscription made in the Second Age, and made in consent with the Dwarves.