Legal immunity from suit or liability (in civil litigation) or immunity from prosecution (in criminal prosecutions) is a legal status that protects an individual or entity from liability or criminal prosecution. Immunity may be given to the person or entity by law (usually a state or federal statute) or by the agreement of a party to the litigation (usually in the context of a criminal prosecution)—generally for some greater policy goal. Some common types of immunity include (1) judicial immunity; (2) witness immunity; (3) diplomatic immunity; and (4) governmental or sovereign immunity.
In New York, as in other jurisdictions, various forms of legal immunity protect individuals and entities from civil liability or criminal prosecution. Judicial immunity shields judges from being sued for actions taken in their official capacity, ensuring that judges can perform their duties without fear of personal consequences. Witness immunity may be granted to witnesses in criminal cases to encourage testimony; this can be transactional (complete protection from prosecution for the offense related to the testimony) or use and derivative use immunity (preventing the prosecution from using the witness's testimony or any evidence derived from it against them). Diplomatic immunity is governed by international law and provides foreign diplomats with protection from civil and criminal jurisdiction of the host country. Governmental or sovereign immunity generally protects state and federal entities and employees from lawsuits, with certain exceptions where the government has waived immunity, such as under the Federal Tort Claims Act or New York's Court of Claims Act. These immunities are designed to serve public policy by ensuring the effective functioning of government and judicial processes.