Since the emergence of Somali piracy as a threat to the circulation of cargo and capital through the Gulf of Aden, we have seen a massive effort on the part of global institutions, states, militaries, and private sector actors to protect this major artery of global commerce. This paper offers an analysis of the new institutional patchwork of ‘counterpiracy’ through the lens of the production of security space. What comes into focus then are the historical and contemporary processes of securing the conditions of capital circulation through war, law, primitive accumulation, and the enclosure of maritime spaces. By bringing together Foucault’s analysis of security and Marx’s analysis of capital circulation under the rubric of the production of space, I put forth a theory of production of security space as forming part of an infrastructure of circulation. Ultimately, I argue that legal, carceral, bureaucratic, and military practices are constitutive of this process of spatial production. Under the rubric of counterpiracy, law and discipline (as Foucault once wrote) have become ‘armatures’ in the apparatus of security. They have also become cornerstones of the new infrastructure of global capital circulation.