In modern times, diplomatic immunity continues to provide a means, albeit imperfect, to safeguard diplomatic personnel from any animosity that might arise between nations.
Historically, diplomatic immunity has been extended on the strength of one or more of three theories: personal representation, extraterritoriality, and functional necessity.