JERRY E. SMITH, Circuit Judge: *
Jody McCreary brought claims of deliberate indifference and/or excessive use of force pursuant to 42 U.S.C. § 1983 against various officials of the Texas prison system. The district court granted defendants’ motion for summary judgment. McCreary appeals and moves for appointment of counsel and to allow attachments to his appellate brief. We AFFIRM in part, VACATE in part, and REMAND.
I.
McCreary appeals pro se and in forma pauperis. We review a summary judgment de novo. Machinchick v. PB Power, Inc., 398 F.3d 345, 350 (5th Cir.2005). Summary judgment is appropriate where there is no genuine issue as to any material fact and the movant is entitled to judgment as a matter of law. Hart v. Hairston, 343 F.3d 762, 764 (5th Cir.2003).
II.
McCreary alleges excessive use of force and deliberate indifference in four instances in which his left arm was taken out of a sling and handcuffed behind his back, causing his shoulder to dislocate because of a pre-existing condition. The core inquiry in an Eighth Amendment excessive use of force claim is “whether force was applied in a good-faith effort to maintain or restore discipline, or maliciously and sadistically to cause harm.” Hudson v. *518McMillian, 503 U.S. 1, 7, 112 S.Ct. 995, 117 L.Ed.2d 156 (1992). A plaintiff must allege and prove “unnecessary and wanton infliction of pain.” Id. at 5, 112 S.Ct. 995. A court may consider “the need for application of force, the relationship between that need and the amount of force used, the threat reasonably perceived by the responsible officials, and any efforts made to temper the severity of a forceful response.” Id. at 7, 112 S.Ct. 995.
Deliberate indifference to a prisoner’s serious medical needs is an Eighth Amendment violation and states a cause of action under § 1983. Estelle v. Gamble, 429 U.S. 97, 105-07, 97 S.Ct. 285, 50 L.Ed.2d 251 (1976). The decision of security personnel to force an inmate to engage in activity they know may aggravate a serious physical ailment would constitute deliberate indifference. Jackson v. Cain, 864 F.2d 1235, 1246 (5th Cir.1989). Deliberate indifference requires a showing that defendants (1) were aware of facts from which an inference of excessive risk to the prisoner’s health or safety could be drawn and (2) actually drew an inference that such potential for harm existed. Herman v. Holiday, 238 F.3d 660, 664 (5th Cir. 2001).
III.
A.
The first incident occurred on May 30, 2007, and involved Lt. Christopher Holman. McCreary was in administrative segregation, awaiting a hearing. Prison policy requires inmates to be handcuffed during transport to the hearing. The normal procedure is to handcuff the arms behind the back unless a prisoner has a front-handcuff pass. Prisoners do not keep passes on their person; instead, they are kept on record with the medical unit. McCreary was wearing a sling and asked Holman to handcuff his arms in front, insisting he had a pass. Holman stated in his affidavit that he called medical personnel and was told that McCreary did not have a front-handcuff pass. Holman then told McCreary that he could not attend the hearing unless he was handcuffed behind his back. McCreary complied, causing his shoulder to dislocate.
This first incident does not amount to excessive use of force or deliberate indifference. McCreary had to be handcuffed to attend the hearing, and there is no evidence that he had a front-handcuff pass. These facts do not amount to unnecessary and wanton infliction of pain, so there is insufficient evidence to create an issue of material fact.
B.
The second incident was on June 11, 2007, in the course of another transfer from administrative segregation to a hearing, this time involving Sgt. Francis Sweeney. McCreary was wearing a sling and insisted he had a sling pass. Sweeney called medical personnel and was informed that McCreary did not have a front-handcuff pass. Again, McCreary complied and allowed Sweeney to handcuff him behind his back so that he could attend the hearing, which caused his shoulder to dislocate. On these facts, summary judgment was appropriate. The record shows that McCreary obtained a front-cuff pass on June 11 but does not establish whether the pass was in effect when Sweeney called the medical unit. There is no evidence that Sweeney acted in disregard of McCreary’s pass with the malicious intent to harm.
C.
The third incident occurred on June 22, 2007, and once again involved Holman. The facts are in material dispute. Holman stated in his affidavit that McCreary threw an unknown liquid onto *519Officer Hernandez. When an inmate assaults an officer, the inmate is immediately secured, then prison officials inquire whether the inmate has a medical pass. In accordance with these procedures, Holman ordered McCreary to be handcuffed behind his back while his cell was searched. Holman avers that he then checked with medical personnel but was told McCreary did not have a front-handcuff pass. Holman argues that pursuant to that information, he followed medical and security procedures and continued to secure McCreary with his arm behind his back.
McCreary controverts Holman’s account. In his opposition to summary judgment, McCreary stated that he had a front-handcuff pass on June 22. The record reveals that to be true. R. 251. The record also contains a handwritten note from K. Wardell to Lt. Holman on June 13 in which Wardell informed Holman that McCreary had a front-handcuff pass. R. 248. The note states, “Lt. Holman, I [checked] all the way back to 4-29-07. This is the 1st order for front pass. It expires 7-11-07. K. Wardell.” R. 248. The note was written at the bottom of a printed email in which a prison official had ordered a front-cuff pass for McCreary.
The district court did not address this evidence, despite that McCreary, in his opposition to summary judgment, stated that evidence in the record showed he had a front-cuff pass on June 22. McCreary also objected on the ground that Holman had failed to state which member of medical personnel told him that McCreary was not on the pass list. Thus, district court failed to address McCreary’s objections or the relevant evidence; instead, it treated Holman’s contested affidavit as established fact.
The note personally addressed to Holman creates a genuine issue of material fact, because it suggests Holman may have known that McCreary had a front-handcuff pass at the time of the June 22 incident. Holman avers that the medical unit informed him that McCreary did not have a pass, but Holman has not established the source of that misinformation, and the record does not contain evidence from medical personnel that supports Holman’s version. The factual dispute as to Holman’s knowledge affects whether Holman acted in good faith and is therefore material to the exeessive-use-of-force claim and to the issue of deliberate indifference.
D.
The last incident arose out of an argument with Sgt. Douglas Gregory on January 25, 2008, in the prison dining area. Gregory stated that McCreary was using his shirt as a makeshift sling and had his left arm inside his shirt. Gregory insisted that McCreary put his left arm through his shirt sleeve. As a general matter, prisoners are not allowed to place their arms inside their shirts because of the risk that they could hide contraband and weapons. According to Gregory, McCreary was not wearing a proper sling, became argumentative, and created a security problem. Gregory restrained McCreary and handcuffed him behind his back. He then allegedly called medical personnel, who informed him that McCreary did not have a front-cuff pass.
McCreary’s account differs significantly. He stated that he was not using his shirt as a makeshift sling but was rather wearing a proper medically-issued sling. He could not put his arm through his shirt sleeve, because it was too painful to move his arm, so he asked Gregory to send him to the medical unit for help in putting his arm through his sleeve. He informed Gregory that he had a medical pass for his sling and that his shoulder was severely injured. Gregory then became agitated, *520grabbed McCreary by the shoulder, forced his arm behind his back, and caused the shoulder to dislocate.
McCreary has filed a verified complaint whose allegations contradict Gregory’s version of the facts. “On summary judgment, factual allegations set forth in a verified complaint may be treated the same as when they are contained in an affidavit.” Hart, 343 F.3d at 765. McCreary’s allegations support a claim of deliberate indifference against Gregory.
A genuine issue of material fact exists as to whether Gregory dislocated McCreary’s shoulder with knowledge of his serious physical ailment. We recognize that prison officers at times must use force to maintain Order and that that need is heightened where an inmate’s unruliness may create a general disturbance. We take no position as to whether Gregory used excessive force or acted with deliberate indifference. The district court on remand should establish the relationship between the need for force and the amount used in this incident, any threat that Gregory could have reasonably perceived, and any efforts made to temper the severity of the forceful response.1
IV.
For the reasons stated, the summary judgment as to the events of May 30 and June 11, 2007, is AFFIRMED. The judgment is VACATED as to June 22, 2007 and January 25, 2008, and this matter is REMANDED for further proceedings. The motions for appointment of counsel and to allow attachments are DENIED.
We express no view on what decisions or ultimate rulings the district court should make on remand. Also, we do not address defendants’ claim of qualified immunity. The issues we have addressed go to the first prong of the qualified-immunity analysis, which is whether there was a constitutional violation in the first place. Where there is a violation, the defendants, in their individual capacities, still have an opportunity to assert that the constitutional right was not clearly established at the time or that their conduct was not objectively unreasonable.