Following his victory over the Balrog, Gandalf was sent back to Middle-earth until his task was complete. During the Battle for Minas Tirith, Gandalf rallied Gondor's armies within the walls of the White City, inspiring them to hold back the Orc invaders.