While filming the first "X-Men" film in 1999, McKellen was cast as the wizard Gandalf in Peter Jackson's three-film adaptation of "The Lord of the Rings" (consisting of ' (2001), ' (2002), and "" (2003) ). He received honours from the Screen Actors Guild for Best Supporting Actor in a Motion Picture for his work in "The Fellowship of the Ring" and was nominated for the Academy Award for Best Supporting Actor for the same role. He provided the voice of Gandalf for several video game adaptations of the "Lord of the Rings" films, then reprised the role on screen in Jackson's film adaptation of "The Hobbit", which was released in three parts from 2012 to 2014.