The article explains the essential features of a theory of global justice that combines justice for individuals with justice for political communities. It holds that arguing within the justificatory framework of cosmopolitanism is compatible with a conditional justification of states that are basically just. The justification rests on an argument I will name ‘the moral path dependency argument’. The article follows its normative consequences into the fields of a justly ordered community of legitimate states and of cosmopolitan principles of distributive justice. Thus, it reconciles the latter with claims to political autonomy of particular communities and with the fact of reasonable disagreement between them.