Islamic law lays down detailed rules regulating the upbringing of children. This study examines the effect of these rules on parental behaviour by exploiting a unique natural experiment: the introduction of Sharia law in northern Nigeria. Both triple differences and spatial regression discontinuity estimates show that the Sharia has had a positive effect on fertility rates and the duration of breastfeeding. Empirical evidence further suggests that the Sharia has impacted on parental behaviour by increasing the economic returns to sons and by raising the value of conspicuous adherence to Islamic laws and customs. Moreover, duration analysis estimates show that the Sharia has increased the survival rate of newly born children. By contrast, it has had a negative impact on the survival rate of children aged 1 to 4. This latter effect is particularly pronounced for girls.