Counteracting law violation and the haphazard occupation of marginal land as an explanation for how risk becomes inherent to informal urbanisation, I demonstrate in this paper that hazardous conditions are an outcome of practices that seek to comply with planning law. Risk on the steep slopes of Lima is reproduced by unchanged and inflexible planning regulations and instruments, and not by their absence. Building on scholarship at the nexus of planning and informality, and borrowing from socio-spatial and legal geography, I argue that planning law and legal texts regulate the spatial layouts of human settlements in ways that produce concrete abstraction and exacerbate unintended outcomes.Using extensive case study research and ethnographic methods, I unpack three perverse spatial configurations on the peripheral slopes of Lima: the grid layout resulting in excessively steep access ways, electricity poles in the middle of staircases and dangerous evacuation routes. I demonstrate how manoeuvres of fragmentation, homogenisation, and hierarchical ordering, active in planning processes and legal texts, lead to material and corporeal violence that maintain dwellers in perpetual landscapes of risk.