President Trump touched on an important moral and legal issue when he said he called off a planned strike against Iran because it was “not proportionate.” Iran’s shooting down of a U.S. drone, he said, did not warrant an attack that might kill 150 people. That forbearance, however, was nowhere to be found, just days later, when Trump threw caution to the wind and threatened Iran with “overwhelming force” if it dared to attack “anything American.”

The president was right the first time. Trump being Trump, it is unclear whether he called off the Iranian strike because it violated international law and the considered opinion of his legal advisers, or violated his isolationist tendencies, or simply because he was following his gut. But the principle of proportionality is a cornerstone of international law’s regulation of military force and ought to be front and center in any discussion of retaliation for potential Iranian acts of aggression.

At its core, “proportionality” refers to the idea that the amount of military force deployed by a nation should be correlated to the threat it faces. The intention behind the principle is to prevent a state from using a small threat to justify a massive overreaction — using a metaphorical pinprick as a pretext for destroying another nation. The concept reinforces the idea that even in times of war, ethical and legal norms apply that constrain unnecessary killing and discourage escalation. States that ignore these rules violate international law.

Questions about proportionality arise once it’s been established that a state has the right to use force in the first place. According to the United Nations Charter, states are permitted to use military force in only two circumstances: when authorized by the U.N. Security Council or when acting in self-defense. The law on self-defense is outlined in Article 51 of the U.N. Charter, which permits states to exercise self-defense after an “armed attack occurs.”

Although the Charter does not define “armed attack,” the International Court of Justice, the world court based in The Hague, has held that only the “most grave forms of the use of force” — as opposed to a mere “frontier incident” such as a border skirmish — can trigger the right of self-defense. (The United States is not a member of the International Court of Justice, but it is a signatory of the U.N. Charter and recognizes that Article 51 is a binding expression of the law of self-defense.)

It is far from clear that Iran’s shooting down of a U.S. Global Hawk drone, on June 20, was “grave” enough to pass that threshold. Even assuming that the drone was flying over international waters (as opposed to in Iranian airspace), it is doubtful that the destruction of a single unmanned craft, outside of American territory, is consequential enough to trigger the right of self-defense. (It’s pretty much the definition of a “frontier incident.”) A future Iranian attack would cross the “armed attack” threshold if, for example, it destroys a manned aircraft and takes American lives.

If self-defense is justified, the principle of proportionality kicks in. Although Article 51 does not explicitly refer to proportionality, states generally agree that disproportionate military force — responding to an isolated mortar attack that kills a handful of soldiers with a full-blown invasion, for example — violates the U.N. Charter.

Determining what constitutes a “proportionate” response is not an exact science. When military analysts and international lawyers do so, they start by carefully considering the legitimate interest that a state seeks to protect through force. A classic case study is the Falklands War between Britain and Argentina, in 1982, which began when Argentina, ruled by a military junta, sent naval forces to invade and occupy the Falkland Islands, which were under British rule.

Britain sent its Royal Navy to take back the islands — and succeeded after a 10-week war. If the British had gone further by, for example, invading Argentina’s homeland and toppling its government, this would have been disproportionate. Plans for the defensive strike against Iran that Trump canceled reportedly called for taking out multiple Iranian missile batteries and radar stations, actions the president was apparently told might lead to the death count he cited. But if we accept, for the sake of argument, that a strike by the United States was justified, a pared-down one might have met the requirements of proportionality. For example, destroying a single antiaircraft missile battery — specifically, the one that shot down the drone — would send an important message while likely remaining lawful.

If Iran attacked an American frigate or an aircraft carrier, or other U.S. assets in the Middle East, and American soldiers or civilians died, the principle of proportionality would permit greater defensive force. The United States could use more missiles, destroy more targets, and take more lives, depending on the severity of Iran’s actions. But in assessing proportionality, it is important to remember that defensive force is designed to stop the next attack, not to retaliate for the previous one.

Proportionality demands a tight correspondence between the threat faced and the force used to alleviate it. “Overwhelming force,” as Trump threatened (he also used the word “obliteration”), is only proportionate when a state is faced with the most extreme of threats, one that threatens the lives of many citizens, and even then it must be restricted to military targets. In other words, invading Iran or toppling its government would only be proportionate if the United States or its allies had experienced an attack with substantial casualties, and faced a continued threat of very high magnitude.

The principle of proportionality, and the rules regarding self-defense, are enforced in the same way as the rest of international law. States can be brought before the International Court of Justice and its political leaders indicted by the International Criminal Court for the crime of aggression. The United States refuses to accept the jurisdiction of these court. Beyond official tribunals, however, the international community enforces international law by criticizing rogue nations that flout that law, isolating them from lucrative treaty arrangements, or imposing economic sanctions.

Some American nationalists and hawks think we should ignore international law because we have the political power and military strength to get away with it. This would be shortsighted. In a future marked by a rising China, hypersonic missiles, cyberattacks, and technologically advanced but inexpensive weapons, even middling military powers might have the capacity to strike the United States. The principle of proportionality, and restrictions generally on the use of force, will protect the United States just as much as weaker military powers.

Although Trump called off the missile strike against Iran, his game of brinkmanship continues, and a military conflict is still possible. In assessing future responses, the United States must keep proportionality in mind, for reasons of law, morality, and sanity.