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 California, legal immunity encompasses various forms that protect individuals or entities from civil liability or criminal prosecution. Judicial immunity shields judges from being sued for actions performed in their official capacity, ensuring that judges can make decisions 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 federal law and international treaties, such as the Vienna Convention on Diplomatic Relations, which California courts recognize, providing foreign diplomats with protection from civil and criminal jurisdiction. Governmental or sovereign immunity refers to the principle that the state and its subdivisions, officials, and agencies are protected from lawsuits unless they consent to be sued; in California, this is codified in statutes such as the California Tort Claims Act, which sets forth the circumstances and procedures under which the government can be sued. It's important to note that these immunities are subject to specific conditions and exceptions, and the application of immunity can vary based on the context and the nature of the legal proceedings.