Current perspectives on informal housing (particularly, the illegal development of precarious, self-produced housing areas) associate it with state regulations. However, scholars have yet to link informal housing and the socio-historical regulations that gave rise to the birth of urban planning at the beginning of the 20th century. This article draws on archival and historiographical research to discuss the juridical construction of informal urbanisation in two capital cities at the core of the world-system, Paris and Madrid. In both cities, shantytowns were legally developed from at least the 19th century. However, such spatial production was outlawed (without addressing the root causes) from the first decades of the 20th century. Thus, precarious housing became informal housing as we know it today, giving rise to comparable but differentiated patterns of legal and extra-legal shacks construction, commercialisation and control (much like those generally associated with the global south). This article traces the long-durée and transnational nature of the informalisation of self-produced housing during the first half of the 20th century. Housing tenure conditions and shelter rights were weakened not only in Europe but also in other areas under its political and cultural influence. European urban policies, developed during the first half of the 20th century, may have induced dynamics of informal spatial production at a global scale.