In the Mabinogion, a Red Dragon is attacked by an invading White Dragon in Britain. Lludd, the God-king of the island, goes to see his brother Llefelys in Gaul (France). He tells his brother and is told to dig a pit in the middle of the island and fill it with bragawt and cover it with cloth. Lludd takes the advice, and the two dragons fall asleep. He uses the cloth to bind the two of them and imprisons them at Dinas Emrys.
In Historia Brittonum, we find Vortigern attempting to build a castle at the same Dinas Emrys to protect himself from the Anglo-Saxons. But his efforts are useless as each night all the work of the previous day is destroyed. Unable to set any foundation to what is to be his stronghold, he gathers the wisest of his warriors and elders and asks them what is to be done. They tell him to find a fatherless boy and sacrifice him on the site. The boy they find, unidentified there but later called Merlin, laughs at their prediction and instead explains about the dragons and their history. With this knowledge Vortigern digs up the hill, discovers the dragons, and watches the red one kill the white one. The boy then gives the prophesy that the Red Dragon symbolizes the Welsh and the White the Anglo-Saxons and the outcome of the battle means that the British (Welsh) people will eventually defeat the invaders. Vortigern, however, is attacked by a fellow Briton named Ambrosius and burns to death in his stronghold.
The same story is found in Geoffrey of Monmouth’s ‘Historia Regum Britanniae’, only expanded upon (as the great storyteller often did). In his version, the boy is named Merlin Ambrosius and the Red Dragon is specifically linked to Arthur and not the British people. The scene serves as an introduction to Arthur’s career in that his is to be the golden age of the British people. The dragons, coming together in the mythical past, are unbound to finish their epic battle as heralds of the new age.
Historically, the Red Dragon was linked specifically to Gwynedd. This could be because Gwynedd was originally symbolized by the Red Dragon. It is equally possible that Gwynedd, whose kings had sponsored and directed the contents of the Historia Brittonum, took on the icon because they were attempting to unite all the British people under their banner.
The White Dragon appears to have been linked specifically to Wessex, and there is historical evidence of their use of it as early as 726. It is also a curious fact that the early Wessex kings had Celtic names. It is possible that the ancient symbols as found in the myth of Lludd originally meant that Gwynedd and Wessex (originally British Dubonnia) were rivals. It is also entirely possible that the White Dragon originally stood for something entirely different, for example a specific Roman legion, Picts, or Irish marauders. It may also be that both dragons’ original meaning was lost long before the writing of the Mabinogion. Unfortunately, we have no evidence of what the earlier meaning might have been.