According to rationalists and constructivists, compliance with international law occurs to the extent that states see non-compliance as unreasonable or wrong, respectively. An alternative account of compliance points to the practical difficulty of deciding to act contrary to international law. Here non-compliance is blocked rather than morally or instrumentally deterred. This article advances an organisational-process theory of this third kind. The explanatory mechanism lies in the constitutive rules of foreign policymaking, and points to the institutional function of legal advising. Under certain structural conditions (namely, lawyerised decision-making) legal advisers operate as the principal ‘agents of compliance’ within the state, bringing international law into the policymaking process and thus bridging the gap between foreign policy and legal expectations. The theory is applied to the interrogation programme implemented by the United States in the early years of the ‘War on Terror’ (2001–5). While initially violative of international legal standards, the programme eventually shifted towards compliance. Using process tracing, the case study provides fine-grained evidence that corroborates the explanatory power of organisational factors, in general, and legal advising, in particular.