--Diplomatic immunity is a form of legal immunity and a policy held between governments, which ensures that diplomats are given safe passage and are considered not susceptible to suit under the host country's laws (although they can be expelled as undesirable - persona non grata). It was agreed as international law in Vienna Convention on Diplomatic Relations (1961). It is possible for the official's home country to waive immunity; this tends to only happen when the individual has committed a serious crime, unconnected with their diplomatic role (as opposed, to, say, allegations of spying), or has witnessed such a crime. Alternatively the home country may prosecute the individual.

Diplomatic and Consular Privileges and Immunities From Criminal Jurisdiction

Summary of Law Enforcement Aspects

Category May Be Arrested or Detained Residence May Be Entered Subject to Ordinary Procedures May Be Issued Traffic Citation May Be Subpoenaed as Witness May Be Prosecuted Recognized Family Member
Diplomatic Diplomatic Agent No1NoYesNoNo Same as sponsor (full immunity and inviolability)
Member of Administrative and Technical Staff No1NoYesNoNo Same as sponsor (full immunity and inviolability)
Service Staff Yes2YesYesYes No, for official acts. Otherwise, yes2 No immunity or inviolability2
Consular Career Consular Officers Yes, if for a felony and pursuant to a warrant.2 Yes4Yes No, for official acts. Testimony may not be compelled in any case. No, for official acts. Otherwise, yes3 No immunity or inviolability2
Honorary Consular Officers YesYesYes No, for official acts. Yes, in all other cases No, for official acts. Otherwise, yes No immunity or inviolability
Consular Employees Yes2YesYes No, for official acts. Yes, in all other cases No, for official acts. Otherwise, yes2 No immunity or inviolability2
International Organizations International Organization Staff3 Yes3Yes3Yes No, for official acts. Yes, in all other cases No, for official acts. Otherwise, yes3 No immunity or inviolability2
Diplomatic-Level Staff of Missions to International Organizations No1NoYesNoNo Same as sponsor (full immunity and inviolability)
Support Staff of Missions to International Organizations YesYesYes No, for official acts. Yes, in all other cases No, for official acts. Otherwise, yes No immunity or inviolability

1Reasonable constraints, however, may be applied in emergency circumstances involving self-defense, public safety, or the prevention of serious criminal acts.

2This table presents general rules. Particularly in the cases indicated, the employees of certain foreign countries may enjoy higher levels of privileges and immunities on the basis of special bilateral agreements.

3A small number of senior officers are entitled to be treated identically to “diplomatic agents.”

4Note that consular residences are sometimes located within the official consular premises. In such cases, only the official office space is protected from police entry.

This chart is copied from the US State Department's Bureau of Diplomatic Security Web site, http://ds.state.gov/dipimmunities/dichart.pdf.