Legal immunity, or immunity from prosecution, is a legal status wherein an individual or entity cannot be held liable for a violation of the law, in order to facilitate societal aims that outweigh the value of imposing liability in such cases. Such legal immunity may be from criminal prosecution, or from civil liability, or both. The most notable forms of legal immunity are diplomatic immunity, judicial immunity, and witness immunity. One author has described legal immunity as "the obverse of a legal power":
Criticism
Legal immunities may be subject to criticism because they institute a separate standard of conduct for those who receive them. For example, as one author notes:
Many forms of immunity are granted to government officials to enable them to carry out their functions without fear of being sued or charged with a crime for so doing:
Sovereign immunity, the prevention of lawsuits or prosecution against rulers or governments without their given consent
*Sovereign immunity in the United States bars suit against federal, state, and tribal governments, which cannot be sued without their consent. Governmental consent to be sued is expressed through legislation as a limited waiver of sovereign immunity
**Judicial immunity, the absolute immunity of a judge or magistrate in the course of their official duties
*Qualified immunity, in the United States, sovereign immunity of individuals performing tasks as part of the government's actions
Parliamentary immunity, immunity granted to elected officials during their tenure and in the course of their duties
Speech or Debate Clause, a provision in the United States Constitution that provides immunity to members of Congress for statements made in either house
Grants of immunity are particularly important in intergovernmental relations, where traditions have arisen to prevent the diplomatic representatives of a country from being harassed by their host countries.
Diplomatic immunity, agreement between sovereign governments to exclude diplomats from local laws
Immunity from prosecution, exclusion of governments or their officials from prosecution under international law
State immunity, principle of international law that the government of a state is not amenable before the courts of another state
Such immunities may be granted by law or by treaty.
Immunity of individuals participating in the legal process
Amnesty law, a law that provides immunity for past crimes
Spousal privilege, also called spousal immunity, protects a spouse from testifying against the defendant
Witness immunity, immunity granted to a witness in exchange for testimony
Charitable immunity, immunity from liability granted to charities in many countries from the 19th century to the mid-20th century
Such immunities may be granted by law or, for witness immunity, by prosecutors or other authorities on a case-by-case basis, commonly as an agreement with the witnesses.