Battle of the Five Armies

"Since the death of the Great Goblin, the goblins' hatred of dwarves had been rekindled to fury"  - The Hobbit, The Clouds Burst

The Battle of the Five Armies was a battle waged between the Goblins and the Wargs against Men of Dale, Elves, Dwarves and Eagles on and near the Lonely Mountain (Erebor).

Background
After Bard the Bowman killed the dragon Smaug, the Men of the Lake and the Wood-elves had laid siege to the Dwarves in the Lonely Mountain, when the thirteen Dwarves of Erebor (the realm of the Lonely Mountain) under Thorin II Oakenshield refused to share any of the treasure that they had recaptured from Smaug.

Thorin and Company were then trapped in a bloodless siege, with Thranduil and Bard hoping to wait him out. However, Thorin had sent messages of his plight to his relatives using talking messenger Ravens that lived on the Lonely Mountain. These reached Dain II Ironfoot of the nearby Iron Hills, and he marched to Erebor with 500 heavily armed Dwarves, most skilled veterans of the War of the Dwarves and Orcs. When Dain's forces arrived, battle was almost joined between the two sides (now three armies were on the field) but at the last moment Gandalf intervened between the two and revealed that while they were bickering amongst themselves, the Goblins of the Misty Mountains and Grey Mountains (Ered Mithrin) under Bolg were using the opportunity to march against them. They had been incited by Gandalf's earlier slaying of the Great Goblin, but had now mobilized for a full-scale attack after hearing news of the death of the Dragon and the now relatively unguarded treasure hoard.

The Battle
The three commanders agreed that the Goblins and Wargs were the enemies of all, and previous grievances between them were put on hold in face of the greater threat. They arranged their forces on the two spurs of the Mountain that lined the valley leading to the now-sealed off great gate; the only entrance to the Mountain. The Dwarves and Lake-men formed up on one spur and the Elves on the other, while a light rear-guard lined across the mouth of the valley to lure the Goblins between the two, and thus destroy them. Bilbo Baggins, while invisible due to the Ring, tried to sit out the battle on the spur held by the Elves.

Soon the Goblins and Wargs arrived (and now four armies were on the field), and at first the plan worked: they were lured into the choke point and took heavy losses. However, due to their superior numbers, the allied Free Folk did not hold the advantage long. The second wave was even worse than the first, and now many Goblins scaled the mountain from the opposite side, and began to attack the arrayed forces from above and behind, as the main wave pressed forward. The battle raged across the Mountain, and then a great noise was heard: Thorin and his twelve Dwarf companions inside the mountain had thrown down the stone wall they had erected across the mouth of the gates, killing many Goblins. Thorin and Company then charged out to join the battle, covered from head to toe in the finest armour and weapons contained in the treasure hoard of Erebor. Thorin advanced through the Goblins ranks all the way up to the gigantic Goblins that formed the Bodyguard of Bolg, whom he could not get past. The battle degenerated into a chaotic close quarters melee, no quarter asked or given.

As the battle was turning fully against the Free Folk, a number of Giant Eagles of the Misty Mountains arrived (the fifth army), led by Gwaihir, Lord of the Eagles. Bilbo was the first to spot their entrance on the scene and began shouting that "the Eagles are coming!", a shout that was then continued among the other troops of the Free Folk. At this point Bilbo was knocked in the head by a large stone thrown by a Goblin from above on the Mountain, and he passed out. With the support of the Giant Eagles, the battle turned back against the Goblins. Then Beorn himself arrived at the battle, apparently having heard news that a large army of Goblins was on the move. This time he did not appear in his former shape of a giant Man, but had changed his skin to that of a gigantic bear. Beorn drove through the Goblin lines, but paused to carry the wounded Thorin out of the battle. Beorn then returned to the battle with even greater wrath and smashed the ranks of the Bodyguard of Bolg, ultimately killing Bolg himself. The Goblins eventually panicked and scattered, to be picked off by hunting forces from the victors later; many of the orc survivors were killed by Giant_Spiders in the Mirkwood forest.

Death of Thorin Oakenshield
Thorin II Oakenshield had been mortally wounded on the field, and his nephews Fíli and Kíli died defending him as he lay on the ground. Thorin died soon after the battle, permitting him to say one last goodbye to Bilbo.

Bilbo's Wealth
After defeating the Goblins and Wargs, the victors divided the treasure. Bard took Bilbo's fourteenth share of the gold and silver in return for the Arkenstone, whereupon he shared his reward with the Master of Lake-town and gave the Elven-king Thranduil the emeralds of Girion. Bilbo, despite having forfeited his share, was offered a rich reward but refused to take more than two small chests of gold and silver which was still enough to leave him a wealthy Hobbit back in The Shire for 60 years.

Other namesakes

 * The Battle of the Five Armies was also the name of a war game to replay this battle made by . The game uses 10-mm miniatures and is heavily based on their Warmaster system.