Army of the Dead

In the fictional works of J. R. R. Tolkien, the Army of the Dead (also known as the Dead Men of Dunharrow) were the shades of Men of the White Mountains, who were cursed to remain in Middle-earth by Isildur after they abandoned their oath to aid him in the War of the Last Alliance. Isildur said that they would not have peace or rest till they fulfil their oath upon his command or that of his heirs. They haunted the caverns beneath the Dwimorberg, and the valley of Harrowdale that lay in its shadow, though they were said to appear in the valley only in times of trouble or death.

Malbeth the seer prophesised that a day would come when need and haste would drive one of Isildur's heirs to take The Road Under The Mountain and that the dead would answer to his call. The Prophecy came true. In the War of the Ring, Isildur's Heir, Aragorn, called on the Dead Men to fulfil their oath at last. Summoning them to the stone of Erech, Aragorn commanded them to fulfil their oath and be free. They followed him through the Gondorian lands south of the Mountains, and at the port of Pelargir they drove away the allies of Sauron - the Corsairs of Umbar. Having fulfilled their oath, Aragorn granted them their freedom, and they vanished at last from the world.

Movie Adaptation
In the Peter Jackson movie adaptation of The Lord of the Rings: The Return of the King the battle with the Corsairs occurred off-screen and the Army of the Dead accompanied Aragorn to Minas Tirith to defeat Sauron's orcs, after which Aragorn declared their curse lifted. According to a magazine article, Peter Jackson hated the Army of the Dead; he thought it was too unbelievable. He kept it in the script because he did not wish to disappoint diehard fans of the book trilogy.