What is immunity in law?
Immunity is legal protection from prosecution or from being sued. In criminal cases it is normally granted to a witness so that their compelled testimony cannot be used against them. In civil cases it shields certain officials and government bodies from liability for acts within their role.

Key takeaways
- Immunity is protection from prosecution or from being sued.
- Witnesses may receive immunity so their compelled testimony cannot be used against them.
- Transactional immunity bars prosecution entirely; use and derivative-use immunity only bars using the testimony.
- Qualified immunity shields officials from civil suits unless they violated clearly established rights.
- Sovereign immunity limits lawsuits against governments, which often require notice within strict deadlines.
Immunity for witnesses
The Fifth Amendment lets a witness refuse to answer questions that could incriminate them. Prosecutors who need that testimony can remove the risk by granting immunity, and then the witness can be compelled to answer.
- Use and derivative-use immunity — the testimony, and anything found through it, cannot be used against the witness. This is the federal standard, upheld in Kastigar v. United States (1972). The witness can still be prosecuted with independent evidence, but the government must prove its evidence did not come from the testimony.
- Transactional immunity — broader, and used in some states: no prosecution at all for the offenses the testimony describes.
A witness who refuses to testify after receiving immunity can be held in contempt and jailed until they comply. Immunity is granted by the prosecution with court approval; a witness cannot demand it.
Informal immunity and cooperation agreements
Much more common than formal statutory immunity are “queen for a day” or proffer agreements, where a person meets prosecutors under a written promise limiting how their statements can be used, and cooperation agreements in exchange for a reduced charge or sentence. These are contracts, and their exact wording matters — many allow the statements to be used if the person later testifies differently. They should never be signed without a lawyer.
Immunity for officials
- Absolute immunity — judges for judicial acts, prosecutors for advocacy functions such as deciding to charge and presenting a case, legislators for legislative acts, and witnesses for their testimony. It applies even to malicious conduct within the protected role.
- Qualified immunity — protects government officials, most visibly police officers, from civil suits under federal civil rights law unless they violated a “clearly established” constitutional right that a reasonable official would have known. It is the doctrine at the center of much of the US debate on police accountability, and a few states, such as Colorado and New Mexico, have created state-law claims to which it does not apply.
- Presidential immunity — the Supreme Court held in 2024 (Trump v. United States) that a former president has absolute immunity for core constitutional acts and presumptive immunity for other official acts, but none for unofficial acts.
Sovereign immunity
Governments cannot be sued without their consent. Consent is given, within limits, by the Federal Tort Claims Act and state tort claims acts, which allow suits for many injuries caused by government employees — a mail truck collision, a fall in a public building — but impose short notice deadlines, damages caps, bans on jury trials in federal cases and exceptions for “discretionary functions.” Missing a notice deadline of 60 to 180 days is one of the most common ways such claims are lost.
Other forms
Good Samaritan immunity for volunteer rescuers; overdose immunity for people who call 911; charitable immunity, still surviving in limited form in a few states; immunity for people who report suspected child abuse in good faith; and diplomatic immunity under the Vienna Convention, which covers diplomats and, to a lesser degree, consular staff.
What immunity is not
It is not a promise that nothing will happen. Immunized testimony that is false still supports a perjury charge, immunity granted by one sovereign does not always bind another, and immunity from a lawsuit does not stop disciplinary action by an employer or licensing board. If you are offered immunity or asked to cooperate, or if you want to sue a government body or official, speak with a lawyer before taking any step — the rules are technical and the deadlines short.
Suing a police officer or public employee
A person harmed by an official usually brings a federal civil rights claim under 42 U.S.C. § 1983 against the officer personally and, where the harm came from an official policy or custom, against the city or county. Cities do not enjoy qualified immunity, but they are liable only for their own policies, not simply because they employ the officer. The officer can raise qualified immunity early and appeal immediately if the judge denies it, which often delays these cases by a year or more.
Talk to a Criminal Law attorney
2,683 attorneys in this directory work in Criminal Law. Browse them by state and city — profiles carry direct contacts, and nobody pays for a higher position.
Related questions
All legal questions › All legal issues ›
This page explains general rules in the United States and is not legal advice. Deadlines and definitions differ by state, and only a licensed attorney can tell you how the law applies to your own situation.