                  FOR PUBLICATION
  UNITED STATES COURT OF APPEALS
       FOR THE NINTH CIRCUIT

CLARENCE LEONARD HEARNS, JR.,          
                Plaintiff-Appellant,
                 v.
CAL TERHUNE; ROBERT POWELL,                 No. 02-56302
Correctional Officer; R. NELSON,
Sergeant, Correctional Officer;              D.C. No.
                                           CV-99-01461-JM
ALAN KAHN; F. DYMOND,
Correctional Captain at Calipatria           OPINION
State Prison; SYLVIA GARCIA, Chief
Deputy Warden; LARRY SMALL,
Warden,
              Defendants-Appellees.
                                       
        Appeal from the United States District Court
           for the Southern District of California
         Jeffrey T. Miller, District Judge, Presiding

                 Argued and Submitted
          December 9, 2004—Pasadena, California

                    Filed June 30, 2005

       Before: Procter Hug, Jr., Harry Pregerson, and
             Marsha S. Berzon, Circuit Judges.

                Opinion by Judge Pregerson




                            7745
7748                  HEARNS v. TERHUNE


                         COUNSEL

Daniel L. Alexander, O’Melveny & Myers, Los Angeles, Cal-
ifornia, for the plaintiff-appellant.

Barbara C. Spiegel, Deputy Attorney General, State of Cali-
fornia, San Francisco, California, for the defendants-
appellees.


                          OPINION

PREGERSON, Circuit Judge:

   Plaintiff-Appellant Clarence Leonard Hearns, Jr., is a Mus-
lim inmate at Calipatria State Prison. In June 1999, Hearns
filed a pro se complaint alleging violations of his civil rights
under 42 U.S.C. § 1983. Specifically, Hearns alleged that sev-
eral Calipatria State Prison officials violated his Eighth
Amendment right to be free from cruel and unusual punish-
ment when they failed to protect him from being attacked by
fellow Muslim inmates. Hearns also claimed that he was sub-
jected to inhumane conditions when he was later placed in
                         HEARNS v. TERHUNE                        7749
protective confinement for nine months in Calipatria’s disci-
plinary segregation unit.

   In February 2002, the district court sua sponte dismissed
Hearns’s original complaint for failing to state a claim, but
granted him leave to amend. After Hearns filed his first
amended complaint, the prison officials moved to dismiss that
complaint under Federal Civil Procedure Rule 12(b)(6). In
July 2002, the district court granted the motion to dismiss,
ruled that Hearns’s amended complaint failed to state a claim,
and dismissed the complaint and the § 1983 action with preju-
dice. Hearns now appeals. We have jurisdiction under 28
U.S.C. § 1291, and we reverse and remand.

I.       FACTS AND PROCEDURAL HISTORY1

   In May 1997, an inmate at Calipatria State Prison sent a
memorandum to Defendant Chief Deputy Warden Sylvia Gar-
cia explaining that the “ruling” Muslim inmates were trying
to force other Muslim inmates to share their prayer oil. This
memorandum was later forwarded to all prison administrators
and to Defendant Alan Kahn, the prison’s Islamic Chaplain.
Shortly afterwards, prison officials and Chaplain Kahn
received another letter that detailed secret boxing matches and
beatings carried out by Muslim inmates in the prison chapels.
As a result, beginning in July 1997, no Muslim inmate was
allowed in the prison chapels unsupervised.

   In August 1997, correctional officers discovered that Mus-
lim inmates in Facility B of the prison were planning to beat
a Muslim inmate in the Facility B chapel for questioning the
authority of the ruling Muslim inmate group. News of the
plan was reported to Defendant F. Dymond (a facility Cap-
tain) and relayed to Defendants Robert Powell (a correctional
     1
   The following facts are taken from Hearns’s pro se first amended com-
plaint and are assumed true for purposes of our review. See Jackson v.
Carey, 353 F.3d 750, 753 (9th Cir. 2003).
7750                  HEARNS v. TERHUNE
officer) and Chaplain Kahn. After the inmates’ plan was dis-
covered, the intended victim was moved from Facility B to
Facility A.

   Chaplain Kahn issued a memorandum in October 1997
addressing the continuing friction and violence between the
Muslim inmates. In the memo, Chaplain Kahn threatened to
suspend all Islamic services unless the safety of Muslim
inmates and visitors attending services could be assured. The
services, however, were never suspended.

   In March 1998, another Muslim inmate housed in Facility
B was targeted for attack by inmates from the ruling Muslims
for disputing the ruling Muslims’ authority. This inmate was
relocated to Facility A. Nonetheless, he was stabbed approxi-
mately one year later in Facility A, allegedly at the request of
the ruling Muslims in Facility B.

   In April 1998, members of the ruling Muslim group stole
prayer oil from Ware, a Muslim inmate. Hearns reported the
incident to Chaplain Kahn. Hearns suggested that Ware’s next
shipment of prayer oil be delivered to Hearns instead of to
Ware. Hearns would then secretly deliver the prayer oil to
Ware. Chaplain Kahn agreed. Concerned that the ruling Mus-
lim inmates would be upset, Hearns asked Chaplain Kahn not
to tell the other inmates of this prayer oil delivery arrange-
ment.

   When the prayer oil arrived, Hearns delivered it to Ware.
On that same day, other Muslim inmates learned of the secret
delivery, either directly or indirectly, from Chaplain Kahn.
The inmates were angry with Hearns and confronted him in
a prison chapel. At that time, Hearns suffered no physical
abuse. But two days later, Hearns was attacked by Muslim
inmate Rushing in the chapel. Rushing was acting at the
direction of Tubbs, Hankins, and Irby, inmates belonging to
the ruling Muslim group. Following an investigation into the
                        HEARNS v. TERHUNE                      7751
attack, Hearns was moved from Facility A to Facility B
because of concerns for his safety.

   After Hearns was moved to Facility B, Chaplain Kahn gave
Hearns the authority to teach Arabic classes in the chapel to
fellow Muslim inmates. Chaplain Kahn also allegedly
reported to several Muslim inmates, including Lino and Nich-
ols, that Hearns believed there was a “messenger” after
Muhammad and that Hearns did not follow the sunnah.2
According to Hearns, holding such beliefs required him to be
killed under the teachings of Islam.

  The violence between Muslim inmates at Calipatria contin-
ued to escalate. In June 1998, Hearns told Correctional Offi-
cer Powell of ongoing disputes between the ruling group and
Muslim inmates. These disputes centered around the ruling
group’s control over other Muslim inmates and which inmates
would teach classes and give sermons. Correctional Officer
Powell allegedly told Hearns that there was no need to worry
and that he would relay Hearns’s concerns to Chaplain Kahn
and Captain Dymond.

   Later that afternoon, Correctional Officer Powell
announced to a group of Muslim inmates gathered in the
Facility B chapel that Chaplain Kahn would come by the next
day to help settle the disputes among the Muslim inmates.
After the announcement, Lino (an inmate who allegedly
learned from Chaplain Kahn that Hearns held impious beliefs)
ordered Hearns to be beaten and stabbed.

   The next day, Hearns arrived at the Facility B chapel to
teach the morning Arabic class. Correctional Officer Powell
greeted him at the door, checked his name off the list of
attendees, and searched him for weapons. Soon after Hearns
entered the chapel, several inmates filed in after him. These
  2
  In Islam, the Arabic word sunnah has come to denote the way Muham-
mad lived his life and is the second source of Islamic jurisprudence.
7752                  HEARNS v. TERHUNE
inmates turned off the chapel lights, attacked Hearns from
behind, and stabbed him numerous times. Even though Mus-
lim inmates were not allowed in the chapel unsupervised, no
correctional officers were present when Hearns was attacked.
After being stabbed and beaten, Hearns saw Lino letting the
attackers out of the chapel. Hearns grabbed Lino and held him
until Correctional Officer Powell and several other correc-
tional officers arrived. Hearns was then taken to the prison’s
central treatment center where he was treated for head lacera-
tions, body cuts, and bruises.

   Following release from the central treatment center three
days later, Hearns was transferred from Facility B to Cali-
patria’s disciplinary segregation unit. This transfer was done
for his safety. Approximately two months later, Hearns
informed the prison officials of various “health hazards” in
the disciplinary segregation yard. Specifically, Hearns com-
plained that the disciplinary segregation yard had “no working
toilets, rusted and insect filled sinks, [and] stagnant pools of
water infested with dead insects.” Hearns also claimed that
cold water, which was supplied to the prison’s general popu-
lation yards, was not available in the disciplinary segregation
yard, despite the fact that the segregation yard’s temperature
regularly exceeded one hundred degrees. According to
Hearns, these hazardous conditions forced him to avoid the
prison yard “for fear of serious health concerns.”

   Hearns attempted to have these conditions corrected
through the prison’s administrative grievance process but
failed. Once he exhausted the administrative grievance pro-
cess, Hearns filed a pro se complaint in district court in June
1999, for violations of his civil rights under 42 U.S.C. § 1983.
In addition to alleging that the prison officials had failed to
protect him from being stabbed in the chapel, Hearns claimed
that the officials subjected him to inhumane conditions while
he was confined in disciplinary segregation.

  In February 2002, the district court sua sponte dismissed,
with leave to amend, Hearns’s original complaint for failing
                      HEARNS v. TERHUNE                     7753
to state a claim. Approximately one month later, Hearns filed
an amended complaint. Shortly after that, several of the
Defendants filed a motion to dismiss Hearns’s amended com-
plaint pursuant to Rule 12(b)(6) of the Federal Rules of Civil
Procedure.

   The district court dismissed Hearns’s amended complaint
and action with prejudice on July 1, 2002. The district court
ruled that Hearns’s “failure-to-protect” allegations (related to
the stabbing) did not satisfy the Eighth Amendment’s subjec-
tive component because he did not allege deliberate indiffer-
ence on the part of the prison officials. The court also ruled
that Hearns’s “conditions-of-confinement” allegations (related
to the disciplinary segregation yard) were not sufficiently seri-
ous to meet the Eighth Amendment’s objective component.

   Hearns timely appealed the district court’s dismissal order
on July 25, 2002. A two-judge motions panel of our court
issued an order directing Defendants to show cause why sum-
mary reversal of the district court’s decision was inappropri-
ate based on Hearns raising a colorable claim. Defendants
filed a response to the order to show cause, and the panel’s
order was discharged on February 4, 2004. On April 15, 2004,
we appointed pro bono counsel to represent Hearns. Hearns
now appeals the district court’s dismissal of his § 1983 action.

II.   DISCUSSION

   A district court’s dismissal of a complaint under Rule
12(b)(6) of the Federal Rules of Civil Procedure is reviewed
de novo. See Zimmerman v. City of Oakland, 255 F.3d 734,
737 (9th Cir. 2001). We accept all allegations of material fact
as true and construe them in the light most favorable to the
prisoner. See Resnick v. Hayes, 213 F.3d 443, 447 (9th Cir.
2000). Because Hearns appeared pro se in the district court,
we liberally construe the pleadings. See Hughes v. Rowe, 449
U.S. 5, 9-10 (1980); Estelle v. Gamble, 429 U.S. 97, 106
7754                   HEARNS v. TERHUNE
(1976); Haines v. Kerner, 404 U.S. 519, 520-21 (1972); see
also Eldridge v. Block, 832 F.2d 1132, 1137 (9th Cir. 1987).

  A.   Hearns’s “Failure-to-Protect” Claim

   [1] “ ‘[P]rison officials have a duty . . . to protect prisoners
from violence at the hands of other prisoners.’ ” Farmer v.
Brennan, 511 U.S. 825, 833 (1994) (quoting Cortes-Quinones
v. Jimenez-Nettleship, 842 F.2d 556, 558 (1st Cir. 1988)). The
failure of prison officials to protect inmates from attacks by
other inmates may rise to the level of an Eighth Amendment
violation when: (1) the deprivation alleged is “objectively,
sufficiently serious” and (2) the prison officials had a “suffi-
ciently culpable state of mind,” acting with deliberate indif-
ference. Farmer, 511 U.S. at 834 (internal quotations
omitted). “[D]eliberate indifference entails something more
than mere negligence . . . [but] is satisfied by something less
than acts or omissions for the very purpose of causing harm
or with knowledge that harm will result.” Id. at 835.

   The district court dismissed Hearns’s “failure-to-protect”
claim on the ground that Hearns failed to show that the prison
officials had a sufficiently culpable state of mind. According
to the district court, the prison officials could not have
inferred or otherwise known that the inmates who attacked
Hearns in the chapel posed a substantial risk of harm to
Hearns.

   [2] We disagree. In his amended complaint, Hearns alleged
facts detailing religiously motivated violence. According to
Hearns, prison officials, including Chaplain Kahn, knew as
early as May 1997 that a group of ruling Muslim inmates had
planned and implemented attacks against other Muslim
inmates who questioned the authority of the ruling group,
failed to follow the ruling group’s orders, or refused to share
prayer oil. The prison officials also knew that the violence
and friction involved differences between the prison’s Muslim
                           HEARNS v. TERHUNE                           7755
community over religious leadership and services at the
prison, yet did nothing to remedy this situation.3

   [3] Hearns also claimed that the prison officials were aware
of, yet disregarded, the danger posed by the specific inmates
who had orchestrated previous attacks on other inmates who
did not support the ruling Muslim group. In fact, inmates from
the ruling Muslim group had previously committed a violent
attack against Hearns.4

   [4] Next, Hearns alleged facts that, when accepted as true
and construed in the light most favorable to Hearns, raise an
inference that the prison officials created the risk and then
facilitated the attacks. For example, the amended complaint
alleged that Chaplain Kahn knew that the ruling Muslim
group was trying to steal prayer oil from other Muslim
inmates. In deciding to help Ware (a fellow Muslim inmate),
Hearns specifically asked Chaplain Kahn not to tell other
inmates that Ware’s prayer oil shipment had arrived or that
Hearns would deliver the prayer oil to Ware. Nevertheless,
Chaplain Kahn, either directly or indirectly, informed the rul-
ing Muslim group that Hearns would secretly deliver the
prayer oil to Ware. Later, Chaplain Kahn allegedly informed
Muslim inmates that Hearns believed there was a prophet
after Muhammad and that Hearns did not follow the teachings
of Muhammad. Passing such information to the violent ruling
Muslim group placed Hearns in danger and created a substan-
tial risk that Hearns would be injured or killed.

   Finally, the allegations regarding the attack against Hearns
  3
     Although the prison officials threatened to suspend all Islamic services
at the prison if the safety of all Muslim inmates could not be assured,
allegedly they neither suspended the services nor took other measures to
protect the Muslim inmates who were not part of the ruling group of Mus-
lims.
   4
     The first attack occurred in the Facility A chapel two days after Hearns
accepted a fellow inmate’s shipment of prayer oil.
7756                  HEARNS v. TERHUNE
at the Facility B chapel similarly raise an inference that the
prison officials facilitated the attacks against Hearns. Correc-
tional Officer Powell allegedly greeted Hearns at the chapel
door and searched him for weapons. But, according to Hearns,
Correctional Officer Powell was no longer present when
Hearns was attacked by inmates belonging to the ruling Mus-
lim group, even though Muslim inmates were not allowed in
the chapel unsupervised. Indeed, prison officials knew that
some of these same inmates had previously attacked Hearns
or planned and implemented attacks on other Muslim inmates.

   [5] The series of planned attacks and religious-related vio-
lence at Calipatria State Prison was “longstanding, pervasive,
[and] well-documented.” Farmer, 511 U.S. at 842 (internal
quotations omitted). “[S]uch evidence could be sufficient to
permit a trier of fact to find that the [prison officials] had
actual knowledge of the risk.” Id. at 842-43.

   [6] In sum, Hearns adequately informed the parties and the
district court of his Eighth Amendment “failure-to-protect”
claim and showed that he may have been entitled to relief. See
Fontana v. Haskin, 262 F.3d 871, 876-77 (9th Cir. 2001)
(“Specific legal theories need not be pleaded so long as suffi-
cient factual averments show that the claimant may be entitled
to some relief.”). The allegations in Hearns’s pro se amended
complaint were sufficient to raise an inference that the prison
officials acted with deliberate indifference, or knew that
Hearns faced a substantial risk of serious harm and “disre-
gard[ed] that risk by failing to take reasonable measures to
abate it.” Farmer, 511 U.S. at 847. Accordingly, the district
court erred in dismissing Hearns’s “failure-to-protect” claim.

  B.   Conditions of Confinement in Disciplinary
       Segregation

  As with his “failure-to-protect” claims, Hearns must make
two showings to challenge his conditions of confinement.
First, he must make an objective showing that the deprivation
                      HEARNS v. TERHUNE                     7757
was “sufficiently serious” to form the basis for an Eighth
Amendment violation. Wilson v. Seiter, 501 U.S. 294, 298
(1991). Second, Hearns must make a subjective showing that
the prison official acted “with a sufficiently culpable state of
mind.” Id.

   [7] In light of the Eighth Amendment’s prohibition against
cruel and unusual punishment, prison officials have a duty to
ensure that inmates receive adequate food, clothing, shelter,
and medical care. See Farmer, 511 U.S. at 832; Keenan v.
Hall, 83 F.3d 1083, 1089 (9th Cir. 1996); Hoptowit v. Ray,
682 F.2d 1237, 1246 (9th Cir. 1982). Moreover, “[e]xercise
has been determined to be one of the basic human necessities
protected by the Eighth Amendment,” LeMaire v. Maass, 12
F.3d 1444, 1457 (9th Cir. 1993), and a long-term deprivation
of outdoor exercise for inmates is unconstitutional, see id. at
1458 (“[T]his circuit has determined the long-term denial of
outside exercise is unconstitutional.”) (emphasis in original).
See also Spain v. Procunier, 600 F.2d 189, 199 (9th Cir.
1979) (“There is substantial agreement among the cases in
this area that some form of regular outdoor exercise is
extremely important to the psychological and physical well
being of the inmates.”); Toussaint v. Yockey, 722 F.2d 1490,
1493 (9th Cir. 1984) (holding that the district court did not err
in concluding that the denial of outdoor exercise to inmates
assigned to administrative segregation for over one year
raised “substantial constitutional question”).

   The district court dismissed Hearns’s amended complaint
for not meeting the objective component. According to the
district court, the deprivations Hearns alleged were not suffi-
ciently serious to violate the Eighth Amendment. Specifically,
the district court ruled:

    Plaintiff has failed to allege any facts that would
    suggest he was subjected to inhumane conditions of
    confinement that imposed an excessive risk to his
    health or safety. For example, plaintiff does not
7758                  HEARNS v. TERHUNE
    allege that he was deprived of water but only that ice
    cold water was not available to him. Plaintiff has
    failed to allege facts suggesting that the rusted sinks
    and stagnant pools of water filled with insects posed
    an excessive risk to his health and safety. Moreover,
    plaintiff simply alleges that the toilets did not work,
    which presumably means that they did not flush.
    Although certainly unpleasant, plaintiff fails to
    allege that the toilets were completely unusable for
    a period of time so that, for example, he was left
    with no alternative than to soil himself.

   [8] The district court, however, did not take into account
the nine month period in which Hearns was subjected to these
conditions of confinement. “The circumstances, nature, and
duration of a deprivation of [ ] necessities must be considered
in determining whether a constitutional violation has
occurred.” Johnson v. Lewis, 217 F.3d 726, 731 (9th Cir.
2000). Hearns alleged serious health hazards in the disciplin-
ary segregation yard, including toilets that did not work; sinks
that were rusted and stagnant pools of water infested with
insects; and a lack of cold water even though the temperatures
in the prison yard exceeded one hundred degrees. Hearns, in
his complaint, asserted that these conditions kept him from
using the yard.

   [9] In one hundred degree plus weather, lack of drinkable
water can be dangerous, thus precluding use of the yard. We
need not decide whether the other allegations regarding the
condition of the yard would independently, if proved, estab-
lish unconstitutional conditions, because with allegations that
there was a lack of drinkable water, the complaint is sufficient
to state a cause of action. The allegations in Hearns’s com-
plaint are not entirely clear with regard to whether there was
no water available, no cold water available, or no ice water
available. Nonetheless, Hearns complained of “health haz-
ards” and “serious health concerns,” requested “clean water
containers,” and alleged very high temperatures of “over 100
                         HEARNS v. TERHUNE                       7759
degrees plus.” For purposes of a 12(b)(6) motion, these alle-
gations are adequate to state a claim of unconstitutional prison
conditions. Cf. Keenan, 83 F.3d at 1089-92 (recognizing that
deprivation of outdoor exercise, excessive noise, 24 hour
lighting, and inadequate ventilation, food, and water violate
the Eighth Amendment rights of inmates); see also Johnson,
217 F.3d at 732 (noting that “[m]ore modest deprivations can
also form the objective basis of a violation, but only if such
deprivations are lengthy or ongoing”). Accordingly, we con-
clude that the district court erred in dismissing Hearns’s
“conditions-of-confinement” claim.

III.   CONCLUSION

   “A complaint should not be dismissed [under 12(b)(6)]
unless it appears beyond doubt that the plaintiff can prove no
set of facts in support of the claim that would entitle the plain-
tiff to relief.” Thompson v. Davis, 295 F.3d 890, 895 (9th Cir.
2002); see also Conley v. Gibson, 355 U.S. 41, 45-46 (1957).
Hearns’s pro se amended complaint may not have been art-
fully drawn, but it did provide the prison officials with fair
notice of his claims and the grounds upon which they rested.5
See Conley, 355 U.S. at 47.

   [10] “The issue is not whether a plaintiff will ultimately
prevail but whether the claimant is entitled to offer evidence
to support the claims. Indeed it may appear on the face of the
pleadings that a recovery is very remote and unlikely but that
is not the test.” Scheuer v. Rhodes, 416 U.S. 232, 236 (1974),
overruled on other grounds by Harlow v. Fitzgerald, 457 U.S.
800 (1982). At a minimum, Hearns alleged facts that: (1)
raised an inference that the prison officials knew of the risk
that certain inmates would attack Hearns, yet failed to take
reasonable measures to abate it; and (2) showed that he was
exposed to serious health hazards in the disciplinary segrega-
  5
   Hearns’s appointed counsel is directed to file a second amended com-
plaint which more clearly sets forth Hearns’s § 1983 claims.
7760               HEARNS v. TERHUNE
tion yard for a nine month period. Accordingly, we
REVERSE the district court’s order dismissing Hearns’s
§ 1983 action and REMAND for further proceedings.
