                    FOR PUBLICATION
  UNITED STATES COURT OF APPEALS
       FOR THE NINTH CIRCUIT

ERNEST LEE ALLEN,                               No. 02-16917
             Petitioner-Appellant,                 D.C. No.
               v.                               CV-01-05994-
ART CALDERON,                                     OWW/DLB
            Respondent-Appellee.
                                                  OPINION

        Appeal from the United States District Court
            for the Eastern District of California
        Oliver W. Wanger, District Judge, Presiding

                  Argued and Submitted
        December 9, 2004—San Francisco, California

                       Filed May 3, 2005

  Before: Diarmuid F. O’Scannlain, Robert E. Cowen,* and
               Carlos T. Bea, Circuit Judges.

                    Opinion by Judge Cowen




   *The Honorable Robert E. Cowen, Senior United States Circuit Judge
for the Third Circuit, sitting by designation.

                               4807
4810                      ALLEN v. CALDERON
                             COUNSEL

David M. Porter, Assistant Federal Public Defender, Sacra-
mento, California, for the appellant.

Justain P. Riley, Deputy Attorney General, Sacramento, Cali-
fornia, for the appellee.


                              OPINION

COWEN, Circuit Judge:

  Ernest Lee Allen appeals the district court’s order dismiss-
ing his petition for Writ of Habeas Corpus pursuant to 28
U.S.C. § 2254 for failure to prosecute. Specifically, Allen
asserts that the district court erred in not considering the evi-
dence of his incompetence before dismissing the petition.1 We
have jurisdiction pursuant to 28 U.S.C. §§1291 and 2253 and
will reverse and remand for further proceedings.

   The circumstances of Allen’s conviction have no bearing
on this appeal. Proceeding pro se, Allen filed a federal habeas
corpus petition claiming that his sentence constituted cruel
and unusual punishment. The petition was unsigned. The dis-
trict court issued an order requiring Allen to submit an
amendment within thirty days, which included his signature.
Two weeks later, Allen filed an amended petition which con-
tained a photocopy, rather than an original, of his signature,
and added two additional claims for ineffective assistance of
counsel.

   The district court sua sponte issued an order to show cause
why the petition should not be dismissed for failure to exhaust
the new claims. The order also reiterated the court’s demand
  1
    Allen’s second and third certified issues for appeal are foreclosed by
Pliler v. Ford, 524 U.S. 225, 124 S. Ct. 2441, 2445-46 (2004).
                      ALLEN v. CALDERON                     4811
that Allen submit an amendment bearing an original signa-
ture. The order warned that “failure to comply . . . may result
in a recommendation that the action be dismissed . . . .” (E.R.,
Tab 2 at 4).

   Approximately one month later, Allen filed a motion for an
extension of time to answer the order to show cause on the
grounds that he does not have adequate access to the courts,
is mentally impaired, and does not know how to respond to
the order. The motion included his own sworn declaration and
a sworn declaration of another inmate, Charles Johnson. Each
declaration explains that Allen is mentally ill and does not
understand the district court’s orders. Allen also attached a
letter from the prison psychiatrist whose care he is under
while placed in the Enhanced Outpatient Program at the
prison. This letter states that Allen is diagnosed with Chronic
Undifferentiated Schizophrenia and is taking two psy-
chotropic medications.

   The district court extended the time for Allen to respond to
the order to show cause. However, Allen did not timely
respond and a Report and Recommendation was issued sug-
gesting that the action be dismissed for failure to prosecute.
Approximately two weeks later, Allen filed a motion for
appointment of counsel explaining that he suffers from a “de-
bilitating mental illness that requires a course of treatment
that includes the use of various psychotropic medications. His
mental condition and the side-effects associated with the pre-
scribed medications, severely [hinder] his ability to compre-
hend or correctly respond to the determinations and Orders
made by the Court.” (E.R., Tab 5 at 3). The district court
denied this motion.

   Allen filed objections to the Report and Recommendation,
asserting that the court erred by failing to consider his extenu-
ating circumstances, specifically his mental illness and limited
access to the law library. Despite these objections, the district
court dismissed the petition. This appeal followed.
4812                      ALLEN v. CALDERON
   We review de novo a district court’s order denying a peti-
tion for writ of habeas corpus. See Laws v. LaMarque, 351
F.3d 919, 922 (9th Cir. 2003). Findings of fact made by the
district court relevant to the dismissal of the habeas petition
are reviewed for clear error. See Bonin v. Calderon, 59 F.3d
815, 823 (9th Cir. 1995). However, we review for abuse of
discretion a district court’s order dismissing an action for lack
of prosecution or failure to comply with a court order. See
Hernandez v. City of El Monte, 138 F.3d 393, 398 (9th Cir.
1998); see also Yourish v. Cal. Amplifier, 191 F.3d 983 (9th
Cir. 1999).

   [1] Allen asserts that the district court erred in dismissing
his petition for failure to prosecute without evaluating his
assertions of incompetence.2 As evidence of his incompe-
tence, Allen submitted his own sworn declaration and that of
another inmate. Each declaration explains that Allen is men-
tally ill and does not understand the court’s instructions. As
further support, Allen included a letter from the prison psychi-
atrist, dated April 8, 2002, which stated that Allen is under his
care, diagnosed with Chronic Undifferentiated Schizophrenia,
and is taking two psychotropic medications. Neither the
Report and Recommendation nor the subsequent district court
order adopting it mention the evidence of incompetence.

   [2] Additionally, there is no reason other than his mental
illness why Allen could not have sent an original signature
and pleaded that he did exhaust his state court remedies, espe-
cially given the fact that he had exhausted all of his claims.
The allegations in Allen’s motion for an extension of time and
his motion for appointment of counsel, together with the
  2
   Although not specified in the order, the dismissal was with prejudice
because under Fed. R. Civ. P. 41, dismissals for failure to prosecute are
deemed adjudications on the merits, unless otherwise specified. Further,
despite Allen’s argument to the contrary, we will interpret the order as a
dismissal for failure to prosecute (as stated in the order), rather than a
summary dismissal or a dismissal for failure to comply with the court’s
order.
                       ALLEN v. CALDERON                     4813
admissible evidence Allen offered in support of these
motions, establish that he suffers from a mental illness, the
mental illness prevents him from being able to understand and
respond to the court’s order, and he was still suffering from
the illness during the relevant time period. Because the allega-
tions are unrebutted, the district court was required to take
them as true in deciding whether to dismiss the petition. Laws
v. LaMarque, 351 F.3d 919, 922 (9th Cir. 2003); Roberts v.
Corrothers, 812 F.3d 1173, 1177 (9th Cir. 1998).

   [3] Pursuant to Fed. R. Civ. P. 17(c), courts are required to
“appoint a guardian ad litem for an . . . incompetent person
not otherwise represented in an action or shall make such
other order as it deems proper for the protection of the . . .
incompetent person.” Id. This Rule applies to habeas petition-
ers as it does to other civil litigants. Rule 11 of the Rules Gov-
erning Habeas Corpus Cases provides that the Federal Rules
of Civil Procedure may be applied to habeas petitions to the
extent they are not inconsistent with the habeas rules.

   [4] In a non-habeas civil action, this Court held that if an
“incompetent person is unrepresented, the court should not
enter a judgment which operates as a judgment on the merits
without complying with Rule 17(c).” Krain v. Smallwood,
880 F.2d 1119, 1121 (9th Cir. 1989) (citation omitted). This
Court further reasoned that when a substantial question exists
regarding the mental competence of a party proceeding pro se,
the proper procedure is for the district court to conduct a hear-
ing to determine competence, so a guardian ad litem can be
appointed, if necessary. See id.

   [5] The State argues that we should refrain from applying
the Krain reasoning to habeas proceedings as this would
create a per se rule of counsel for mentally incompetent peti-
tioners. This argument is meritless. We do not hold that a
petitioner should be appointed counsel for habeas proceed-
ings. We merely rule that counsel should be appointed for the
limited purpose of representing the petitioner at the compe-
4814                  ALLEN v. CALDERON
tency hearing as required by Rule 8 of the Rules Governing
Section 2254 Cases, should the district court determine it
advisable. Rule 8(c) of the Rules Governing Section 2254
Cases (“If an evidentiary hearing is required the judge shall
appoint counsel for a petitioner who qualifies for the appoint-
ment of counsel under 18 U.S.C. § 3006A(g) [public defend-
er].”).

   Similarly, the State’s other reason for distinguishing Krain
—that here the court dismissed for failure to prosecute
whereas in Krain the court dismissed for failure to comply
with the court order—merely notes a distinction without a dif-
ference. The State fails to point out, and we have not found,
any reason to adopt different rules regarding competency
determinations for these two types of dismissals.

   [6] A party proceeding pro se in a civil lawsuit is entitled
to a competency determination when substantial evidence of
incompetence is presented. Although the case at bar has a
slightly different procedural posture than Krain, its basic prin-
ciple is applicable here: Where a party’s incompetence in fact
caused him to fail to prosecute or meet a filing deadline, the
action should not be dismissed on such grounds.

   [7] Here, there was sufficient evidence of incompetence at
least to require the district court to make a competency deter-
mination. Although the evidence of incompetence may not
have been artfully presented, the district court must construe
pro se habeas filings liberally. See Maleng v. Cook, 490 U.S.
488 (1989). The State sets forth possible reasons the district
court may have found there was insufficient evidence of
incompetence (i.e., finding that the declarations were not
credible or determining there was no nexus between Allen’s
schizophrenia and associated medications and his inability to
understand instructions). However, the explanations provided
are mere speculation. We cannot determine whether the dis-
trict court abused its discretion based on such conjecture.
                      ALLEN v. CALDERON                    4815
   [8] Because there was sufficient evidence of Allen’s incom-
petence, the district court abused its discretion in dismissing
the petition for failure to prosecute without first holding a
competency hearing or otherwise considering his claim. We
therefore reverse the district court’s dismissal order and
remand for further factual development. On remand, the dis-
trict court should conduct a competency hearing to determine
whether Allen is competent under an appropriate standard for
habeas petitioners. If the district court determines that Allen
is incompetent, it has discretion to appoint a guardian ad litem
or enter such other order it deems proper to protect Allen’s
interests.

  REVERSED AND REMANDED.
