Ambassadors, official representatives, head of states of a country are sometimes granted with immunity when they're in other countries.
Doctor Doom, as ruler of Latveria, often benefits of such immunity (on Earth-616 and in other realities), and sometimes of the protection of heroes and security agencies, in order to enforce that status.
Diplomatic immunity doesn't apply in every country, and can be granted to non-representative individuals, such as Ian Quinn a wealthy mining philanthropist and the owner of Quinn Worldwide which had diplomatic immunity in Malta.
(See Also: * https://en.wikipedia.org/wiki/Diplomatic_immunity)
[top] [Edit Diplomatic immunity]