As a recent example, the territory of Nagorno-Karabakh was recognized to be a part of Azerbaijan by the UN and most countries but de-facto controlled by Armenia. Does this mean that Azerbaijan's war to reclaim said territory was fully legal according to international law? We have a precedent where the UN authorized military action to resolve a territorial dispute, but I'm not sure if such a resolution was ever required in the case of Azerbaijan.
Article 51 allows for countries to exercise the right to self defense when they come under attack:
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, [...]
After a successful attack, the proper, legal process is for the occupied country to petition the security council, which may then authorise the use of force.
In practice, there are 1000 variations on this and 1000 individual situations.
1I don't read any such limitation from just this article. It says a country can defend itself. No more. No less. If you lose some territory yesterday, you can't counterattack from the remainder today? Next week? Next month? 10 years later? I mean, I don't necessarily say you're wrong - in I rather suspect the UN would claim N-K wasn't behaving 2 years ago - it is just not apparent from the cited article Also, N-K was not occupied as a whole and maybe petition council is for countries who have no recourse, having been fully occupied. Dec 15, 2022 at 6:31
1You need to read the whole of section 8. The whole idea of the UN is that countries don't act unilaterally. The second half of article 51 says "you must report your action in defence to the UNSC" and the rest of section 8 says "The UN will sort it out". However not the important final paragraph.– James KDec 15, 2022 at 6:37
The problem is that the UNSC's verdict on who can and can't use force generally depends on the interests of the permanent members rather than fairness or law, but certainly the above is the theoretical situation.– Stuart FDec 15, 2022 at 9:30