system
Given the following post, respond as if you're commenting on Reddit:
human
What is diplomatic immunity?

Recently I was watching Lethal Weapon 2 and the bad guy was saying that because he had diplomatic immunity means that he can't be prosecuted for any wrong doings.  What is diplomatic immunity and can it be used in the real world like we see it on movies/tv/books?
gpt
Just about every country on the planet has signed onto something called the "Vienna Convention on Diplomatic Relations (1961)" which sets rules for how an embassy and its staff must be treated. At the center of these is the notion of 'Diplomatic Immunity.'

If you, coming from say, France, have full Diplomatic Immunity in the United States (as the ambassador would) then you cannot, under any circumstances be detained or charged with a crime by the United States Government. If the French ambassador were to walk up to a Macy's Store Window and smash it, in front of 40,000 witnesses and 20 police officers, he could not be arrested. Were this to occur, the United States Government would have two options:

- Declare him "*persona non grata*" which basically means 'unwelcome.' He would then have to leave the United States and couldn't return. 
- Ask the French Government to waive his Diplomatic Immunity and allow the United States to charge him under their legal system. 

There are different levels of Diplomatic Immunity and only a few people at any given embassy are likely to enjoy full immunity. Others might have immunity that extends only to crimes they commit while going about their duties. IE. The ambassador's driver cannot be prosecuted for running a red light while driving the ambassador to a formal function, but can be prosecuted if he's just cruising around on his day off. 

Can it be used in the real world like it is in movies and books? Well, not really. Every time a diplomat pulls a stunt like that, it risks causing an 'international incident' and hugely embarrassing his home country. His home country isn't likely to put up with that for any significant length of time and is likely to either recall him (and fire him) or bow to pressure from the U.S to waive his immunity. 

It should also be noted that huge, flashy acts of terrorism by the government officials of another country are basically acts of war against the United States. Most countries are more than willing to throw someone under the bus in order to avoid being put in that particular position.