In T.A. 1980, Dwarves mining for mithril in Moria accidentally released a Balrog, an awesome and abhorrent "Demon of Might" who had been entrapped in the Underdeeps since the end of the Elder Days. Fleeing the beauty and protection of their subterranean city, the Dwarves wandered for years before Thráin I, King of Durin's Folk, led his people to Erebor (S. "Lonely Mountain") in northern Rhovanion. There, at the headwaters of the Celduin (S."River Running"), they founded the Kingdom under the Mountain in T.A. 1999. Soon after, Thráin discovered the priceless jewel called the Arkenstone in the heart of the solitary peak. Thráin's prize became the House of Dunn's most-revered heirloom.
The discovery of gold and gems in the Grey Mountains, however, spurred Thorin I to lead his folk out of the Lonely Mountain to found another colony and tap this immense lode to the north. The new Dwarf-hold prospered for nearly six hundred years but the success of its industrious inhabitants eventually proved to be its undoing. In the course of mining, the Dwarves stirred the longdormant Dragons residing in the heights near the Withered Heath. Cold-drakes assailed Durin's Folk. The greatest of these beasts, Ando-anca, slew King Dáin I in T.A. 2589 and captured the Dwarven treasury. Dáin's son, Thror, rallied his people, but the Naugrim lost any hope of reclaiming their stronghold. King Thror led the majority of the Dwarves back to the Lonely Mountain, while his youngest brother Grór took a smaller party further east. Grór founded a realm in the Iron Hills, which, albeit poorer, proved safer than the refound Kingdom Under the Mountain.
Smaug the Golden, the greatest winged fire-breather to reside in the Grey Mountains, flew southward out of the Withered Heath in T.A. 2770. Smelling the newlymined wealth of Erebor, the covetous drake sacked the Mountain, roasted or drove off the Dwarves, and settled into the Great Hall of Thror. There, he nested upon an inestimable bounty of gold, silver, mithril, and gems—not to mention jewelry and arms defying description. For the better part of two centuries Smaug ruled his roost in Erebor as the Dwarves licked their wounds at Grór's court in the Iron Hills, or in the Blue Mountains beyond Eriador (where they worked disheartedly as smiths and iron-mongers).
In T.A. 2941, the Grey Wizard persuaded Thráin's heir, Thorin II (Oakenshield), to join him on an expedition back into the Lonely Mountain. Gathering other Dwarves—Balin, Bifur, Bombur, Dori, Fíli, Glóin, Kíli, Nori, Óin, and Ori—and the Hobbit Bilbo Baggins, Gandalf and Thorin set out on the seemingly hopeless task of retaking the Lonely Mountain from Smaug.
The chambers in Erebor are carved out of solid granite and basalt, their faces smooth and unbroken. Many areas, in fact, have fine walls and a floor of set stone. These often elaborate inlays vary the color and texture of the surfaces in the complexes' larger or more sacred quarters. The doors and gates within the city are either of wood bound with steel bands or are themselves made of steel, and all swing back on superbly made hinges.Erebor is a maze of halls and corridors, tunnels and cavernous chambers. The rooms in Erebor are aligned on two levels, although there are small variations in altitude between various rooms on a given level. In addition, there is a stair up to the King's Halls, above the upper level. Of course, there is the long ramp from the Bottommost Hall to the secret entry on the side of the mountain.