<P> In T.A. 2941, Gandalf arranged (and frequently accompanied) a band of 13 dwarves and the hobbit Bilbo Baggins to reclaim from Smaug the Dwarves' lost treasure in Erebor . To the quest, Gandalf contributed the map and key to Erebor . It was on this Quest of Erebor that Gandalf found his sword, Glamdring, in a troll's treasure hoard . </P> <P> After escaping from the Misty Mountains pursued by Goblins and Wargs, the party was carried to safety by the Great Eagles . Gandalf then persuaded Beorn--who did not like uninvited guests or dwarves--to house and provision the company for the trip through Mirkwood . </P> <P> 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 Mirkwood Elves 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 One 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 . </P> <P> 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 orphaned cousin and adopted heir . </P>

When does gandalf the grey became gandalf the white