Gandalf is a Dvergr (
Norse dwarf) in
Norse mythology, appearing in the poem
Völuspá in the
Poetic Edda. The name derives from the
Old Norse words
gandr (wand) and
álfr (elf), thus a protective spirit who wields a magical wand.
In his fictional writings, J. R. R. Tolkien named his wizard Gandalf after the Dvergr.