Welsh law was a form of Celtic law with many similarities to the Brehon law of Ireland and particularly the customs and terminology of the Britons of Strathclyde. It was passed down orally by jurists and bards and, according to tradition, only first codified during the reign of Hywel Dda in the mid-10th century. The earliest surviving manuscripts, however, are in Latin, date from the early 13th century, and show marked regional differences. The law is only known to have been revised by a few rulers (particularly Bleddyn ap Cynfyn, who was credited with revisions retained in the kingdom of Powys) but was obviously updated by jurists in response to changing jurisdictions and circumstances, so that the surviving manuscripts cannot be considered an accurate portrayal of Hywel's first code.
Notable features of Welsh law include the collective responsibility of kindreds (Welsh: cenedl) for their members; the gavelkind inheritance of land among all and only male descendants; a status-based system of blood money (galanas); slavery and serfdom; the inability of foreigners to naturalize earlier than the fourth generation; and very lax treatment of divorce and legitimacy that scandalized the non-native clergy.
The laws include the "laws of the court", the laws laying down the obligations and entitlements of the king and the officers of his court and the "laws of the country" dealing with every other topic. In some versions of the laws some of the material in the laws of the country are split off into the "justices' test book" dealing with homicide, theft and the values of wild and tame animals and other items. Within each of these sections there are tracts of varying length dealing with different subjects, for example the law of women and the law of contracts. Civil law differed from most other codes of law in the rule that on a landowner's death his land was to be shared equally between his sons, legitimate and illegitimate. This caused conflict with the church, as under canon law illegitimate children could not inherit.
Once a case came to court, the method used to come to a decision was usually by compurgation. Under this system the person accused or the parties to a dispute would give their version under oath, following which they had to find a number of others who would take an oath that the principal's oath could be trusted. The number of compurgators required depended on the nature of the case. The judge or judges would then come to a decision. Capital punishment was only prescribed for a small number of crimes. Homicide was usually dealt with by the payment of compensation to the victim's family, while theft could be punished by death only if it was theft by stealth and the thief was caught with the goods in hand; the value of the goods stolen also had to exceed four pence. Most other offences were punished by a fine.
Most of the surviving manuscripts of Welsh law start with a preamble explaining how the laws were codified by Hywel. The introduction to the Book of Blegywryd is a typical example: