Mabinogion
The Mabinogion is a collection of Welsh medieval tales, most in prose. The title is a 19th century fabrication by Lady Charlotte Guest who was the first to translate them into English and publish them. The word "mabinogi" probably means a tale of a hero.
Sources
The tales are preserved in two manuscripts of the 14th - 15th centuries, the White Book of Rhydderch (Llyfr Gwyn Rhydderch) and the Red Book of Hergest (Llyfr Coch Hergest).
The Four Branches
The first four tales, known as the Four Branches of the Mabinogion, have been interpreted as developments from the story of the birth, life and death of the hero Pryderi, but much changed. Pwyll Prince of Dyfed recounts his birth. He has all but disappeared from the second branch, Branwen daughter of Llŷr. In the third, Manawydan, son of Llŷr, Pryderi is imprisoned in the Otherworld and freed by Manawydan. The fourth, Math son of Mathonwy, contains his death, though it is subordinated to other elements in the story, which has become the story of Llew Llaw Gyffes. Each of the tales ends with a statement that it is a branch of the mabinogi.
It is possible that the principal characters in these tales are humanised Celtic deities.
The story of Llew Law Gyffes was used by Alan Garner as the background for his novel The Owl Service.