Article 51: Nothing in the present Charter shall impair the inherent right of collective or individual self-defence if an armed attack occurs against a member of the United Nations, until the Security Council has taken the measures necessary to maintain international peace and security.
The traditional customary rules on self-defence derive from an early diplomatic incident between the United States and the United Kingdom over the killing on some US citizens engaged in an attack on Canada, then a British colony.