> The Lord of the Rings
/ The Silmarillion
Khazad-dûm, the greatest of the dwarf-kingdoms of any Age, was the home that Durin the Deathless carved out for his Folk to live in. The caves of the Dwarf-mansion overlooked the valley of Azanulbizar in which the Kheled-zâram was located. Khazad-dûm was the tomb of Durin I and the home to his people for thousand of years. Through the Ages it was deepened and expanded to include numerous halls, mines, and levels. In the beginning of the Second Age, mithril was discovered in Khazad-dûm and the Noldor of Eregion quickly befriended the dwarves of Durin's Folk.
When the war of the Elves and Sauron began, the dwarves closed all the gates of Khazad-dûm, thus saving them through the Second Age. The ruin of the Dwarf-mansion came in the year 1980 of the Third Age when a Balrog was released in the deepest pits on the mines. The dwarves fled their home in 1982 after two of their kings were killed. After the Balrog took control in the area, Sauron saw a good opportunity to extend his reach of power by keeping Orcs within the halls. From this point forth, Khazad-dûm was known as Moria, the Black Pit.
Sauron and the Balrog's control of Moria remained unprotested until in 2989 a group from Erebor led by Balin tried to retake their ancestral home. They had some minute successes but were eventually killed in 2994 by the resident Orcs. Again the Orcs took control in the area until 3019 when the Fellowship of the Ring came through. The Maia Gandalf slew the Balrog and was defeated himself.
After the War of the Ring the Orcs in Moria were defeated and the halls cleared of any evil. Despite this, the dwarves never resettled in their grand halls.