The Welsh Dragon – Welsh: Y Ddraig Goch ("the red dragon") – appears on the national flag of Wales. The oldest-recorded use of the dragon to symbolize Wales is in the Historia Brittonum, written around AD 829, but it is popularly supposed to have been the battle standard of King Arthur and other ancient Celtic leaders.
In the Mabinogion story Lludd and Llefelys, the red dragon fights with an invading white dragon. His pained shrieks cause women to miscarry, animals to perish and plants to become barren. Lludd, king of Britain, goes to his wise brother Llefelys in France. Llefelys tells him to dig a pit in the centre of Britain, fill it with mead, and cover it with cloth. Lludd does this, and the dragons drink the mead and fall asleep. Lludd imprisons them, still wrapped in their cloth, in Dinas Emrys in Snowdonia.
The tale is taken up by Nennius in the Historia Brittonum. The dragons remain at Dinas Emrys for centuries until King Vortigern tries to build a castle there. Every night the castle walls and foundations are demolished by unseen forces. Vortigern consults his advisers, who tell him to find a boy with no natural father, and sacrifice him. Vortigern finds such a boy (who is later, in some tellings, to become Merlin) who is supposed to be the wisest wizard ever to live. On hearing that he is to be put to death to end the demolition of the walls, the boy is dismissive of the advice, and tells the king about the two dragons. Vortigern excavates the hill, freeing the dragons. They continue their fight and the red dragon finally defeats the white dragon. The boy tells Vortigern that the white dragon symbolizes the Saxons and that the red dragon symbolizes the people of Vortigern. If Vortigern is accepted to have lived in the 5th century, then these people are the British whom the Saxons failed to subdue and who became the Welsh.
Note that Arthur's father was named Uther Pendragon ('Pendragon': 'Pen' (Head) and 'Dragon', being translated by Geoffrey as "dragon's head").