Self-defence in international law
International law recognizes a right of self-defence according to the Chapter VII, Article 51 of the UN Charter, as the International Court of Justice (ICJ) affirmed in the Nicaragua Case on the use of force. Some commentators believe that the effect of Article 51 is only to preserve this right when an armed attack occurs, and that other acts of self-defence are banned by article 2(4).
Source: Wikipedia — Self-defence in international law (CC BY-SA 4.0)