Erebor

Erebor stood hundreds of miles from the nearest mountain range. Tolkien's map shown in The Hobbit shows the mountain with six ridges stretching out from a central peak that was snowcapped well into spring. The whole mountain was perhaps ten miles in diameter; it contained fabulous lodes of gold and jewels.

The mountain was the habitat for a variety of plants and animals, including thrushes, crows, snails and pines; some of these were endemic sub-species. Perhaps the most well-known were the ravens of Ravenhill, a spur of the mountain. Some wildlife survived the Desolation of Smaug, a dragon who invaded the Mountain and dominated its surrounds for nearly 200 years in the Third Age.

Origins of the Kingdom under the Mountain
Erebor became the home of the Folk of Durin, a clan of Dwarves known as the Longbeards, after they were driven from their ancestral home of Khazad-dûm. In the latter days of the Third Age, this Kingdom under the Mountain held one of the largest dwarvish treasure hoards in Middle-earth.

Dale, a town of Men built between the two southern spurs of Erebor, formed an economically symbiotic relationship with the dwarves.

The Kingdom under the Mountain was founded by Thráin I the Old, who discovered the Arkenstone there. His son, Thorin I, left the mountain with much of the Folk of Durin to live in the Ered Mithrin (Grey Mountains) on account of the great riches to be found in that range. After dragons plundered their hoards, the Longbeards, led now by Thrór, a descendant of Thorin, returned to Erebor to take up the title King under the Mountain. Under Thrór's reign, Erebor became a great stronghold where the dwarves became a numerous and prosperous people. The Dwarves of Erebor were at that time well known for the making of matchless weapons and armour, and there was great demand for their work by the surrounding peoples. The Longbeards amassed a large treasure hoard during this time.

Erebor in The Hobbit
In 2770 T.A., while the young Thorin II Oakenshield was out hunting, the dragon Smaug flew south from the Grey Mountains, killed all the dwarves he could find, and destroyed the town of Dale. Smaug then took over the mountain, using the dwarves' hoard as a bed. King Thrór, his son Thráin II, and several companions escaped death by a secret door. Although Thrór and Thráin later perished, Thorin lived in exile in the Ered Luin until, by chance, he met the wizard Gandalf. Together they formed a plan to reclaim the mountain. Gandalf insisted that burglary was the best approach and recommended the hobbit Bilbo Baggins, whom he represented to be a professional thief.

Thus Bilbo, Thorin, and Thorin's company of twelve other Dwarves travelled to the Lonely Mountain to regain the treasure. They planned to use the secret door, whose key Gandalf had managed to obtain from Thráin, whom he had found at the point of death in the pits of Dol Guldur. On Durin's Day, when the setting sun and the last moon of autumn were in the sky together, the day's last sunlight would fall on the door and expose its keyhole so that it could be unlocked. By a fortunate coincidence, this happened soon after Bilbo and the dwarves arrived, and the hobbit was able to enter the mountain and steal a golden cup.

Smaug, enraged by the theft, emerged from the mountain and destroyed Lake-town, which he thought to be the source of the "thieves". During this attack Smaug was slain byBard the Bowman, and Thorin claimed the mountain. However, the Men of Esgaroth, supported by Thranduil and the Elves of Mirkwood, demanded a part of the dragon's hoard as recompense for the destruction. Thorin, mad with greed, refused all claims and sent word to his second cousin Dáin II Ironfoot, chief of the Dwarves of the Iron Hills, who brought reinforcements to the aid of Thorin and Company. Before the battle began, however, an army of orcs and wargs descended on Erebor. Dwarves, elves, and men joined ranks against them, which led to the Battle of the Five Armies. During the battle, Thorin's nephews Fíli and Kíli were slain, and Thorin himself was mortally injured and died shortly afterwards. The title of King under the Mountain passed to Dáin.

Erebor in The Lord of the Rings
With the restoration of the Kingdom under the Mountain the area became prosperous again. Dale was rebuilt under Bard's leadership, and dwarves and men reforged their friendship.

Some of the Dwarves, led by Balin, left Erebor to reclaim the ancient Dwarvish Kingdom of Khazad-dûm (also known as Moria). They established a colony there but five years later Balin was killed by an Orc and soon after Moria was overrun by Orcs and the rest of the Dwarves were killed.

Gimli, a dwarf of Erebor and the son of Glóin, one of Thorin's 12 companions, was chosen to represent his people in the Fellowship of the Ring and helped Aragorn II regain the throne of Gondor.

During the War of the Ring, a messenger from Mordor twice came to Erebor, asking for assistance in finding the One Ring and offering three of the seven Dwarf rings and Moria. However Dain refused. Dale was overrun by Sauron's northern army, and many dwarves and men took refuge in Erebor, which was promptly surrounded. Dáin II was killed before the gates of Erebor defending the body of his fallen ally King Brand of Dale. Dáin was succeeded by his son Thorin III Stonehelm, who along with King Bard II withstood the siege and later routed Sauron's forces. In The Quest of Erebor, Gandalf related that although Sauron's main thrust was directed against Gondor, the restoration of the Kingdom Under the Mountain provided a bulwark against Sauron's northern allies, who otherwise could have done great harm in Arnor and the Shire.