When government officials abuse their offices, “action for damages may offer the only realistic avenue for vindication of constitutional guarantees.” Harlow v. Fitzgerald, 457 U.S., at 814, 102 S.Ct., at 2736. On the other hand, permitting damages suits against government officials can entail substantial social costs, including the risk that fear of personal monetary liability and harassing litigation will unduly inhibit officials in the discharge of their duties. Ibid. Our cases have accommodated these conflicting concerns by generally providing government officials performing discretionary functions with a qualified immunity, shielding them from civil damages liability as long as their actions could reasonably have been thought consistent with the rights they are alleged to have violated. See, e.g., Malley v. Briggs, 475 U.S. 335, 341, 106 S.Ct. 1092, 1096, 89 L.Ed.2d 271 (1986) (qualified immunity protects “all but the plainly incompetent or those who knowingly violate the law”); id., at 344–345, 106 S.Ct., at 1097–1098 (police officers applying for warrants are immune if a reasonable officer could have believed that there was probable cause to support the application); Mitchell v. Forsyth, 472 U.S. 511, 528, 105 S.Ct. 2806, 2816, 86 L.Ed.2d 411 (1985) (officials are immune unless “the law clearly proscribed the actions” they took); Davis v. Scherer, 468 U.S. 183, 191, 104 S.Ct. 3012, 3017, 82 L.Ed.2d 139 (1984); id., at 198, 104 S.Ct., at 3021 (BRENNAN, J., concurring in part and dissenting in part); Harlow v. Fitzgerald, supra, 457 U.S., at 819, 102 S.Ct., at 2738. Cf., e.g., Procunier v. Navarette, 434 U.S. 555, 562, 98 S.Ct. 855, 859, 55 L.Ed.2d 24 (1978). Somewhat more concretely, whether an official protected by qualified immunity may be held personally liable for an allegedly unlawful official action generally turns on the “objective legal reasonableness” of the action. Harlow, 457 U.S., at 819, 102 S.Ct., at 2739, assessed in light of the legal rules that were “clearly established” at the time it was taken, id., at 818, 102 S.Ct., at 2738)