The Regiam Majestatem is the earliest surviving work giving a comprehensive digest of the Law of Scotland. The name of the document is derived from its first two words. It consists of four books, treating (1) civil actions and jurisdictions, (2) judgments and executions, (3) contracts, and (4) crimes.
Dating from the early fourteenth century, it is largely based on the 1188 Tractatus de legibus et consuetudinibus regni Angliae (Treatise on the laws and customs of the Kingdom of England) of Ranulf de Glanvill, and incorporates features of thirteenth century canon law, the Summa in Titulos Decretalium of Goffredus of Trano, and the Scottish Celtic Laws of the Brets and Scots.
The documentary basis of Scots law had been largely destroyed by the confiscations of Edward I of England in the thirteenth century and by two devastating English invasions led by Edward I and Edward III in the thirteenth and fourteenth centuries. When the Regiam Majestatem was discovered in the early fifteenth century after Scotland's legal provenance had been destroyed, it was immediately embraced as an authoritative source of law, surviving as such into the modern era.
Sir John Skene had compiled and edited versions of the document at his own expense, and this was published by the Parliament of Scotland in 1609. Skene's version is not entirely consistent with the original document, but it held up as the standard version. Later legal references to the document are references to the 1609 publication.