David I, king of Scots (1124-53), has long wielded a posthumous reputation as one of Scotland's most important lawmakers. Yet there has been little scholarly attention paid to the 'assizes' circulating under his name; indeed, the identification of a coherent and stable text of David's laws has long been thought a false hope. This article argues that this view is mistaken: the original structure and content of the so-called 'Assizes of David' can be established. However, that text contains very little legislative material attributable to David himself but instead was an exercise to create legal antiquity for Robert I (1306-29) at a time when that most insecure of kings was conducting a programme of written legitimisation of his kingship. The 'Assizes of David I' were, more properly, an attempt to convey Robert's own legislative aims through association with his long-dead but illustrious predecessor, David I. Finally, understanding the correct form of the 'Assizes of David' can unlock the nature of some of the other 'auld law' compilations and possibly even provide an entry into that most intractable of legal treatises, Regiam Majestatem.