<P> Meanwhile, the Ents, roused by Merry and Pippin from their peaceful ways, attack Isengard, Saruman's stronghold, and trap the wizard in the tower of Orthanc . Gandalf convinces Treebeard to send an army of Huorns to Théoden's aid . Gandalf brings an army of Rohirrim to Helm's Deep, and they defeat the Orcs, who flee into the "forest" of Huorns, never to be seen again . Gandalf offers Saruman a chance to turn away from evil . When Saruman refuses to listen, Gandalf strips him of his rank and most of his powers . After Saruman crawls back to his prison, Wormtongue drops a sphere to try and kill Gandalf . Pippin picks it up; it is revealed to be a palantír, a seeing - stone that Saruman used to speak with Sauron and through which Saruman was ensnared . Pippin is seen by Sauron . Gandalf rides for Minas Tirith, chief city of Gondor, taking Pippin with him . </P> <P> Frodo and Sam capture Gollum, who has followed them from Moria . They force him to guide them to Mordor . They find that the Black Gate of Mordor is too well guarded, so instead they travel to a secret way Gollum knows . On the way, they encounter Faramir, who, unlike his brother Boromir, resists the temptation to seize the Ring . Gollum--who is torn between his loyalty to Frodo and his desire for the Ring--betrays Frodo by leading him to the great spider Shelob in the tunnels of Cirith Ungol . Frodo falls to Shelob's sting . But with the help of Galadriel's gifts, Sam fights off the spider . Believing Frodo to be dead, Sam takes the Ring to continue the quest alone . Orcs find Frodo; Sam overhears them and learns that Frodo is still alive . </P> <P> Sauron sends a great army against Gondor . Gandalf arrives at Minas Tirith to warn Denethor of the attack, while Théoden musters the Rohirrim to ride to Gondor's aid . Minas Tirith is besieged . Denethor is deceived by Sauron and falls into despair . He burns himself alive on a pyre, nearly taking his son Faramir with him . Aragorn, accompanied by Legolas, Gimli and the Rangers of the North, takes the Paths of the Dead to recruit the Dead Men of Dunharrow, who are bound by a curse which denies them rest until they fulfil their ancient forsworn oath to fight for the King of Gondor . Following Aragorn, the Army of the Dead strikes terror into the Corsairs of Umbar invading southern Gondor . Aragorn defeats the Corsairs and uses their ships to transport the men of southern Gondor up the Anduin, reaching Minas Tirith just in time to turn the tide of battle . Éowyn, Théoden's niece, slays the Lord of the Nazgûl with help from Merry . Together, Gondor and Rohan defeat Sauron's army in the Battle of the Pelennor Fields, though at great cost . Théoden is slain, and Éowyn and Merry are injured . </P> <P> Meanwhile, Sam rescues Frodo from the tower of Cirith Ungol . They set out across Mordor . Aragorn leads an army of men from Gondor and Rohan to march on the Black Gate to distract Sauron from his true danger . His army is vastly outnumbered by the great might of Sauron . Frodo and Sam reach the edge of the Cracks of Doom, but Frodo cannot resist the Ring any longer . He claims it for himself and puts it on his finger . Gollum suddenly reappears . He struggles with Frodo and bites off Frodo's finger with the Ring still on it . Celebrating wildly, Gollum loses his footing and falls into the Fire, taking the Ring with him . When the Ring is destroyed, Sauron loses his power forever . All he created collapses, the Nazgûl perish, and his armies are thrown into such disarray that Aragorn's forces emerge victorious . </P>

When was the lord of the rings written and published