Battle of Five Armies
The great battle before the gates of Erebor.
"So began a battle that none had expected; and it was called the Battle of Five Armies, and it was very terrible. Upon one side were the Goblins and the wild Wolves, and upon the other were Elves and Men and Dwarves."
(The Hobbit 17, The Clouds Burst)
Since the ending of the War of the Dwarves and Orcs, and the Dwarves' ultimate victory at the Battle of Nanduhirion, the Orcs had nursed a hatred of that race. In the year III 2941, the year of Bilbo Baggin's journey to the Lonely Mountain, those events lay more than one hundred and forty years in the past. Travelling through the Misty Mountains, Bilbo, Thorin and their companions were captured by a colony of the Orcs that infested those regions. With Gandalf's help they escaped, but not before killing several of their captors, including their leader the Great Goblin.
The loss of the Great Goblin at the hands of a band of Dwarves inflamed the bitter memories of the Orcs' War with the Dwarves. Under the command of Bolg, whose own father Azog had been killed at Nanduhirion, all the armies of the Orcs of the Misty Mountains, and their allies the wolves and bats, began to gather and plan their revenge.
Oblivious to these events, Bilbo and the Dwarves continued their journey eastward. They achieved their quest to recover Erebor, but in doing so they earned the anger of Thranduil, and indirectly caused the destruction of Lake-town. Thranduil's Wood-elves joined with the Lake-men, and they marched north to claim a share of Smaug's treasure in recompense. In response, Thorin called on his cousin DÃ¡in, who set out with his own army from the Iron Hills.
So the scene was set for a confrontation between the Wood-elves and Lake-men on the one side, and the Dwarves of Thorin and DÃ¡in on the other. Already the first arrows had been shot when a dark cloud was seen coming out of the north - the bats that heralded the orc-armies of Bolg. The Elves, Men and Dwarves quickly forgot their differences in the face of this new threat, and battle was joined on the slopes of Erebor and the valley beneath. The battle was ferocious, and as it raged, it was joined by others - Eagles out of the Misty Mountains, and even Beorn himself in the shape of a monstrous bear.
By nightfall the Orcs were defeated, but not without great loss. Thorin himself was slain, making a bold attack against the bodyguard of Bolg, and with him fell his young nephews FÃli and KÃli. Bolg was dead, too, crushed by Beorn, and the goblins of the northern mountains were scattered or destroyed.