This paper focuses on the informal occupation of public housing in Naples (Italy), analysing a specific mechanism, the fraudulent takeover, which is an alternative to ‘ordinary squatting’ (i.e. breaking into vacant dwellings) in terms of accessing a housing unit illegally. This mechanism proliferates symbiotically with the formal system regulating the inheritance of public housing units, which creates the space of possibility within which fraudulent takeover was born and spread. A complex regulatory environment emerges as the background of this informal practice, within which the actors of the illegal city can exploit legal loopholes and juggle formality and informality in order to satisfy their housing needs. By reading this case study through some analytical tools offered by both Southern urban theory and Northern legal studies, this paper contributes primarily to the international debate on the nexus between urban informality and the State: it shows the fundamental, multifaceted role of various public institutions in shaping the illegal city, both actively – through (selective or rough) labelling and (mediated or failed) implementation – and passively – through their mere existence.