Qualified immunity
Qualified immunity is a legal doctrine in United States law that grants government officials—in the performance of their duties—immunity from prosecution or lawsuits unless the prosecutor or plaintiff shows that the official violated civil or constitutional rights, or acted outside of their scope of authority. It is comparable to sovereign immunity, though it protects government employees rather than the government itself.