That we are now engaged in a discussion of likely Saudi responsibility for the alleged torture, execution, and dismemberment of a journalist on Turkish soil might have seemed unimaginable just weeks ago. That it is no longer so speaks to the dark moment we find ourselves in, with certain members of the Trump administration conveying the impression of inconvenience and credulity rather than horror and condemnation.

At the risk of seeming somewhat antiseptic in parsing some of the legal issues involved in this human tragedy, it seems prudent to clarify some basic principles.

Saudi Arabia’s embassy in Turkey is in Ankara. It also has a consulate general in Istanbul. This is where Jamal Khashoggi went on October 2 to get a document certifying his divorce, so that he could marry his fiancée, Hatice Cengiz. A consular official had informed him that the required paperwork had come through, and that he should come to the Saudi consulate at 1 p.m. His fiancée accompanied him there but stayed outside. She has not seen him since.

The consul general of Saudi Arabia in Turkey is Mohammad al-Otaibi. Perhaps not surprisingly, al-Otaibi has reportedly departed Turkey for Riyadh, just before his residence—which is located 500 yards from the consulate—was due to be searched by Turkish police. Khashoggi was reportedly beaten, tortured and killed inside al-Otaibi’s office with al-Otaibi present. In addition to al-Otaibi, news outlets have reported that Turkish authorities have identified 15 individuals who flew from Saudi Arabia to Turkey on the morning of October 2 and departed the country later that same day. These individuals are suspected by Turkish authorities of having participated in Khashoggi’s possible interrogation, torture and execution. There is no indication that any of them were classified as consular officials or staff, although at least some of them appear to have been current or former Saudi government officials, with ties to Saudi Crown Prince Mohammed bin Salman.

Questions have been raised about what it means for these abhorrent acts to have taken place on consular premises. In addition, if Turkey or another country tried to prosecute any of these individuals for Khashoggi’s murder, the issue of consular or foreign official immunity could arise.

Turkey and Saudi Arabia are both parties to the Vienna Convention on Consular Relations (VCCR). Because the alleged acts took place at a consulate rather than the Saudi embassy, the VCCR is the first place to look for potentially applicable immunities. Consular and diplomatic immunity share some features but are also distinguishable in important ways. Here are five take-aways from the VCCR that can help inform the discussion of next steps. That said, the primary obstacles to imposing consequences on Saudi Arabia and its officials will likely stem from a lack of political will, rather than the absence of a legal basis for proceeding.

First, consular functions are narrower in scope than diplomatic functions. Article 5 of the VCCR enumerates consular functions, which primarily involve assisting nationals of the sending state (here, Saudi Arabia), performing administrative functions, issuing passports and travel documents to nationals of the sending state, and issuing visas to persons wishing to travel to the sending state.

Second, the establishment of a consular post and admission of consular staff from the sending state can be done only with the permission of the receiving state. For example, article 4 of the VCCR indicates that “a consular post may be established in the territory of the receiving state only with that state’s consent,” and article 23 provides that “the receiving state may at any time notify the sending state that a consular officer is persona non grata or that any other member of the consular staff is not acceptable.” There are also limits on what can be done with the consular premises—for example, article 29 allows the sending state to fly its flag and display its coat-of-arms on the building occupied by the consular post and on the residence of the head of the consular post, providing this is done with due regard for “the laws, regulations and usages of the receiving state.”

Third, the inviolability of consular premises does not turn these premises into “territory” of the sending state. Article 31 provides that consular premises are inviolable “to the extent provided in this article.” The principle of inviolability limits what Turkey can do on the premises of Saudi Arabia’s consulate without Saudi Arabia’s consent; it does not give Saudi Arabia carte blanche to engage in unlawful conduct. Under article 31, authorities of the receiving state generally require consent to enter “that part of the consular premises which is used exclusively for the purpose of the work of the consular post,” except that in case of fire or other disaster “requiring prompt protective action” such consent may be assumed. That is why there was a significant delay between Khashoggi’s disappearance and Turkey’s on-site investigation, to which Saudi Arabia eventually consented. (The inviolability of consular premises is also why Turkey has been coy about disclosing the provenance of its audio recordings of activities within the consulate, having initially claimed that they were generated by Khashoggi’s own Apple watch.)

Fourth, consular officials are not entitled to absolute immunity from legal proceedings in the receiving state. Article 41 provides that “consular officers shall not be liable to arrest or detention pending trial, except in the case of a grave crime and pursuant to a decision by the competent judicial authority.” There is no prohibition on instituting criminal proceedings against a consular officer, and the alleged conduct here would certainly amount to a “grave crime.” That said, there is a limit on the types of conduct for which a consular officer can be held criminally liable by the receiving state. Under article 43, consular officers and consular employees are not subject to the jurisdiction of the receiving state “in respect of acts performed in the exercise of consular functions.” There is a substantial amount of case law under the VCCR, and under domestic statutes implementing the VCCR, regarding whether a given act was performed in the exercise of consular functions. It is difficult to imagine any scenario in which the alleged conduct here could fall within the scope of those functions.

Article 55(1) of the VCCR states that “it is the duty of all persons enjoying [consular] privileges and immunities to respect the laws and regulations of the receiving state,” and article 55(2) makes clear that “the consular premises shall not be used in any manner incompatible with the exercise of consular functions.” Providing Khashoggi with paperwork certifying his divorce falls within the scope of consular functions. Torturing, executing and dismembering him does not.  Fifth, any immunity due a consular or other official of a foreign state can be waived by that state. Article 45 codifies the possibility of waiver, which is also well established under customary international law. At the moment, Saudi Arabia is taking the position that it is capable of ensuring “accountability” for those responsible, which presumably means that it does not plan to surrender individuals for prosecution by other states.

The question of official immunity could arise if Turkey or another country attempts to prosecute one of the responsible individuals, and the defendant claims that he acted in his official capacity as an agent of Saudi Arabia. If all of those directly involved in Khashoggi’s apparent murder have indeed returned to Saudi Arabia and intend to remain there, the only way for a foreign country to prosecute and punish them would be to request extradition. Prevailing understandings of foreign official immunity and the avenues of recourse against individuals who engaged in egregious conduct on behalf of foreign states continue to evolve, as I have described elsewhere. There is no doubt that the alleged conduct was illegal under Turkish, international, and possibly even Saudi law, and that Saudi Arabia would bear state responsibility for those acts under international law whether or not its officials acted beyond the scope of their instructions (which appears increasingly doubtful). The question of what consequences Saudi Arabia, and those who ordered and participated in the killing, will face will likely turn primarily on political and strategic, rather than legal, considerations.

Image: Security personnel stand at the entrance of Saudi Arabia’s consulate on October 11, 2018 in Istanbul, Turkey. Photo by Chris McGrath/Getty Images