Long ago, when Australia's Dieri aborigines sent women to thrash out grievances with other, sometimes cannibalistic tribes, there was a tacit agreement: It's not OK to shoot the messenger — or boil and eat her.
Without putting the name to it, these societies were practicing an early form of diplomatic immunity — a concept once again in the news after a video surfaced of a Qatari man's Ferrari racing through Beverly Hills and police arrested a Saudi prince who they say attempted to force a female worker to perform oral sex on him at a rented estate in Beverly Glen.
Agreements that provide envoys with safe passage and protection from arrest and prosecution have long been viewed as necessary tools for ensuring smooth international relations.
"You can't conduct diplomacy effectively if diplomats can be harassed by the host country," said Kal Raustiala, director of UCLA's Burkle Center for International Relations. If diplomats were subject to arrest or even taxation, they would be at the mercy of local governments, he said.
In the recent Southern California cases, neither Sheik Khalid bin Hamad al Thani of Qatar's ruling family nor Majed Abdulaziz al Saud of Saudi Arabia met the criteria for protection under diplomatic immunity, police have said. Absent that protection, al Thani fled the country. Al Saud was released from custody after posting $300,000 bail.
One of the most egregious violations of immunity from arrest and the inviolability of diplomatic compounds was the 1979 seizure of dozens of hostages at the U.S. Embassy in Tehran, said Linda and Marsha Frey, co-authors of "The History of Diplomatic Immunity." The hostages were held for 444 days by Islamist students who backed the Iranian revolution and sought to end U.S. involvement in their country's affairs.
The U.S. demanded the hostages' release, but the revolutionary government backed the students' action.
On the flip side, legal protections afforded envoys in foreign lands have also enabled flagrant violations of host countries' laws and individuals' rights, legal experts say.
In 2010, for example, U.S. marshals confronted a Qatari diplomat who had been caught smoking in an airplane lavatory, against federal regulations. The diplomat cracked a joke about trying to light his shoe — a comment interpreted as a reference to a couple of suspected bomb plots. He was released without charges, and Qatar recalled him.
An incident in 2013 touched off a diplomatic row between the United States and India. Agents of the U.S. Diplomatic Security Service arrested a high-ranking Indian consular official in New York on charges of visa fraud and making false statements on a visa application about how much she planned to pay her housekeeper.
Consular officials are shielded only if they break the law while working. U.S. officials argued that her transgressions occurred outside of her work duties.
The arrest, which included a strip search, provoked outrage in India, where officials contended that she was protected. They declined to waive her immunity and demanded an unconditional apology. Prosecutors characterized the treatment of the housekeeper as a form of human trafficking. A grand jury indicted the diplomat, who returned to India.
So, who is protected by diplomatic immunity? As the Indian consular official learned, there are degrees of protection.
In the United States, the Diplomatic Relations Act of 1978 follows the principles introduced by the Vienna Convention on Diplomatic Relations of 1961.
A diplomatic agent, such as an ambassador at a Washington embassy, and his family, enjoy the highest level of immunity, according to the State Department. Technical and administrative staff members, including advisors and secretaries, and their families are protected at a level below that. Service staff members have the lowest level of immunity among those groups.
Individuals with absolute immunity are off the hook for just about any crime — from jaywalking to murder. However, in high-profile cases, the country that sent the envoy will often waive the diplomat's right to be protected.
In 1997, a Georgian diplomat's car skidded out of control near Dupont Circle in Washington. It smashed into another car, which was catapulted onto a vehicle carrying a Maryland teenager, who died.
The accident happened just years after the fall of the Soviet Union. Georgia was a tiny country that had good relations with the United States. To preserve those relations, Georgia agreed to waive the man's immunity, said Edwin W. Smith, a USC professor of law and international relations. The man was tried and sentenced to seven to 21 years in prison.
By contrast, in a headline-producing 1974 case in Washington, Halla Brown, a doctor and medical professor, was paralyzed from the neck down after an uninsured Panamanian cultural attache ran a red light and collided with her car.
Brown incurred large medical bills, but had no legal recourse because the attache was immune from prosecution. Under pressure from the United States, the government of Panama eventually paid her $100,000, a small fraction of her bills.
Publicity about the case spurred Congress to change the law and require, among other things, that diplomats carry valid auto insurance.
In a more recent high-profile case, a judge in 2012 rejected Dominique Strauss-Kahn's claim of diplomatic immunity in his effort to dismiss a civil suit filed by a hotel housekeeper who claimed that the former French official had sexually assaulted her. The judge noted that Strauss-Kahn had resigned as head of the International Monetary Fund before the suit was filed.
A provision of the Vienna Convention grants certain diplomatic agents an extension of diplomatic immunity for a period of time after one's official duties have ended, but the New York judge ruled that the extension did not apply to Strauss-Kahn.
Some cases in which diplomatic immunity is invoked carry shades of "Homeland"-style spy-and-counterspy dramas.
In 2011, an American diplomat who secretly worked for the CIA gunned down two men in broad daylight in Lahore, Pakistan. Raymond Davis, the diplomat, was apprehended and turned over to the local police.
As he sat in a Pakistani jail, U.S. officials from President Obama on down pressed for his release on the grounds that he was protected by diplomatic immunity. In March 2011, Davis was released after the victims' families pardoned him and accepted financial compensation. Judges acquitted him on all charges, and Davis immediately left Pakistan.
Over time, foreign envoys have lost some privileges they previously held under diplomatic immunity. It's no longer the case in the United States, for example, that diplomats can park at fire hydrants and not get tickets.
"There is still some silliness in the way the rules are applied," said Harry W. Kopp, a former U.S. Foreign Service officer and the author of books about diplomacy, "but the basic idea [of diplomatic immunity] is a sound one."