The promise of artificial intelligence (AI) is increasingly invoked to ‘revolutionize’ practices of global security governance, including in the domain of border control. Legal scholarship tends to confront these changes by foregrounding the rule of law challenges associated with nascent forms of governance by data, and by imposing new regulatory standards. Yet, little is known about how these algorithmic systems are already reconfiguring legal norms and processes, while generating novel security techniques and practices for knowing and governing “risk” before the border. Exploring these questions, this article makes three important contributions to the literature. On an empirical level, it provides an original socio-legal study of the processes constructing and implementing Cerberus – an AI-based risk-analysis platform deployed by the UK Home Office. This analysis provides unique insight into the institutional frictions, legal mediations and emergent governance formations involved in the introduction of this algorithmic bordering system. On a methodological level, the article directly engages with the focus on ‘legal infrastructures’ in this special issue. It uses an original approach (infra-legalities) which follows how legal and infrastructural elements are relationally and materially tied together in practice. Rather than trying to conceptually settle the relation between law and infrastructure – or qualifying law as a sui generis infrastructure – the article traces incipient modes of governmentality and regulatory ordering in which both legal and infrastructural elements are metabolized. In its account of Cerberus, the article analyzes this emergent composition as a dispositif of speculative suspicion. Finally, on a normative and political level, the article signals the significant stakes involved in this algorithmic enactment of risk. It shows how prevailing regulatory tropes revolving around ‘debiasing’ and retention of a ‘human in the loop’ offer a limited register of remedy, and work to amplify the reach of Cerberus. We conclude with reflections on critiquing algorithmic systems like Cerberus through the emergent infrastructural relations they enact.