OPINION
SNEED, Circuit Judge.California state prison warden James Gomez and other prison officials appeal the district court’s denial of their motion for summary judgment. Inmates Frank Clement, Arturo Chavez and Larry Caballero sued the officials for violating their Eighth Amendment rights, pursuant to 42 U.S.C. § 1983. The inmates asserted two claims of cruel and unusual punishment arising out of an incident in 1995 when the officials used pepper spray to quell a fight between two other prisoners, and the pepper spray vapors drifted into the plaintiff inmates’ cells. These claims alleged that the officials (1) used excessive force in applying the pepper spray, even after the fight had allegedly subsided; and (2) were deliberately indifferent to the medical needs of the neighboring inmates who allegedly suffered harmful effects from migrating pepper spray vapors.
We have jurisdiction over the officials’ interlocutory appeal from the denial of qualified immunity, see Billington v. Smith, 292 F.3d 1177, 1183 (9th Cir.2002), and review de novo. We affirm in part and reverse in part. The district court properly denied summary judgment on the deliberate indifference claim. The prison officials are shielded from liability, however, on the excessive force claim, and the denial of summary judgment on this claim must be reversed.
BACKGROUND
A violent fight erupted inside of a prison cell at Pelican Bay State Prison. When correctional officers Norton and Smith arrived at the cell, they saw that one of the prisoners had the other in a headlock and was punching him in the face and slamming his head against the wall. The beaten prisoner’s face was covered with blood. The prisoners did not respond to the officers’ orders to stop and to get down on the floor. Other officers were instructed to activate an alarm and to get the pepper spray cannister. After repeated commands to “break it up” and after one of the prisoners threatened to kill the other, Officer Norton administered a 2-5 second burst of pepper spray into the cell via a thin rubber hose through the foodport. Officer Norton claims that the first application was blocked by the bodies of the fighting prisoners, necessitating another 2-5 second application of spray. Some of the neighboring inmates claim that the fighting sounds were replaced by sounds of *902coughing and gagging1 after the initial burst of spray and that there was another 2-5 second application immediately thereafter.2 The fighting prisoners were escorted out of the cell and attended to shortly after the final spray.
Inmates in neighboring cells claim that pepper spray vapors drifted into their cells. These cells had a plexiglass wall separating them from the hallway, with one-inch openings at the top and bottom of these walls. Each cell contained a circulation vent and a sink with running water and soap. There were no cell windows.
Some of the bystander inmates began reacting to the vapors with stinging sensations in the eyes and on the skin. At least two of them suffered asthma attacks or difficulty in breathing. Several inmates began calling out to prison officials for medical attention and to be taken from their cells and allowed to shower. One attempted to alleviate his irritation by splashing water onto his face, but such effort only aggravated his condition because the vapors in the air mixed with the water. Some of the inmates began coughing and gagging.
In addition, the parties’ recollections differ with respect to the duration of each application. The inmates’ estimates vary from 2-3 seconds up to 3-5 seconds for each burst. The officers consistently report that each blast lasted 3 seconds.
For summary judgment purposes, we will assume that there were two bursts, each lasting up to five seconds, and that the second application was administered after the inmates had begun coughing and gagging but before they had cuffed up.
The prison officials opened the yard door that separated the housing unit from the prison yard and placed a fan in the doorway to address the lingering effects of the spray. The ventilation system was also left on both during and after the incident. While such action may have cleared some of the vapors from the hallway, there is evidence that it was insufficient to clear the spray from the cells. In fact, the plaintiff inmates believe that the fan and circulation made matters worse because it blew the fumes into their cells, where the vapors became trapped by the plexiglass. A medical staffperson visited the pod sometime after the incident, but there is no evidence that any of the inmates talked with this staffperson or requested his attention.
Four hours after the incident, officials finally escorted the bystander inmates out of their cells for showers. The officials claim that they occupied these four hours with writing reports, finding alternative housing for the fighting inmates, collecting evidence, cleaning the blood off the floors, and looking for weapons. The officials also served dinner in the unit before escorting the inmates out of their cells for showers.
DISCUSSION
In this case, we must examine whether qualified immunity protects prison officials from a suit charging violations of the Eighth Amendment’s proscription *903against “cruel and unusual punishment.” Qualified immunity protects “all but the plainly incompetent or those who knowingly violate the law.” Malley v. Briggs, 475 U.S. 335, 341, 106 S.Ct. 1092, 89 L.Ed.2d 271 (1986). It shields government officials performing discretionary functions from liability for civil damages unless their conduct violates clearly established statutory or constitutional rights of which a reasonable person would have known. In this way, it protects government officials from liability for good faith misjudgments and mistakes. See Butz v. Economou, 438 U.S. 478, 507, 98 S.Ct. 2894, 57 L.Ed.2d 895 (1978). Although a defendant’s subjective intent is usually not relevant to the qualified immunity defense, his mental state is relevant when, as here, it is an element of the alleged constitutional violation. See Jeffers v. Gomez, 267 F.3d 895, 911 (9th Cir.2001).
Resolving the issue of qualified immunity involves a two-step inquiry. First, we must ask whether “[tjaken in the light most favorable to the party asserting the injury, ... the facts alleged show the officer’s conduct violated a constitutional right.” Saucier v. Katz, 533 U.S. 194, 201, 121 S.Ct. 2151, 150 L.Ed.2d 272 (2001). A negative answer ends the analysis, with qualified immunity protecting the defendants from liability. Id. If a constitutional violation occurred, a court must further inquire “whether the right was clearly established.” Id. “If the law did not put the [officials] on notice that [their] conduct would be clearly unlawful, summary judgment based on qualified immunity is appropriate.” Saucier, 533 U.S. at 202, 121 S.Ct. 2151.
I. Excessive Force
Our excessive force analysis begins with identification of the specific constitutional right allegedly infringed by the officers’ use of force. Graham v. Connor, 490 U.S. 386, 393-94, 109 S.Ct. 1865, 104 L.Ed.2d 443 (1989). When prison officials use excessive force against prisoners, they violate the inmates’ Eighth Amendment right to be free from cruel and unusual punishment.3 Force does not amount to a constitutional violation in this respect if it is applied in a good faith effort to restore discipline and order and not “maliciously and sadistically for the very purpose of causing harm.” Whitley v. Albers, 475 U.S. 312, 320-21, 106 S.Ct. 1078, 89 L.Ed.2d 251 (1986). This standard necessarily involves a more culpable mental state than that required for excessive force claims arising under the Fourth Amendment’s unreasonable seizures restriction. Graham, 490 U.S. at 398, 109 S.Ct. 1865. For this reason, under the Eighth Amendment, we look for malicious and sadistic force, not merely objectively unreasonable force. Under this heightened standard, the officials’ liability for excessive force in this case is much more doubtful.
Even under the lower Fourth Amendment excessive force standard, the Supreme Court has admonished that officials “can have reasonable, but mistaken, beliefs as to the facts establishing the existence of probable cause or exigent circumstances, for example, and in those situations courts will not hold that they have violated the Constitution.” Saucier, 533 U.S. at 206, 121 S.Ct. 2151. Under this analysis, the inmates have failed to establish that the officials applied the pepper spray maliciously and sadistically for the very pin-pose of causing harm. The prison officials administering the spray claim that the second application was dispensed be*904cause the bodies of the fighting inmates had blocked the initial spray. In fact, the defendants claim that some of the pepper spray ricocheted back onto them after the first shot. The final .spray was administered immediately thereafter. Even if the allegation of the neighboring inmates is true, viz, that the final spray was dispensed after the sounds of coughing and gagging were heard from the cell, this allegation alone does not lead to the inference that the official used the pepper spray “maliciously and sadistically for the very purpose of causing harm.” Because we find no use of excessive force violative of the Eighth Amendment, it is unnecessary to further consider whether the officers were on fair notice that their conduct was unlawful. In this case, the officials are protected by qualified immunity on the excessive force claim.
II. Deliberate Indifference to Medical Needs
The officials, however, may have been deliberately indifferent to the prisoners’ serious medical needs if, in fact, they were aware of the harmful effects of the pepper spray and of the inadequacy of their ventilation methods and yet purposefully refused to provide showers, medical care, or combative instructions or to develop an adequate policy to address obvious risks. Summary judgment was properly denied on this claim.
A. Constitutional Violation
A public official’s “deliberate indifference to a prisoner’s serious illness or injury” violates the Eighth Amendment ban against cruel punishment. Estelle v. Gamble, 429 U.S. 97, 105, 97 S.Ct. 285, 50 L.Ed.2d 251 (1976). The inmates must demonstrate that they were confined under conditions posing a risk of “objectively, sufficiently serious” harm and that the officials had a “sufficiently culpable state of mind” in denying the proper medical care. Wallis v. Baldwin, 70 F.3d 1074, 1076 (9th Cir.1995) (internal quotations omitted). Thus, there is both an objective and a subjective component to an actionable Eighth Amendment violation.
The plaintiffs’ submissions document the painful effects of pepper spray. Because a serious medical need is present whenever the “failure to treat a prisoner’s condition could result in further significant injury or the ‘unnecessary and wanton infliction of pain,’ ” see McGuckin v. Smith, 974 F.2d 1050, 1059 (9th Cir.1992) (quoting Estelle, 429 U.S. at 104, 97 S.Ct. 285), the objective component is satisfied.
The subjective component requires the inmates to show that the officials had the culpable mental state, which is “ ‘deliberate indifference’ to a substantial risk of serious harm.” Frost v. Agnos, 152 F.3d 1124, 1128 (9th Cir.1998) (quoting Farmer v. Brennan, 511 U.S. 825, 835, 114 S.Ct. 1970, 128 L.Ed.2d 811 (1994)). “Deliberate indifference” is evidenced only when “the official knows of and disregards an excessive risk to inmate health or safety; the official must both be aware of the facts from which the inference could be drawn that a substantial risk of serious harm exists, and he must also draw the inference.” Farmer, 511 at 837, 114 S.Ct. 1970.
[5] Mere negligence is insufficient for liability. Frost, 152 F.3d at 1128. An “official’s failure to alleviate a significant risk that he should have perceived but did not, ... cannot under our cases be condemned as the infliction of punishment.” Farmer, 511 U.S. at 838, 114 S.Ct. 1970. Instead, “the official’s conduct must have been ‘wanton,’ which turns not upon its effect on the prisoner, but rather, upon the constraints facing the official.’ ” Frost, *905152 F.3d at 1128 (quoting Wilson v. Seiter, 501 U.S. 294, 302-03, 111 S.Ct. 2321, 115 L.Ed.2d 271 (1991)).4 Prison officials violate their obligation by “intentionally denying or delaying access to medical care.” Estelle, 429 U.S. at 104-05, 97 S.Ct. 285.
In this case, the prisoners may be able to show that the defendants were subjectively aware of the risk of serious injury when they denied showers and medical attention for the inmates for the 4 hour period. It is alleged that the officers took turns stepping outside for fresh air. In addition, the prisoners claim that they heard the officers coughing and gagging in the hall. Finally, the prisoners themselves allegedly made repeated requests for attention, complaining of breathing problems, pain, and asthma attacks. Some were coughing, gagging, or choking. The officers’ decision to open the yard door and place an industrial fan in the doorway suggests that the pepper spray did not entirely dissipate at once and that the officers may have been aware of this condition.
[7] In addition, the inmates claim that the supervisory officials failed to institute adequate prison policies for minimizing the effects of pepper spray on bystander inmates. If this failure “reflects a ‘deliberate’ or ‘conscious’ choice” to “follow a course of action ... from among various alternatives,” it may lead to liability. City of Canton v. Harris, 489 U.S. 378, 389, 109 S.Ct. 1197, 103 L.Ed.2d 412 (1989). The plaintiffs must show that:
in light of the duties assigned to specific officers or employees, the need for more or different training is obvious, and the inadequacy so likely to result in violations of constitutional rights, that the policy-makers ... can reasonably be said to have been deliberately indifferent to the need.
Id. at 390, 109 S.Ct. 1197. The plaintiffs’ submissions recite numerous instances of the use of pepper spray that allegedly harmed uninvolved bystander inmates. A factfinder may find that the policymakers and supervisors were “ ‘on actual or constructive notice’ of the need to train.” Farmer, 511 U.S. at 841, 114 S.Ct. 1970 (quoting Canton, 489 U.S. at 396,109 S.Ct. 1197 (O’Connor, J., concurring)). Liability under such conditions is appropriate. See also Redman v. County of San Diego, 942 F.2d 1435, 1446 (9th Cir.1991) (en banc) (“Supervisory liability exists even without overt personal participation in the offensive act if supervisory officials implement a policy so deficient that the policy itself is a repudiation of constitutional rights and is the moving force of a constitutional violation.”) (citations and internal quotation marks omitted).
B. Clearly Established Law
The qualified immunity analysis requires us to further consider whether the rights of the prisoners in this case were clearly established at the time of *906incident. The proper inquiry focuses on whether “it would be clear to a reasonable officer that his conduct was unlawful in the situation he confronted,” see Saucier, 533 U.S. at 202, 121 S.Ct. 2151, or whether the state of the law in 1995 gave “fair warning” to the officials that their conduct was unconstitutional. Hope v. Pelzer, - U.S. -, 122 S.Ct. 2508, 2511, 153 L.Ed.2d 666 (2002). “This inquiry, it is vital to note, must be undertaken in light of the specific context of the case.” Saucier, 533 U.S. at 201, 121 S.Ct. 2151. Officials, however, “can still be on notice that their conduct violates established law, even in novel factual circumstances.” Hope, - U.S. at -, 122 S.Ct. at 2511. Specificity only requires that the unlawfulness be apparent under preexisting law. Anderson v. Creighton, 483 U.S. 635, 640, 107 S.Ct. 3034, 97 L.Ed.2d 523 (1987).
The general law regarding the medical treatment of prisoners was clearly established at the time of the incident. See Hamilton v. Endell, 981 F.2d 1062, 1066 (9th Cir.1992). Furthermore, it was also clearly established that the officers could not intentionally deny or delay access to medical care. See Estelle, 429 U.S. at 104-05, 97 S.Ct. 285.
While a resolution of the factual issues may well relieve the prison officials of any liability in this case, if the prisoners’ version of the facts were to prevail at trial, a jury might conclude that the officers were deliberately indifferent to such needs during the four-hour period after the incident. Various supervisory officials may also have been deliberately indifferent to obvious risks of injury. Under such circumstances, the officials’ actions are not protected by qualified immunity.
CONCLUSION
The defendants’ motion for summary judgment should be granted on the excessive force claim. The facts do not support a finding that the defendants used the pepper spray maliciously or sadistically.
There are triable issues of fact that may trigger liability on the deliberate indifference claim, however. Such indifference, moreover, was clearly unlawful at the time of the incident. Summary judgment should be denied on this claim.
AFFIRMED IN PART AND REVERSED IN PART.
. None of the plaintiffs could actually see the activity taking place within the fighting inmates’ cell. Their version of the events is based entirely on the sounds they heard coming from the cell and on the officers' actions, which they could both see and hear.
. There is considerable confusion regarding the sequence of events. Although one plaintiff claims that there were "about” two to three bursts total, all other declarants — including numerous plaintiffs and defendants— speak of only one to two applications of spray. Only three of the five plaintiff declarants state that any of the bursts were administered after the fighting inmates began coughing and choking.
. Excessive force directed at one prisoner can also establish a cause of action for harm that befalls other prisoners. See Robins v. Meecham, 60 F.3d 1436, 1441-42 (9th Cir.1995).
. We note that the constraints facing the officials in this case differ from most cases involving the deprivation of medical needs. See Whitley v. Albers, 475 U.S. 312, 320, 106 S.Ct. 1078, 89 L.Ed.2d 251 (1986) C'[T]he State's responsibility to attend to the medical needs of prisoners does not ordinarily clash with other equally important governmental responsibilities.”). The four-hour delay in this case followed a violent prison fight, which may have necessitated restrictions on inmate movement in the pod. In his affidavit, the control booth officer stated'that due to the potential for violence, inmates housed in the security housing unit must be escorted in and out of the unit by two officers. In addition, after a disturbance, it is customary to restrict all inmate movement in a pod until the incident has been attended to. These competing tensions — the prisoners' need for medical attention and the government’s need to maintain order and discipline — may be important to the resolution of whether the officials had the requisite subjective intent.