The use of force by states and inter-governmental organizations in international law is controlled by both customary international law and by treaty law. As a legal matter, the use of force may be justified only in self-defense or when authorized by the United Nations Security Council. The UN Charter reads in article 2(4):
This principle is now considered to be a part of customary international law, and has the effect of banning the use of armed force except for two situations authorized by the UN Charter. Firstly, the Security Council, under powers granted in articles 24 and 25, and Chapter VII of the Charter, may authorize collective action to maintain or enforce international peace and security. Secondly, Article 51 also states that: "Nothing in the present Charter shall impair the inherent right of individual or collective self-defence if an armed attack occurs against a member of the United Nations." There are also more controversial claims by some states of a right of humanitarian intervention, reprisals and the protection of nationals abroad. Concomitant with Article 51’s right to self-defense it Article 2(4)’s prohibition against “the threat or use of force against the territorial integrity or political independence of any state."