After days of stonewalling, Saudi Arabia has now admitted its involvement in the murder of Jamal Khashoggi in the Saudi consulate in Istanbul. But it remains unclear what led Prince Mohammed bin Salman to order the assassination or acquiesce to it. Commentators have seen in Khashoggi’s death a great political miscalculation by the prince. He seems to have thought that if the West’s need for Saudi oil, arms purchases and large-scale investment—plus the most pro-Saudi president ever to sit in the White House—had given him a green light for vicious airstrikes in Yemen, as well as human rights violations within the kingdom itself, then surely the West would not care about the killing of one critical journalist. Indeed, it turned out the West—at least for now—has shown far more outrage over Khashoggi’s death than it did for those other abuses.

But media accounts have missed one key aspect of the prince’s miscalculation—one that makes the global reaction to the Istanbul murder less surprising. In killing Khashoggi, Saudi Arabia flouted two core rules of international law: the ban on extraterritorial enforcement of a state’s laws or policies, and the requirements for lawful uses of diplomatic missions. Those rules, developed to protect states from one another’s misdeeds, are central to the stability of the state system. They enjoy a depth of commitment that goes beyond states’ concern for human rights or international humanitarian law. While states can get away with violating them sometimes, impunity and non-enforcement are not to be assumed.

The first rule, one of customary law, prohibits states from sending their agents to the territory of another state to execute their own laws or policies. This ban on the extraterritorial enforcement of a state’s laws or policies comes from international law’s basic rules on jurisdiction. While states enjoy jurisdiction to prescribe laws governing some conduct beyond their borders—e.g., by their own nationals—and states can use their courts to adjudicate matters taking place abroad, enforcement of a state’s laws or policies on another state’s territory without the permission of the other state is unlawful. Killing a dissident abroad clearly violates this rule.

The ban on unconsented extraterritorial enforcement is related to two other rules. First, a state breaching this rule violates international law’s ban on intervention in the internal affairs of other states. While states and scholars disagree as to the scope of that rule—whether it covers electoral aid to opposition groups, for example—extraterritorial enforcement clearly crosses the line because of its blatantly coercive nature. Second, the ban on extraterritorial enforcement is a first cousin of international law’s most important rule, the ban on the use of force in article 2(4) of the U.N. Charter. Though international lawyers often argue about whether an overseas operation by one state constitutes a use of force, my own view is that the threshold of coercion to trigger a violation of the Charter involves military action, not found in the overseas enforcement operation.

Violations of the ban on unconsented extraterritorial enforcement are not unheard of, however. And states have forgiven one another for extraterritorial kidnappings of criminal suspects. Israel and Argentina patched things up in a few months after the kidnapping of Adolf Eichmann in 1960, and the United States and Mexico moved on from the U.S. kidnapping of Humberto Alvarez-Machain in 1990. But when a state crosses the line from law enforcement to killing someone abroad, the consequences can be far worse.

Several examples deserve mention. When the Mossad killed a waiter in Lillehammer, Norway, in 1973 after mistaking him for one of the plotters of the Munich Olympic massacre, the agency’s operations in Europe came under intense scrutiny, and Israel eventually paid compensation to the waiter's family two decades later. When Chile’s generals organized the assassination of the country’s former ambassador Orlando Letelier at Sheridan Circle in Washington in 1976, the murder outraged the U.S. government in a way that the junta’s executions and disappearances of thousands of political opponents never did, and the United States did not relent until the officials who ordered the hit were prosecuted in U.S. courts. Iranian agents have also been prosecuted for extraterritorial murders, including France’s prosecution of one of the killers of Shapour Bakhtiar, the Shah’s last prime minister, who was murdered outside Paris in 1991. The British fury at the assassination of Alexander Litvinenko in 2006 damaged relations between Russia and the U.K., and the Kremlin’s attempted assassination of Sergei Skripal and his daughter this year—resulting in the death of a British woman who chanced upon the poison—have brought the relationship to a low point.

Still, states have gotten away with murdering people abroad. Some of the Mossad’s assassinations have taken place in countries without the ability or interest in retaliating against Israel or arresting its agents for those actions—most recently in the 2010 killing of a Hamas leader in an Abu Dhabi hotel. In 1978, at the height of the Cold War, Bulgaria killed the dissident Georgi Markov while he waited for a bus on Waterloo Bridge in London. Nobody was ever caught.

Khashoggi’s murder was not just a killing on Turkish soil, but one that violated a second core rule of international law: diplomatic and consular missions must be used for specific official purposes, in exchange for which states hosting embassies and consulates must grant the buildings and staff diplomatic or consular immunity. This rule appears in both the 1961 Vienna Convention on Diplomatic Relations and the 1963 Vienna Convention on Consular Relations. Under the consular convention, the first listed function of a consulate is “protecting in the receiving State the interests of the sending State and of its nationals, both individuals and bodies corporate, within the limits permitted by international law.” Another article states that consular officials must “respect the laws and regulations” of the host state. It doesn’t take an international lawyer to conclude that murdering one of your citizens in a consulate violates this rule.

Host states tolerate some flexibility when it comes to diplomats carrying out their functions—embassies often house spies—but when diplomats really abused their positions, host states find ways to respond. When in 1984 a gunman in Libya’s embassy in London killed a policewoman monitoring a demonstration outside, U.K.-Libyan relations reached a nadir and were only revived 15 years later following an apology and compensation by Libya. When a Georgian diplomat killed a Maryland teenager in a car crash in 1997, the State Department pressured Georgia to waive the diplomat’s immunity, after which he was arrested, pleaded guilty, and went to prison. In comparison, the murder of Khashoggi took place inside the consulate and involved an element of treachery not seen in those two episodes.

The Vienna Conventions are central to interstate relations, because states with embassies and consulates generally see those entities as performing important purposes—maintaining dialogue and helping citizens and companies in the host state. Thus, even when the sending state is suspected of violating the conventions, host states are still banned under customary international law—reflected in article 50(2)(b) of the International Law Commission’s Articles on State Responsibility —from entering a mission or arresting diplomats. And they respect that ban so as not to weaken the immunity provisions and set a precedent that another state might use against their own embassy. Witness Turkey's seeking of permission from Saudi Arabia before sending its investigators into the Saudi consulate, the U.K.’s refusal to extricate Julian Assange from the Ecuadorian embassy, the Chinese toleration of Fang Lizhi’s temporary refuge in the U.S. Embassy in 1989-90, and the U.S. military’s waiting game outside the papal embassy in Panama City for the emergence of Manuel Noriega. Iran’s seizure of the U.S. Embassy in 1979 stands as the only major example of an intrusion by the host state, and the country’s international reputation plunged as a result.

Both of these rules of international law represent a bargain that both sides have an interest in keeping. Keep your hit-men off my territory and I’ll keep mine off yours; use your embassies and consulates for diplomatic purposes, and we’ll leave them alone. Each rule provides security to states, both that they need not worry about foreign agents committing crimes on their soil, including those that might hurt their own citizens, and that diplomacy will function even when the sending state and the host state have tense relations. The killing of Khashoggi undercuts this bargain.

Concerns over human rights aren’t absent from the condemnation over Khashoggi’s fate. International attention has been galvanized in part because the event seems to have involved an extrajudicial killing, torture and a forced disappearance—three of the worst human rights violations imaginable—as well as an attack on journalism and free expression. (Saudi Arabia is a party to the Convention Against Torture; the other two acts are clearly violations of customary international human rights law; and most states agree these bans cover a state’s acts abroad.) But those concerns alone don’t explain the outrage here compared to Saudi abuses in the kingdom’s own backyard.

In the end, Khashoggi’s murder and the reaction to it are a sort of quadruple-edged sword for international law. First, the killing itself suggests that states still may find incentives to violate the core rules—even if they miscalculate. Second, the strong international reaction so far represents a reassertion and enforcement of the rules. Third, the coming weeks and months will be important if states care about preserving these two rules. If the current outrage dies down for the sake of better relations with Saudi Arabia, future violators will be encouraged. The U.S. reaction is clearly key in this regard; these are rules that even this administration ought to see benefits in reinforcing. Finally, the outrage so far highlights the lag in responses to systematic violations of international human rights law or humanitarian law. Mass atrocities should garner greater outrage than the death of one journalist. But sometimes it’s only when a state breaks the rules meant to protect other states—not those meant to protect people—that the international community sits up and notices.