Geoffrey and his sources
Geoffrey of Manmouth's composite Merlin, imagined primarily as a prophet, is fundamentally based on the North Brythonic poet and seer Myrddin Wyllt, that is Myrddin the Wild (known as Merlinus Caledonensis or Merlin Sylvestris in later texts influenced by Geoffrey), in turn inspired by either real or legendary figure from the Welsh oral tradition that appears in 12th-century written poems such as "Afallennau Myrddin" ("Myrddin's Apple Trees") or "Yr Oianau" ("The Piglet"). Myrddin's legend has parallels with a northern Welsh and southern Scottish story of the mad prophet Lailoken (Laleocen), probably the same as Myrddin son of Morfryn (Myrddin map Morfryn) mentioned in the Welsh Triads, and with Buile Shuibhne, an Irish tale of the wandering insane king Suibihne mac Colmáin (often Anglicised to Sweeney), set after the 637 Battle of Moira.
In Welsh poetry, Myrddin was a bard who was driven mad after witnessing the horrors of war and subsequently fled civilisation to become a wild man of the wood in the 6th century. He roamed the Caledonian Forest until he was cured of his madness by Kentigern, also known as Saint Mungo. Geoffrey had Myrddin in mind when he wrote his earliest surviving work, the Prophetiae Merlini ("Prophecies of Merlin", c. 1130), a collection of prophecies consist of a long series of predictions concerning the reign of the Saxons and the independence of Britain, which he claimed were the actual words of the legendary poet (including some distinctively apocalyptic prophecies for Geoffrey's contemporary 12th century). However, the work reveals little about Merlin's background.
Geoffrey was further inspired by Emrys (Old Welsh: Embreis), a Welsh legendary character based in part on the 5th-century historical figure of the Romano-British war leader Ambrosius Aurelianus (Welsh name Emrys Wledig, later also known as Myrddin Emrys). When Geoffrey included Merlin in his next work, Historia Regum Britanniae ("The History of the Kings of Britain", c. 1136), he supplemented his characterisation of Merlin by attributing to him a story taken from the early 9th-century Historia Brittonum attributed to Nennius, which Geoffrey adapted almost without changes. In the source text, Ambrosius was discovered when the King of the Britons, Vortigern, attempted to erect a tower at Dinas Emrys (City of Emrys). More than once, the tower collapsed before completion. Vortigen's wise men advised him that the only solution was to sprinkle the foundation with the blood of a child born without a father. Ambrosius was rumoured to be such a child. When he was brought before the king, Ambrosius revealed that below the foundation of the tower was a lake containing two dragons battling each other, representing the struggle between the invading Saxons (the white dragon) and the native Celtic Britons (the red dragon). Geoffrey included the story in his Historia Regum Britanniæ, adding the new later episodes that tie Merlin with King Arthur and his predecessors. Geoffrey stated that this Ambrosius was also called "Merlin" (Merlinus), hence Ambrosius Merlinus.
Geoffrey's account of Merlin's early life is thus based closely on the story from the Historia Brittonum. A popular theory has his Merlin as a fusion between a legendary Celtic character possibly based on a historical figure, a supposed clan leader named Myrddin, confused with the Ambrosius spoken of by Saint Gildas. At the same time, however, Geoffrey also turned Ambrosius Aurelianus into the separate character of Uther Pendragon's brother, Aurelius Ambrosius. Geoffrey added his own embellishments to the tale, which he set in Carmarthen, Wales (Welsh: Caerfyrddin). While Nennius' "fatherless" Ambrosius eventually reveals himself to be the son of a Roman consul, Geoffrey's Merlin is fathered by an incubus demon through a nun, daughter of the King of Dyfed (Demetae, today's South West Wales). Usually, the name of Merlin's mother is not stated, but it is given as Adhan in the oldest version of the Prose Brut, the text also naming his grandfather as King Conaan. This was the first popular account of demonic parentage motif in Western Christian literature.
The Historia's Merlin (Ambrosius Merlinus) is born all hairy like a bear and already able to speak like an adult, as well as possessing supernatural knowledge that he uses to save his mother. The story of Vortigern's tower is the same; the underground dragons, one white and one red, represent the Saxons and the Britons, and their final battle is a portent of things to come. At this point, Geoffrey inserted a long section of Merlin's prophecies, taken from his earlier Prophetiae Merlini. Geoffrey also told two further tales of the character. In the first, Merlin creates Stonehenge as a burial place for Aurelius Ambrosius, bringing the stones from Mount Killaraus in Ireland. This episode establishes Merlin as a great builder endowed with astonishing knowledge of science. Unlike in the later accounts since Layamon's Brut, Geoffrey's Merlin actually does not use magic in this episode. In the second follow-up story, Merlin's magic enables the new British king, Uther Pendragon, to enter into Tintagel Castle in disguise and to father Arthur with his enemy's wife, Igerna (Igraine). These three iconic episodes appear, separately or together, in many later adaptations of Geoffrey's account. However, Merlin subsequently disappears from the Historia narrative. He does not tutor or advise Arthur as in later versions.
Geoffrey of Monmouth dealt with Merlin again in his third work, the Vita Merlini ("The Life of Merlin", 1150). He based it on stories of the original 6th-century Myrddin, set long after his time frame for the life of Merlin Ambrosius. Nevertheless, Geoffrey asserts that the characters and events of the Vita Merlini are the same as told in the Historia Regum Britanniae. According to Walter, the text is based on a slightly restored myth rather than historical sources, and should be read as a palimpsest as it contains many legendary elements (the majority purely Celtic) integrated into a biographical story in Latin. Geoffrey adapts his story to his time, but seems to have respected his sources.
Here, Merlin survives the reign of Arthur, whose fall he is told about by the bard Taliesin. Merlin himself is depicted as a Welsh king of Dyfed, a scholar, a diviner, and a cursed prophet. He loses a battle with his army and, after fleeing from the soldiers of his Scottish enemy Gwenddolau (a character inspired by the historic Brythonic king Gwenddoleu ap Ceidio), he then spends a part of his life as a madman in the woods, transforming both mentally and physically (as Merlin always do in the stories of his madness; here his changes being triggered, lycanthropy-style, by the phenomenon of red full moon). He abortively marries a woman named Guendoloena, whose new husband he later murders after arriving at their wedding while riding a stag. Cured of his madness, he eventually retires to observing stars from his house with seventy windows in the remote woods of Rhydderch. There, he is often visited by Taliesin, another soothsayer named Maeldin, and his own sister Ganieda (a Latinised name of Myrddin's sister Gwenddydd), who has become queen of the Cumbrians and is also endowed with prophetic powers. Merlin's spiritual search brings him closer to Christianity, and the text concludes with his redemption. Compared to Geoffrey's own Historia, his Vita seems to have little influence on the later portrayals of Merlin.
A long-running debate in the Arthurian scholarship pits supporters of a historical origin of Merlin against those of a mythological origin. Mark Chorvinsky hypothesised that Merlin is based on a historical person, probably a 5th and/or 6th-century druid living in southern Scotland. Nikolai Tolstoy makes a similar argument based on the fact that early references to Merlin describe him as possessing characteristics which modern scholarship would recognize as druidical (but that sources of the time would not have recognised), the inference being that those characteristics were not invented by the early chroniclers but belonged to a real person, "the last of the druids": the Myrddin of Welsh poems, deliberately merged with another character into one by Geoffrey. Regarding the druidical origins theories, Walter noted Merlin's connections to apples and trees (including oaks) in Geoffrey and some of the other versions, and how Myrddin Wyllt, Lailoken, and Suibhne (considered variations of the same mythical theme) all three convert to the Christian faith at the end of their respective stories. Notably, Myrddin also shares similarities with the druidic bard figure of Taliesin. The two appear alongside each other in the Welsh Triads and in the Vita Merlini, as well as in the poem "Ymddiddan Myrddin a Thaliesin" ("The Conversation between Myrddin and Taliesin", where they discuss seven battles that would fill rivers with blood) from The Black Book of Carmarthen, which was dated by Rachel Bromwich as "certainly" before 1100, that is predating the Vita by at least half century while telling a different version of the same story.
The existence of one or more "historical Merlins" has been defended by others, such as Norma Lorre Goodrich. Such a proposed "historical Merlin" may have inspired various authors since the 6th century, but their versions would be now lost. A late version of the Annales Cambriae dubbed the "B-text", written at the end of the 13th century and regarded as influenced by Geoffrey, records that in the year 573 after "the battle of Arfderydd, between the sons of Eliffer and Gwenddolau son of Ceidio; in which battle Gwenddolau fell; Myrddin went mad." However, the earliest version of the same entry in Annales Cambriae (in the "A-text", written c. 1100), as well as a later copy (the "C-text", written towards the end of the 13th century), do not mention Myrddin. In another Black Book poem, "The Dialogue Between Merlin and His Sister Gwendydd", she dubs her brother a set of titles including the Judge of the North, the Prophet, the Master of Song, and the Warrior of Arfderydd. Nevertheless, even if Myrddin was presented as a historical figure in certain period sources, it does not necessarily mean that he really did exist.
Some scholarship considers him to be not a literary creation of the Middle Ages, but rather an echo of a much earlier legend, that would have been rediscovered, Christianised, and gradually reinvented by different authors, including Geoffrey. According to Claude Lecouteux, Merlin comes "from the literary adaptation and Christianisation of an individual from elsewhere, from a distant past that even 12th-century authors probably no longer understood." Legendary stories surrounding Merlin may thus have their origins not only in Celtic but even in pre-Celtic background, in a proto-myth prior to the changes brought by the influence of Christianity, as well as by the aristocratic traditions of the Britons of their time. Some "folkloric" beliefs, including a set of poetic and narrative traditions, would survive orally until the 12th century, when clerics committed this oral material to writing. In his earliest expressions, according to Walter, Merlin embodies magical sovereignty and shamanic royalty, quite far from the later warrior and priest functions, and his power is essentially spiritual. Shamanic practices show similarities with the powers attributed to Merlin, suggesting that he may have originated in a primitive Eurasian shamanism: feralisation, prophecy, and (especially) transformation into a bird. In more of arguably shamanistic characteristics, Merlin of the Vita rides a stag accompanied by a wolf and understands all animals that, in turn, all can understand him. Markale suggested that the original Merlin figure was an avatar of Cernunnos, a Celtic god of nature. For Villemarqué, a possible origin of the legend of Merlin may be the Roman story of Marsus, a son of the goddess Circe, which would eventually influence the Breton and Welsh tales of a supernaturally-born bard or enchanter named Marzin or Marddin.