Gandalf is a fictional character in J. R. R. Tolkien's novels The Hobbit and The Lord of the Rings. In these stories, Gandalf appears as a wizard, member and later the head (after Saruman's betrayal and fall) of the order known as the Istari, as well as leader of the Fellowship of the Ring and the army of the West. In The Lord of the Rings, he is initially known as Gandalf the Grey, but after returning from death as Gandalf the White.
Tolkien discusses the characteristics of Gandalf in his essay on the Istari, which appears in the work Unfinished Tales. He describes Gandalf as the last of the wizards to appear in Middle-earth, one who: "seemed the least, less tall than the others, and in looks more aged, grey-haired and grey-clad, and leaning on a staff". Yet the Elf Círdan who met him on arrival nevertheless considered him "the greatest spirit and the wisest" and gave him the elven Ring of power called Narya, the Ring of Fire, containing a "red" stone for his aid and comfort. Tolkien explicitly links Gandalf to the element Fire later in the same essay:
Warm and eager was his spirit (and it was enhanced by the ring Narya), for he was the Enemy of Sauron, opposing the fire that devours and wastes with the fire that kindles, and succours in wanhope and distress; but his joy, and his swift wrath, were veiled in garments grey as ash, so that only those that knew him well glimpsed the flame that was within. Merry he could be, and kindly to the young and simple, yet quick at times to sharp speech and the rebuking of folly; but he was not proud, and sought neither power nor praise... Mostly he journeyed unwearingly on foot, leaning on a staff, and so he was called among Men of the North Gandalf 'the Elf of the Wand'. For they deemed him (though in error) to be of Elven-kind, since he would at times work wonders among them, loving especially the beauty of fire; and yet such marvels he wrought mostly for mirth and delight, and desired not that any should hold him in awe or take his counsels out of fear. ... Yet it is said that in the ending of the task for which he came he suffered greatly, and was slain, and being sent back from death and was clothed then in white, and became a radiant flame (yet veiled still save in great need).
In Valinor, Gandalf was known as Olórin. As recounted in the "Valaquenta" in The Silmarillion, he was one of the Maiar of Valinor, specifically, of the people of the Vala Manwë; and was said to be the wisest of the Maiar. He lived in the gardens of Irmo under the tutelage of Nienna, the patron of mercy. When the Valar decided to send the order of the Wizards to Middle-earth in order to counsel and assist all those who opposed Sauron, Olórin was proposed by Manwë. Olórin initially begged to be excused as he feared he lacked the strength to face Sauron.
Gandalf the Grey was the last of the Istari to arrive in Middle-earth, landing in Mithlond. He seemed the oldest and least in stature of them, but Círdan the Shipwright felt that he had the highest inner greatness on their first meeting in the Havens, and gave him Narya, the Ring of Fire. Saruman learned of the gift and resented it. Gandalf hid the ring well, and it was not widely known until he left with the other ring-bearers at the end of the Third Age that he, and not Círdan, was the holder of the third of the Elven-rings.
Gandalf's relationship with Saruman, the head of the Order, was strained. The Wizards were commanded to aid Men, Elves, and Dwarves, but only through counsel; it was forbidden to use force to dominate them — an injunction Saruman disregarded.
In the essay in Unfinished Tales it is stated that some thought Gandalf was in fact Manwë himself. However, this is refuted by the author since Manwë will not leave Valinor until the Final Battle at the end of days.
The White Council
In "Of the Rings of Power and the Third Age" (in The Silmarillion) and "The Istari" (in Unfinished Tales), Christopher Tolkien fleshes out the background and the history briefly tabulated by date in Appendix B of The Lord of the Rings by his father J.R.R. Tolkien, who was deceased by the time these tales were published. Gandalf suspected early on that the Necromancer of Dol Guldur was not a Nazgûl but Sauron himself. He went to Dol Guldur to discover the truth, but the Necromancer withdrew before him. The Necromancer returned to Dol Guldur with greater force, and the White Council was formed in response. Galadriel had hoped Gandalf would lead the Council, but Gandalf refused, declining to be bound by any but the Valar who sent him. Saruman was chosen instead, as being most knowledgeable about Sauron's work in the Second Age.
Gandalf returned to Dol Guldur and learned that the Necromancer was indeed Sauron returned. (This is when Gandalf found Thráin II imprisoned in Dol Guldur and recovered the map and key to Erebor before Thráin died.) The following year the White Council was summoned, and Gandalf urged that Sauron be driven out. Saruman, however, reassured the Council that Sauron's evident desire to find the One Ring (a necessary component of his resurgence) would fail, as the Ring would long since have been carried by the river Anduin to the Sea; and the matter was allowed to rest. But at this time Saruman himself began actively seeking the Ring near the Gladden Fields where Isildur had been killed, not far from Dol Guldur.
The Quest of Erebor
"The Quest of Erebor" in Unfinished Tales elaborates upon the story behind The Hobbit. It tells of a chance meeting between Gandalf and Thorin Oakenshield, Thráin's son, in the inn of the Prancing Pony in Bree. Gandalf had for some time foreseen the coming war with Sauron, and knew that the North was especially vulnerable. If Rivendell were to be attacked, the dragon Smaug could cause great devastation. Thorin was also keen to regain his lost territory, and so the quest was born.
Gandalf arranged (and frequently accompanied) a band of thirteen dwarves and the Hobbit Bilbo Baggins to reclaim from the dragon Smaug the Dwarves' lost treasure in Erebor. To the quest, Gandalf contributed a map and key to Erebor. It was on this Quest of Erebor that Gandalf found his sword, Glamdring, in a troll's treasure hoard, and that Bilbo found the One Ring, in a chance meeting with the creature Gollum (though at the time it was thought to be a lesser ring).
After escaping from the Misty Mountains pursued by Goblins and Wargs, the party was carried to safety by the Great Eagles. Gandalf then devised a plan to convince the chief of the Beornings, Beorn — who did not like uninvited guests or dwarves — to house and provision the company for the trip through Mirkwood.
Gandalf left the company before they entered Mirkwood, saying that he had pressing business to attend to. He turned up again, however, before the walls of Erebor disguised as an old man, revealing himself when it seemed the Men of Esgaroth and the Elves of Mirkwood would fight Thorin and the Dwarves over Smaug's treasure. The Battle of the Five Armies ensued when hosts of Goblins and Wargs attacked all three parties. After the battle, Gandalf accompanied Bilbo back to the Shire, revealing at Rivendell what his pressing business had been: Gandalf had once again urged the Council to evict Sauron, since quite evidently Sauron did not require the Ring to continue to attract evil to Mirkwood. Then, in an event only briefly described (in The Silmarillion, The Hobbit, and The Lord of the Rings), the Council "put forth its power" and drove Sauron from Dol Guldur. Sauron, however, had anticipated this and withdrew as a feint, only to reappear in Mordor.
The Fellowship of the Ring
As explained in The Fellowship of the Ring, Gandalf spent the years between The Hobbit and The Lord of the Rings travelling Middle-earth in search of information on Sauron's resurgence and Bilbo's mysterious ring, spurred particularly by Bilbo's initial misleading story of how he had obtained it as a "present" from Gollum. During this period he befriended Aragorn and first became suspicious of Saruman. He spent as much time as he could in the Shire, strengthening his friendship with Bilbo and Frodo, Bilbo's heir.
He returned to the Shire for Bilbo's "eleventy-first" (111th) birthday party in T.A. 3001, bringing many fireworks for the occasion. After Bilbo, as a prank on his guests, put on the Ring and disappeared, Gandalf strongly encouraged his old friend to leave the Ring to Frodo, as they had planned. Bilbo became hostile and accused Gandalf of trying to steal the Ring — which he called "my precious", much as Gollum, the previous owner of the Ring, had done. (Isildur, who earlier possessed the ring and was destroyed by it, had written that "it is precious to me"). Alarmed, Gandalf impressed on Bilbo the foolishness of this accusation. Coming to his senses, Bilbo admitted that the Ring had been troubling him, and leaving it behind for Frodo, he departed for Rivendell. Though Bilbo would never be entirely free of the desire for the Ring, he was the first to give it up willingly.
Over the next 17 years, Gandalf travelled extensively, searching for answers. With Aragorn he sought to find Gollum. Aragorn eventually succeeded, and Gandalf questioned Gollum, threatening him with fire when he proved unwilling to speak. Gandalf learned finally that Sauron had forced Gollum under torture in Barad-dûr to tell what he knew of the Ring. This reinforced Gandalf's growing suspicion that Bilbo's ring was the One Ring.
Returning to the Shire Gandalf confirmed his suspicions by throwing the Ring into Frodo's hearth fire and reading the writing that appeared on the Ring's surface. He told Frodo the full history of the Ring, and urged him to take the Ring to Rivendell; for he would be in grave danger if he stayed in the Shire. Gandalf said he would attempt to return for Frodo's fiftieth birthday party, in order to accompany him on the road thereafter; and that meanwhile Frodo should arrange to leave quietly, as the servants of Sauron would be searching for him.
Outside the Shire, Gandalf encountered Radagast the Brown, another of the Istari, who brought the news that the Nazgûl had ridden forth and crossed the River Anduin — and a request from Saruman that Gandalf come to Isengard. Gandalf left a letter to Frodo (urging his immediate departure) with Barliman Butterbur at the inn in Bree, and headed towards Isengard. There Saruman revealed his true colours, urging Gandalf to help him obtain the Ring for his own use. Gandalf refused, and Saruman imprisoned him at the top of the tower of Orthanc. Eventually Gandalf was rescued by Gwaihir the Eagle.
Gwaihir set Gandalf down in Rohan, where Gandalf appealed to King Théoden for a horse. Théoden, under the malign influence of Gríma Wormtongue, Saruman's spy, told Gandalf to take any horse he pleased, but to leave quickly. It was then that Gandalf met the great horse Shadowfax, one of the mearas, who would be his mount and companion for most of the rest of the war. Gandalf pursued the horse for two days before Shadowfax permitted Gandalf to ride him. Gandalf then rode hard for the Shire, but did not reach it until Frodo had already set out. Knowing that Frodo and his companions would be heading for Rivendell, Gandalf began to make his own way there. He learned at Bree that the Hobbits had fallen in with Aragorn. He faced the Nazgûl at Weathertop but escaped after an all-night battle, drawing four of them northward. Frodo, Aragorn and company faced the remaining five on Weathertop a few nights later. Gandalf reached Rivendell just before Frodo's arrival.
In Rivendell, Gandalf helped Elrond drive off the Nazgûl pursuing Frodo and played a great part in the following council as the only person who knew the full history of the Ring. He also revealed that Saruman had betrayed them and was in league with Sauron. When it was decided that the Ring had to be destroyed, Gandalf volunteered to accompany Frodo — now the Ringbearer — in his quest. He also persuaded Elrond to let Frodo's cousins Merry and Pippin join the Fellowship.
Taking charge of the Fellowship (comprising nine representatives of the free peoples of Middle-earth, "set against the Nine Riders"), Gandalf and Aragorn led the Hobbits and their companions south. After an unsuccessful attempt to cross Mount Caradhras in winter, they crossed under the mountains through the Mines of Moria, though only Gimli the Dwarf was enthusiastic about that route. In Moria, they discovered that the Dwarf colony established there earlier had been overrun by Orcs. The Fellowship fought with the Orcs and Trolls of Moria, but were no match against "Durin's Bane," a Balrog from ancient times. At the Bridge of Khazad-dûm, Gandalf faced the Balrog to enable the others to escape.
After a short exchange of blows, Gandalf broke the bridge beneath the Balrog with his staff. As the Balrog fell, it wrapped its whip around Gandalf's knees, dragging him into the abyss. As his friends looked on in horror, Gandalf fell into shadow, crying "Fly, you fools!" as he went.
Gandalf and the Balrog fell into the deep subterranean lake under Moria. Gandalf pursued the Balrog for eight days until they climbed to the peak of Zirakzigil. Here they fought for two days and nights. In the end, the Balrog was cast down and broke the mountainside with its fall. Gandalf himself died during this ordeal, and his body lay on the peak while his spirit travelled outside of time.
Gandalf the White
Gandalf was sent back as a significantly more powerful figure, Gandalf the White. Gwaihir carried him to Lórien, where he was healed of his injuries and re-clothed in white robes by Galadriel. He travelled to Fangorn Forest, where he encountered Aragorn, Gimli, and Legolas (who were tracking Merry and Pippin).
They travelled to Rohan, where Gandalf found that Théoden had been further weakened by Wormtongue's influence. He broke Wormtongue's hold over Théoden, and convinced the king to join in the fight against Sauron. Gandalf then set off to gather Erkenbrand of the Westfold and his warriors to assist Théoden in the coming battle with Saruman. Gandalf arrived just in time to shatter Saruman's attack on Helm's Deep. After the ensuing battle, Gandalf and the king rode to Isengard, which in the interim had itself been attacked and conquered by Treebeard and the Ents, along with Merry and Pippin. Gandalf broke Saruman's staff and expelled him from the White Council and the Order of Wizards, and assumed Saruman's place as head of both. Wormtongue made an indecisive attempt to kill Gandalf or Saruman with the palantír of Orthanc, but missed both. Pippin retrieved the palantír, but Gandalf quickly appropriated it. After the group left Isengard, Pippin took the palantír from a sleeping Gandalf, looked into it, and came face to face with Sauron himself. Gandalf then took the chastened Pippin with him to Minas Tirith to keep the young Hobbit out of further trouble.
Gandalf arrived in time to help order the defences of Minas Tirith. His presence was resented by Denethor, the Steward of Gondor; but after Denethor's son Faramir was gravely wounded in battle, Denethor sank into despair and madness. Together with Prince Imrahil of Dol Amroth, Gandalf led the defenders during the siege of the city. When the forces of Mordor finally broke the main gate, Gandalf alone on Shadowfax confronted the Witch-king of Angmar, Lord of the Nazgûl. But at that moment the Rohirrim arrived, compelling the Witch-king to withdraw and engage them. Gandalf would have ridden to their aid, but he too was suddenly required elsewhere - to save Faramir from Denethor, who sought in desperation to burn himself and his son on a funeral pyre.
Aragorn and Gandalf then led the final campaign against Sauron's forces at the Black Gate, in an effort to distract the Dark Lord's attention from Frodo and Samwise Gamgee, who were at the same moment scaling Mount Doom to destroy the Ring. In a parlay before the battle, Gandalf and the other leaders of the West met the Mouth of Sauron, who showed them Frodo's mithril shirt and other items from the Hobbits' equipment. But Gandalf rejected Mordor's terms of surrender, and the forces of the West faced the full might of Sauron's armies, until the Ring was destroyed in Orodruin. Gandalf led the Eagles to rescue Frodo and Sam from the erupting Orodruin.
After the war, Gandalf crowned Aragorn as King Elessar, and helped him find a sapling of the White Tree of Gondor. He accompanied the Hobbits back to the borders of the Shire, before leaving to visit Tom Bombadil. Two years later, Gandalf - who by now had spent about 2,000 years in Middle-earth - departed with Frodo, Bilbo, Galadriel, and Elrond across the sea to the Undying Lands. It was only then that his possession of Narya, one of the Three Elven Rings, became generally known.
Names and titles
Within the Tolkien legendarium, "Gandalf" translates an unknown name of the meaning "Wand-Elf (alternatively cane/staff)".