Railway-edge settlements in Indonesian cities are commonly framed as illegal encroachments or failures of spatial planning. Such perspectives, however, overlook how these spaces persist through everyday negotiations and relational governance. This article examines how political networks shape the production and sustainability of space in Dupak Magersari’s railway-edge settlement, Surabaya. Drawing on a qualitative case study approach—combining in-depth interviews, field observation, document analysis, and institutional and media reports—the study analyses interactions among residents, neighbourhood associations, municipal authorities, legislators, the railway company (PT KAI), civil society organisations, and academic communities.The findings reveal that the settlement’s persistence is not merely the outcome of weak law enforcement or residents’ resistance, but of negotiated governance. Legal ambiguity creates structural conditions that enable occupation, while political networks operationally mediate tensions between state regulations and residents’ livelihoods. Administrative recognition, selective tolerance, and infrastructural interventions generate de facto legitimacy without formal land rights. Community organisations, CSOs, and universities further transform lived space into representational force by converting everyday experiences into policy claims and public legitimacy. Historically, earlier collective mobilisations have also sedimented channels of mediation that normalise negotiation over coercion.The study contributes theoretically by extending Lefebvre’s concept of the production of space toward a relational and networked perspective, showing that informality is not the absence of governance but a form of governance enacted through political mediation. Railway-edge space thus emerges as a hybrid, continuously assembled through negotiation rather than determined solely by law.