Philology, the study of comparative and historical linguistics, especially of the medieval period, had a major influence on J. R. R. Tolkien's fantasy world of Middle-earth. He was a professional philologist, and made use of his knowledge of medieval literature and language to create families of Elvish languages and many details of the invented world.
Among the medieval sources for Middle-earth are Crist 1, which led to the tale of Eärendil, the beginning of Tolkien's mythology; Beowulf, which he used in many places; his philological study of the Old English word Sigelwara, which may have inspired the Silmarils, Balrogs, and the Haradrim; and his research on an inscription at the temple of Nodens, which seems to have led to Celebrimbor Silver-hand, maker of the Rings of Power, to Dwarves, and to the One Ring itself.
His use of his philological understanding of language in the construction of his Middle-earth legendarium was pervasive, beginning with his families of Elvish languages. From there, he created elements of story, including the history and geography of Middle-earth, the names of people and places, and eventually a complete mythology.