After the death of Smaug, Thranduil along with the people of Esgaroth demanded a share of the treasure of Erebor, beginning a confrontation with Thorin's company, who were reinforced by an army from the Iron Hills, that nearly led to war. War with the Dwarves was averted by the intervention of the wizard Gandalf upon the arrival of the allied forces of Orcs and wargs. The combined army of Elves, Dwarves, and Men was victorious in the ensuing Battle of the Five Armies, but at great cost of life.