If US President Donald Trump decided to test-launch a missile by firing it from one side of North Korea, with a trajectory over the country, and then landing it just off the opposite North Korean coast, we would probably be at war.

North Korea's Kim Jong-un, who has been vocal about his opposition to any military activity near his country's borders, would simply not tolerate such an intrusion. Yet, such a test-launch is exactly what the leader of North Korea is now said to be considering. The difference is that the North Korean missile would be fired east and over Japan before landing around 27 to 40km off the coast of the US Pacific territory of Guam.

North Korea has long been increasing its nuclear capabilities and missile technologies in absolute defiance of the international community. But if it flies a missile over Japan and lands it in the territorial waters of the United States, it would be breaching three important rules that have been helping to keep peace on the Korean Peninsula.

Failing to issue a notification

The first rule is the obligation of notification. It is extremely important for countries to share detailed information about their planned launches of intercontinental ballistic missiles. A failure to do so may cause grave misunderstandings that can even lead to an "accidental" nuclear war.

Before conducting a test-launch, every country is obliged to provide advance information about the launch date, launch area, direction of the missile and re-entry impact area. This obligation is heightened when a country is sending missiles outside its sovereign territory.

The goal of advance warning is to both build confidence between opposing sides and reduce the risk of war as a result of misinterpretation, miscalculation or accident.

OPINION: Why a war with North Korea is unlikely

North Korea is rarely providing notification to the international community for its test-launches, and when it does, the information provided is inadequate. It is yet to officially notify Japan or the US about its plans to fire missiles towards Guam. So far, the only information about the test-launch came from the North Korean state media, which simply announced that its military was drawing up plans to fire missiles in the waters off the coast of the US Pacific territory in the coming days.

Shooting missiles over foreign territory

Although destroying an unauthorised North Korean missile flying over Japan could be considered a sensible act of self-defence, such an act is still dangerous, since it can easily trigger a destructive chain reaction.

The second rule Kim Jong-un would be breaching with this test-launch is about missile trajectory. Countries are expected to test missiles over their own territory or over international spaces such as the high seas. Flying missiles over other countries, especially without their consent, is unacceptable in international law. North Korea first breached this rule in 1998 by flying a missile over Japan.

North Korea has announced that it is planning to fly another missile over Japan in the coming days, but it certainly did not contact the Japanese government to ask whether it would consent to such an intrusion. Also, it is safe to assume that even if North Koreans asked for permission, Japan would say "no".

Although international law is not clear about the boundary between the airspace above a country and common space, when a country determines that its airspace is violated and national security put at risk, it is allowed to take strong action.

For example, in 1960, a US U-2 spy plane was shot down while operating around 70,000 feet (well-above what is normally considered national airspace) above the Soviet Union, but Moscow's decision to down the plane was not considered a breach of international law.

So, if the US or Japan were able to shoot down a North Korean missile as it went over their territories - at whatever altitude - without their consent, this would not be in breach of international law. Although destroying an unauthorised North Korean missile flying over Japan could be considered a sensible act of self-defence, such an act is still dangerous, since it can easily trigger a destructive chain reaction.

READ MORE: North Korea explained in graphics

Landing missiles in foreign waters

The third rule Kim Jong-un would be breaching with this test-launch is about target locations. Countries are expected to test their missiles within their borders or at least land them in the high seas. Conducting a test-launch which would conclude with a missile landing in the territory of another country is not acceptable.

In essence, international law creates circles around the land of a country and projects their sovereignty into the ocean. The maritime boundaries recognised under international law include three main circles: the territorial sea, the contiguous zone and the exclusive economic zone. The rights and responsibilities within these circles become stronger the closer to the land they area.

While the countries have limited sovereignty in the exclusive economic zone, which is the outer circle of their maritime boundary, in tighter circles, namely the territorial sea (12 nautical miles or 22km from the shore) and the contiguous zone (24 nautical miles or 44km) they have much stronger sovereign rights.

If the information coming out of North Korea is correct, it is aiming for the missile to come down approximately 27km from Guam. This means that the missile will fall just outside the territorial sea and within the contiguous zone of the United States.

Japan previously tolerated North Korea testing missiles just outside its exclusive economic zone. But Kim Jung-un's latest test-launch is aiming to violate the contiguous, or possibly territorial, zones of the US. The significance of this difference cannot be underestimated as the missiles are going to impact much closer to land in a territory under US sovereign control. After all, Guam, as US overseas territory, possesses exactly the same rights over the oceans connected to it as California or Florida.

The likelihood of Trump withstanding these provocations with regards to notification, trajectory and impact zones, is about the same as Kim Jong-un doing the same if he were presented with a similar scenario.

The US president has already warned North Korea to expect "big, big trouble" if anything happens to Guam.

Hard times are on the horizon for the Korean Peninsula.

Alexander Gillespie is professor of international law at the University of Waikato, New Zealand. His research focuses on laws of war and armed conflict. He is the author of the three-volume set "A History of the Laws of War" and the three-volume set "The Causes of War".

The views expressed in this article are the author's own and do not necessarily reflect Al Jazeera's editorial policy.