Kingdom under the Mountain
The Kingdom under the Mountain was the name given to the Dwarf realm of Erebor. It was founded in T.A. 1990 when Thráin I came to the Lonely Mountain and discoverd the Arkenstone. The kingdom lasted until 2770 when Smaug the Dragon invaded and either killed the Dwarves or forced them to leave. When Smaug was slain in 2941, Dáin Ironfoot became King Dáin II and the kingdom was restored.
In T.A. 1980, King Durin VI was killed by the Balrog, and in T.A. 1981 after the death of Durin's oldest son and heir King Náin I; the next in line Thráin I with the rest of his people fled Khazad-dûm (renamed Moria).
Thráin, with those who would follow him, went to the colony in the Lonely Mountain in T.A. 1999. Where he made himself King under the Mountain, and relocated the capital of the Longbeards. Under Thráin's rule the Arkenstone was discovered, and many riches were mined from its depths; After Thráin's death and his son Thorin I had ruled for ten years, he abandoned the Mountain in T.A. 2210 for the Grey Mountains; where his people were now gathering.
After King Thorin left the mountain was once again a colony, and its status as capital city was transferred to the Ered Mithrin.
It was nearly four hundred years before Durin's folk returned in mass to the Lonely Mountain. The reason for this being that the Dwarves of the Grey Mountains had been fighting a war against the Dragons, who had plagued the Dwarves for hundreds of years. In the year T.A. 2589 King Náin II and middle son Frór were killed by a great Cold-drake at the entrance to their halls, which led to the decision by the two remaining heirs, Thrór and Grór, to leave the mountains with those who wished to follow them,
The following year the now king Thrór, led a group back to the Lonely Mountain, while his brother Grór led another portion to the Iron Hills, and even some stayed behind in the Ered Mithrin.
Thrór eventually made it to the Lonely Mountain, and declared himself King under the Mountain. Under Thrór's rule the Lonely Mountain once again became the capital of Durin's folk, the Dwarves of Erebor became the best smiths and masons in Wilderland, trade increased with their kinsman in the Iron Hills and elsewhere, and they also became very rich.
 Sack of Erebor and exile
But with this new found prosperity came trouble. It wasn't long before the great dragon Smaug heard of their great wealth, and one day decided to take their treasure for himself. In the year T.A. 2770 Smaug descended on the mountain in a ball of fire. He killed King Girion of Dale with many of his knights, and he killed a large amount of the Dwarves living in the mountain. Most of the survivors fled to the Iron Hills, others went with the royal family into exile, and some simply went their own way.
 The Quest of Erebor and restoration
In T.A. 2941 with Gandalf's council, king Thorin and a small company of friends and family actually made it to the Lonely Mountain. With the help of the Hobbit Bilbo Baggins, the Dwarves retook the city and treasure. In the meantime the Dragon Smaug went to destroy Esgaroth, only to be killed by a man named Bard.
Thorin was free to proclaim himself King under the Mountain. However the mountain was besieged by the Men of Esgaroth, and the Elves of Mirkwood who wished recompensation for the damage done by the dragon. Dáin Ironfoot arrived to support Thorin, but a great host of Orcs and Wargs came to take the mountain. Then the Elves, Men, and Dwarves were united and fought against them. After Thorin's and his nephews' deaths, Dáin was made king of Durin's folk and of the mountain. Finally after so many years of longing the Longbeards finally could return to the Lonely Mountain.
 Prosperity and the War of the Ring
Under Dáin's rule the Dwarves of the Lonely Mountain became very rich and prosperous. They rebuilt the town of Dale, their trade greatly increased with their kinsman in the Iron Hills once again and with Men; and the Lonely Mountain was restored to its original greatness. But once again trouble began to brew in the east. The Men of Dale were nearing war with the Easterlings, and in the year T.A. 3019 an emissary from Sauron came to Dáin and said that if he were to give up the location of Bilbo (who had discovered the Ring of Power in his travels) that Sauron would return to him the three remaining Dwarven rings. But being wary of the emissary, Dáin sent his kinsmen Glóin to Rivendell to warn Bilbo that Sauron was after him.
Several months later war broke out between Dale and the East. Dale was driven from their borders at the river Running, and was besieged in their city of Dale for three days in what became the Battle of Dale. Even with the aid of the Dwarves they could not stop the advance of the Easterlings; and on the third day as the Men and Dwarves retreated into the mountain, King Brand and King Dáin were killed at the its very gates. The Dwarves and Men held out for several days until word reached the ears of the Easterlings that the great hosts of Sauron in the south had been defeated in the Battle of the Morannon. With this news fear fell on the besiegers. When the besieged saw this they came forth from the Lonely Mountain, and attacked their enemy driving them from Dale across the Running, never to be bothered again.
After the death of his father, Thorin III Stonehelm became King of Durin's folk and King-under-the-Mountain. Little is known of his reign other than his people helping rebuild the cities of Gondor and the fortress of Helm's Deep, and part of his people moving to the Glittering Caves.