dissenting:
Running a prison is an “extraordinarily difficult undertaking.” Wolff v. McDonnell, 418 U.S. 539, 566, 94 S.Ct. 2963, 41 L.Ed.2d 935 (1974). Prison administrators, tasked with managing a “volatile environment,” need flexibility to make on-the-ground judgment calls relating to inmate safety and maintaining order in the institution. Sandin v. Conner, 515 U.S. 472, 482, 115 S.Ct. 2293, 132 L.Ed.2d 418 (1995). That includes having in place policies and procedures to address complaints lodged against staff by inmates so that inmates cannot manipulate the system for improper reasons. It comes as no surprise that the Supreme Court has time and again reminded us that courts are “ill equipped” to address the “increasingly urgent problems” facing prisons. Turner v. Safley, 482 *695U.S. 78, 84, 107 S.Ct. 2254, 96 L.Ed.2d 64 (1984) (citation omitted). This case illustrates why we need to be careful before interfering in the way a prison is run.
Today, the majority denies Lieutenant Wise qualified immunity despite his reliance on a legitimate California prison regulation authorizing the . transfer of an inmate into administrative segregation after receiving a complaint against a correctional officer that alleged serious misconduct. In my view, the majority decision improperly entangles itself in the “day-to-day management of [Corcoran State] prison.” Sandin, 515 U.S. at 482, 115 S.Ct. 2293. Because Lieutenant Wise is entitled to qualified immunity for reasonably following prison policy, I respectfully dissent.
I
The First Amendment prohibits prison officials from retaliating against prisoners for exercising their First Amendment rights. See Bruce v. Ylst, 351 F.3d 1283, 1288 (9th Cir. 2003). A prisoner retaliation claim consists of five elements: “(1) [a]n assertion that a state actor took some adverse action against an inmate, (2) because of (3) that prisoner’s protected conduct, and that such action (4) chilled the inmate’s exercise of his First Amendment rights, and (5) the action did not reasonably advance a legitimate correctional goal.” Rhodes v. Robinson, 408 F.3d 559, 567-68 (9th Cir. 2004). To surviye a motion for summary judgment, a plaintiff must demonstrate a triable issue of material fact on each element. Brodheim v. Cry, 584 F.3d 1262, 1269 n.3 (9th Cir. 2009). In evaluating whether' the plaintiff has met this burden, the court “should ‘afford appropriate deference and flexibility to prison officials.” Pratt v. Rowland, 65 F.3d 802, 807 (9th Cir. 1995) (quoting Sandin, 515 U.S. at 482, 115 S.Ct. 2293).
The majority concludes that inmate Shepard demonstrated a triable issue of material fact that his constitutional rights were violated when Lieutenant Wise (the watch commander) transferred him to administrative segregation following the lodging of his complaint against another officer. Maj. Op. at 688-93.1 disagree. The record is not sufficient to establish that Shepard’s transfer to administrative segregation did not “advance legitimate peno-logical goals, such as preserving institutional order and discipline.” Bruce, 351 F.3d at 1288 (quoting Barnett v. Centoni, 31 F.3d 813, 816 (9th Cir. 1994)).
Lieutenant Wise maintains that he transferred Shepard to administrative segregation by following a California Department of Corrections and Rehabilitation (CDCR) regulation designed to protect prisoners and ensure the integrity of internal investigations. This regulation provides:
When an inmate’s presence in an institution’s general inmate population presents an immediate threat to the safety of the inmate or others, endangers institution security or jeopardizes the integrity of an investigation of an alleged serious misconduct or criminal activity, the inmate shall be immediately removed from general population and be placed in administrative segregation. •
Cal. Code Regs. Tit. 15, § 3335(a) (2005).
Shepard’s transfer into administrative segregation occurred immediately after he reported that Officer Quillen (assigned to his housing unit) had used excessive force after Shepard refused to identify himself during a cell count, necessitating removing him to a nearby holding cell for the violation. Lieutenant Wise’s decision to separate. Shepard from Officer Quillen was in conformance with the prison regulation and made' in furtherance of a legitimate correctional goal.
*696If Shepard had not been transferred into administrative segregation, he would have been left in the same housing unit with Officer Quillen, the officer against whom Shepard had complained. And if Shepard’s allegations were true, and Officer Quillen employed excessive force in moving him, it was only reasonable to separate Shepard from Officer Quillen to ensure Shepard’s continued safety. Shepard’s transfer also protected the integrity of the prison’s internal investigation into Officer Quillen’s misconduct by taking away any opportunity for Officer Quillen to pressure Shepard to recant his allegations or to prevent Shepard from improperly importuning other inmate witnesses prior to obtaining witness statements.
In short, Lieutenant Wise received a complaint that one of his correctional officers had engaged in abusive misconduct. Knowing this, Lieutenant Wise made a judgment call: Shepard’s continued presence in his housing unit “present[ed] an immediate threat to [Shepard’s] safety” and “jeopardize^] the integrity of an investigation” into Officer Quillen’s alleged misconduct. Cal. Code Regs. Tit. 15, § 3335(a) (2005). Lieutenant Wise properly followed prison policy and transferred Shepard into administrative segregation in furtherance of those legitimate penological goals. A reasonable correctional supervisor would have done the same.
The majority suggests that Lieutenant Wise relied on the prison regulation as a pretext to retaliate against Shepard for reporting Officer Quillen. Maj. Op. at 689-91; see Bruce, 351 F.3d at 1289 (“[I]f ... the defendants abused [prison] procedure as a cover or ruse to silence and punish [the plaintiff] because he filed grievances, they cannot assert that [their actions] served a valid penological purposed”). I disagree. The majority ignores the legitimate institutional concern that we don’t want inmates employing bogus staff complaints as a way to manipulate staff or to effectuate a transfer to a more desirable housing unit.
Lieutenant Wise initiated the process to transfer Shepard to administrative segregation on the same day that Shepard complained about Officer Quillen, July 15, 2008. The majority suggests this close temporal proximity between Shepard’s speech and Lieutenant Wise’s adverse action is evidence of retaliatory motive. Maj. Op. at 689-90; see McCollum v. Cal. Dep’t of Corr. & Rehab., 647 F.3d 870, 882 (9th Cir. 2011). Not here. If the understandable penological goals are to be effectuated, the transfer must occur immediately.
That is why the timing evidence does not suggest an improper motive, but rather supports Lieutenant Wise’s claims that Shepard’s transfer served a legitimate correctional goal. Logically, § 3335 protects a complaining inmate from staff reprisals only if the inmate is transferred immediately after making a complaint against a guard in his housing unit. And here, prison officials kept Shepard in administrative segregation throughout the entire investigation of Officer Quillen, transferring him back to the general population shortly after the investigation closed. See Cal. Code Regs. Tit. 15, § 3339(a) (“Release from administrative segregation shall occur at the earliest possible time in keeping with the ... reasons for the inmate’s placement in administrative segregation.”).
Shepard’s placement notice, which both Lieutenant Wise and Shepard signed on July 17, 2008, states: “[Y]ou ... are being removed from the Facility III-A General Population and being placed in the Administrative Segregation Unit (ASU) .pending an investigation into your allegations of staff misconduct.” Boxes checked on the *697form for “Reason(s) for Placement” indicate that Shepard was transferred because he “presents an immediate threat to the safety of self or others,” “jeopardizes [the] integrity of an investigation of alleged serious misconduct,” and “endangers institution security.”
Lieutenant Wise’s transfer decision was reviewed and endorsed by a prison committee on July 23, 2008. The committee noted, “ ‘S’ was placed in ASU [from] Facility 3A, pending investigation into allegation of alleged staff misconduct by Officer T. Quillen as ‘S’ alleged that ‘S’ was physically assaulted by him.” Even construing the evidence in the light most favorable to Shepard, following the prison policy furthered the legitimate correctional goal of shielding Shepard from any reprisal and making sure the investigation was not improperly colored by Shepard’s continued presence in the unit housing the witnesses. Had the evidence suggested otherwise, the committee would have reversed that decision.
Finally, the majority faults Lieutenant Wise for not “offer[ing] a reason as to why Shepard could not have been transferred to a different cell block where he would have been kept away from Quillen and any witnesses.” Maj. Op. at 692. This is not the standard. Any suggestion that a prison official must transfer a complaining inmate to a different pod every time an inmate lodges an allegation of staff misconduct shows little regard for the “inordinately difficult” task of running a prison—one that is “peculiarly within the province of the legislative and executive branches of government.” Turner, 482 U.S. at 85, 107 S.Ct. 2254. Such a standard would certainly incentivize a flurry of frivolous complaints by prison inmates hoping to be transferred into a more favorable pod. One can easily imagine why, for example, members of the same prison gang would like to be housed together. Or an inmate might wish to be moved so he can be near another inmate or guard against whom he holds an outstanding grudge to launch an attack. Such considerations are exactly why the Supreme Court has instructed us to practice “judicial restraint” before entangling ourselves in the inner-workings of prisons. Id.
II
Even assuming Shepard has alleged facts that show a constitutional violation, Lieutenant Wise is still entitled to qualified immunity if the right at issue was not “clearly established” at the time of the challenged conduct. Pearson v. Callahan, 555 U.S. 223, 231, 129 S.Ct. 808, 172 L.Ed.2d 565 (2009). A clearly established right is one that is “sufficiently clear that every reasonable official would have understood that what he is doing violates that right.” Reichle v. Howards, — U.S. -, 132 S.Ct. 2088, 2093, 182 L.Ed.2d 985 (2012) (emphasis added) (internal quotation marks and alteration omitted). Shepard can’t meet that high burden here.
The question we must answer is: would a reasonable prison official in Lieutenant Wise’s position have known that placing Shepard in administrative segregation after a complaint of serious staff assault, as directed by a clearly legitimate prison regulation, was a violation of Shepard’s constitutional rights? I am at a loss as to how the answer to this question can be anything but a resounding “no.”
The relevant prison regulation, § 3335, required Lieutenant Wise to transfer Shepard into administrative segregation following his complaint of serious staff mis*698conduct ■ -if Lieutenant Wise determined that Shepard’s personal safety was at risk or that Shepard’s continued presence in the housing unit threatened the integrity of the resulting internal investigation. The record amply demonstrates why it was reasonable for Lieutenant Wise to transfer Shepard into administrative segregation for these legitimate reasons.
Under these circumstances, a reasonable officer in Lieutenant Wise’s position could not have known that complying with a mandatory prison regulation would be a violation of Shepard’s constitutional rights. In concluding otherwise and second-guessing his decision, the majority subjects Lieutenant Wise to unnecessary “harassment, distraction, and liability.” Pearson, 555 U.S. at 231, 129 S.Ct. 808. The Supreme Court has told us that 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). Lieutenant Wise’s .decision to transfer Shepard into administrative segregation falls , squarely within the range of conduct that is protected by qualified, immunity. The district court properly granted him the law’s protection. My colleagues err in refusing to apply it.
I respectfully dissent.