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 Goblin survivors died in the Mirkwood forest.
The Witch-king and the other Nazgûl rode from Mordor and Dol Guldur searching for the Shire. Four entered the Shire, and found that "Baggins" had moved to Buckland. Several Nazgûl attacked Gandalf onWeathertop and tried to ambush Frodo Baggins in Buckland and at Bree. Five, including the Witch-king, finally found Frodo on Weathertop with the other hobbits, accompanied by the Ranger Aragorn. The Ringwraiths attacked the party, and the Witch-king wounded Frodo with a Morgul-blade. Frodo's wound threatened to turn him into a wraith under the control of the Nazgûl.
As the company made for Rivendell, the realm of Elrond Half-elven, they met Glorfindel, who loaned Frodo his horse Asfaloth. Pursued by all nine Nazgûl, the horse carried Frodo across the River Bruinen. From the far bank Frodo defied the Nazgûl. When the Witch-king rode into the water, Elrond, who controlled the river, released a flood that caught three Nazgûl and their horses. Glorfindel advanced and drove the terrified horses of the remaining Nazgûl into the flood. The horses drowned, and all nine Nazgûl were swept away.
The son of Tuor and Idril, daughter of Turgon, Eärendil was raised in Gondolin. When Eärendil was seven years old, he escaped the sacking of Gondolin with his parents, living afterwards in Arvernien by the mouth of Sirion. Eärendil later became the leader of the people who lived there, and married Elwing, daughter of Dior the son of Beren and Lúthien. They had two sons, Elrond and Elros.
With the aid of Círdan the Shipwright, Eärendil built a ship, Vingilótë (or Vingilot), which is Quenya for "foam-flower". He sailed this often around the seas west of Middle-earth, leaving his wife behind in Arvernien. At this time Elwing had in her possession the Silmaril that Beren had wrested from Morgoth. News of this came to the sons of Fëanor who were still living, and they attacked the people living in Arvernien, and killed most of them. Elwing, rather than be captured, threw herself with the Silmaril into the sea. The Silmaril was not lost, however. According to The Silmarillion:
For Ulmo bore up Elwing out of the waves, and he gave her the likeness of a great white bird, and upon her breast there shone as a star the Silmaril, as she flew over the water to seek Eärendil her beloved. On a time of night Eärendil at the helm of his ship saw her come towards him, as a white cloud exceeding swift beneath the moon, as a star over the sea moving in strange courses, a pale flame on wings of storm. And it is sung that she fell from the air upon the timbers of Vingilot, in a swoon, nigh unto death for the urgency of her speed, and Eärendil took her to his bosom; but in the morning with marvelling eyes he beheld his wife in her own form beside him with her hair upon his face, and she slept.
Hearing of the tragedy that had befallen in Arvernien, Eärendil then sought after Valinor, aboard the Vingilot with Aerandir, Erellont, and Falathar, and he and Elwing found their way there at last. Eärendil thus became the first of all mortals to set foot in Valinor. Eärendil then went before the Valar, and asked them for aid for Men and Elves in Middle-earth, to fight against Morgoth; the Valar accepted his plea.
Because Eärendil had undertaken this errand on behalf of Men and Elves, and not for his own sake, Manwë forbore to deal out the punishment of death that was due. Also, because both Eärendil and Elwing were descended from a union of Elves and Men, Manwë granted to them and their sons the gift to choose to which race they would be joined (a gift that was further passed to the children of Elrond, who became known as the Half-elven). Elwing chose to be one of the Elves. Eärendil would have rather been one of the Men; however, for the sake of his wife, he chose to be one of the Elves. The Silmarillionsays this:
Now when first Vingilot was set to sail in the seas of heaven, it rose unlooked for, glittering and bright; and the people of Middle-earth beheld it from afar and wondered, and they took it for a sign, and called it Gil-Estel, the Star of High Hope.
The Valar, having listened to Eärendil's plea, went with a mighty host to Middle-earth, and overthrew Morgoth. Eärendil took part in the battle, riding on Vingilot beside Thorondor and the Eagles. He struck down the great dragon Ancalagon and cast him down onto Thangorodrim, the event which, along with the sheer devastation caused by the War of Wrath, led to the Ruin of Beleriand. However, right before the Dagor Dagorath, the Last Battle, Morgoth will escape out the Door of Night to destroy Arda. It is implied Eärendil shall participate in that, alongside every creature in Middle-earth, good and evil.