This study considers self-defence in its function as a circumstance precluding wrongfulness, as codified in Article 21 of the ILC’s Articles on State Responsibility. The study examines the development of this provision in the work of the ILC and considers relevant practice by States and international tribunals in relation to the defence. The study explains that self-defence has two functions in international law. The right of self-defence, codified in Article 51 of the UN Charter and recognised in customary international law, is an exception to the prohibition of force. In the ILC terminology, the right of self-defence is a primary rule. The circumstance precluding wrongfulness of self-defence, contained in Article 21 ARS, serves to preclude the wrongfulness of potential breaches of obligations (other than the prohibition of force) binding the States involved in an armed conflict, so long as the breach of those obligations is a collateral effect of self-defensive forcible measures adopted in conformity with the requirements of the right of self-defence under international law. In the ILC terminology, this is self-defence in its function as a secondary rule.This is the author accepted manuscript. The final version is available from Oxford University Press via http://dx.doi.org/10.1093/bybil/brv01