This is a much misunderstood topic, everyone thinks that diplomats can get away with murder because they have Diplomatic Immunity. Not so.
Diplomatic immunity or immunity simply put as always existed in every society throughout history on all continents. It is a concept that is necessary when two groups of people wish to settle a dispute or simply speak on a common topic of interest. One party will send to the other party a message, the messenger must be granted safe passage to travel, present the message and return home without being molested. That was or is the original concept, of course we can think of example in history where one ruler not happy with the message he was receiving killed the messenger or as a reply to the other ruler sent the head of the messenger. Poor messenger! We know that Julius Caesar received embassies from the various people Rome was at war with at some point. The emissaries and their persons were respected and went unmolested.
In other cases, passing through a foreign land an envoy would seek safe passage, this was necessary when the ruler of that Country was not neutral in a dispute and might decide to kill the envoy for political gain.
Immunity is given by a receiving State to an envoy who comes in Embassy and in return the Sovereign expects the same for his envoy, in other words you have reciprocity. It is seen like a Sacred agreement and has taken on with time an Aura of Civilized behaviour amongst parties.
Map of the Papal States surrounded by other Kingdoms and Principalities.
Louis XIV sent an ambassador to the Holy See, which in the 18th century was a State covering much of what is today Central Italy, to resolve a dispute with the Pope over the appointments of Bishops and the naming of Cardinals in France and the activities of the Jesuits. Always a sore point with all kings and emperors. The Pope would appoint people the King did not like and he would have none of it. His Ambassador’s was given a clear mandate to negotiate with the Pope and would press the point with the Papacy in Rome by enlisting the help of the Roman population and other Nobles favourable to the French cause. Most Romans and people living in the Papal States tried numerous times to overthrow the Theocratic rule of Popes.
San Luigi dei Francesi in central Rome next to Palazzo Madama (Italian Senate). The church has 2 Caravaggio and many other great paintings.
The concept of diplomatic immunity changed with time and customs and was refined. At the time of Pope Innocent XI the immunity given to the Ambassadors in Rome was defined by the Vatican. Rome was ruled like a Theocratic State and the Romans lived in terror of the Papal Police. The French knowing they could pressure the Pope on some point would deliberately go out of their way to challenge the authority of the Pontiff. The French Ambassador declared that his King did not recognize the limits put on the French Embassy on drinking and revelry around the area of the Palazzo Farnese site of the French Embassy. The Ambassador went so far as to declare that his immunity extended as far as his eye could see. Usually diplomatic immunity extends only to the building and residence occupied by the Ambassador and staff and his person. There is no such provisions under as far as the Ambassador’s eye can see. This was pure fantasy and invention. However you have to appreciate the point, from the Office window of the Ambassador, you look out straight into Piazza Farnese and down the Via dei Baullari into the Mercato Campo de Fiori and then all the way down the street into Piazza San Pantaleo passing in front of the Holy See Supreme Tribunal of the Signatura. Meaning that anyone living in this very large area was covered by the immunity of the Ambassador and the Papal Police could not intervene. So the French wooed the population of Rome with parties, music, food and wine poring from the large basins in front of Palazzo Farnese. The Pope was livid that his authority would be challenged in this manner. But the French Ambassador had his orders and he was doing what he was told to do by his Sovereign.
The Pope decided he had enough of the Sun King’s ways and his arrogant Ambassador. So one morning the French Ambassador arriving for Mass at St-Louis des Français or in Italian as the church is known in Rome, San Luigi dei Francesi, found the doors closed.
The parish priests informed the Ambassador that the Pope had excommunicated him over night without the customary courtesy of informing the Ambassador of His Most Catholic Majesty, in other words the immunity enjoyed by the Ambassador was lifted. The Ambassador who represented at the time the most powerful Monarch in Europe was most upset. He immediately dispatched a messenger to Paris to inform his boss Louis XIV, the story has it that the message reached the King in 3 days. An incredible feat for the time and many horses died of exhaustion completing this trip. The Sun King lost no time in reacting, he imprisoned the Papal Envoy and declared war on the Pope, moving his army into Papal territory and threatening to come to Rome to settle scores. The Pope was alarmed and immediately dispatched a special envoy trying to repair the damage done by his actions. Louis would have none of it, he demanded that 3 senior Cardinals come in person to Paris to apologized on their knees for the grave insults made to his August person. The Pope obliged meekly restoring the immunity of the French Ambassador and lifted the order of excommunication.
Thus confirming the principle for all other Sovereigns to see that the person of an Ambassador is Sacrosanct and inviolable. An Ambassador is the personal representative of his Sovereign and his government. Even in the case of war between States, Ambassadors are allowed to return home safely. For this reason the principle of protecting an Ambassador and his Embassy is the responsibility of the receiving State and is a guarantee of good intentions in having diplomatic relations with the other nation, a point of Honour in other words between Heads of State.
Immunity today is defined by the Vienna Convention of Diplomatic Relations 1961 and the Vienna Convention on Consular Relations 1963. It covers Ambassadors and the diplomatic staff of his Embassy, the Chancery building, the Residence and Official cars. But immunity is given by the receiving State and is not automatic. A diplomat accredited to a country must always behave as a guest would in someone’s house and be very respectful of all the Laws and Regulations of the receiving State. Must never give offence and never do anything that would bring shame or embarrassment to his Ambassador or Government. Pay all his parking tickets and always be polite and courteous with any Official he meets and avoid saying anything which could be seen as a criticism or negative remark on the country where he is. Never engage in disparaging remarks about the Head of State or government of the Host Country. Consular staff are protected under a different Convention 1963 and it is not as extensive as the Diplomatic Convention of 1961.
The stories of people misbehaving and claiming they can because they have immunity, is pure nonsense and should not be taken seriously. Immunity is a serious matter and you have to live up to it. As a diplomat you do not want to be associated with colleagues who misbehave or present when they misbehave so as not to be tainted with their mischief. You can be sent home by your Ambassador for any failings to live up to your commitment to respect and behave according to your status as a Diplomat, no one wants to be sent home with the negative consequences for your career that it implies. It is also important to explain to your kids and spouse that they do not have any immunity at all, they are dependents not diplomats. So they have to walk the straight and narrow. In my career I have seen colleagues sent home because their children misbehaved, meaning doing something which came to the attention of the Police and the Chief of Protocol. Employee-Parent gets called in to the Ambassador’s Office and told you have 48 hours to pack and leave. I do not know of any Ambassador or Government who will tolerate being embarrassed by employees or their family. Relations and briefs between States are too important to be jeopardized by a person who does not understand their role and status. The world of diplomacy is a rarefied one, you are not an ordinary person nor a tourist, you are an agent of your government and must behave as such at all time 24-7. You may meet with business people or ex-patriates or group of citizens of your country but you have to be mindful that they may do as they please but you live under very different rules.