Recent cosmopolitan thinking attempts to find a place for local (including national) attachment, but all of the proposals offered have been exposed to telling critique. There are objections to the claim that local obligations are only instances of cosmopolitan duty, and to the claim that we can give a moral justification to national societies as networks of mutual benefit. This article argues that it is not mutual benefit but mutual risk that grounds compatriot preference. While exposure to coercion as such does not track national boundaries, exposure to the risks of state abuse, political choice, and social conformity provide us with a reason to take our compatriots' interests seriously. The same argument, however, displays the limits of this reasoning, and also grounds a demanding obligation to aid other societies.