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 entrance to Khazad-dûm was the Great Gates in Dimrill Dale, east of the Misty Mountains. During the Second Age, it was decided to open a way to the west side of the Silvetine, which would facilitate contact and cooperation with the Elven Kingdom of Hollin.
The Doors were constructed in cooperation of Dwarves and Elves, sometime between S.A. 750 and 1500. It was the two greatest craftsmen of the Second Age, the Elf-lord Celebrimbor and the dwarf Narvi, built the Doors.
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.
In T.A. 2994, Balin's Colony was attacked by an onslaught of orcs. Óin led a group west, hoping to escape through the Doors of Durin, but the Watcher in the Water killed him. The Dwarves were locked in until wiped out.
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.