Geoffrey based parts of Merlin's character on Myrddin Wyllt, a legendary madman and prophet who lived in the Caledonian Forest. Other parts of his life were based on that of the historical 5th-century Romano-British military leader Ambrosius Aurelianus (also known as Emrys Wledig). In Geoffrey's version of the tales and later embellishments Merlin is a magician and counselor for King Arthur.