Diplomatic immunity is a principle of international law that grants foreign diplomats and certain international organizations protection from civil lawsuits and criminal prosecution in the host country. Codified in the Vienna Convention on Diplomatic Relations (1961), it ensures diplomats can carry out official duties without fear of local legal interference. U.S. courts have extended immunity to international organizations — including UN subsidiary bodies — under the International Organizations Immunities Act (IOIA) of 1945, which grants them the same immunity as foreign governments. Courts determine whether immunity applies before hearing the merits of a case.