                     FOR PUBLICATION

   UNITED STATES COURT OF APPEALS
        FOR THE NINTH CIRCUIT


 AARON ANDERSON,                             No. 16-15338
     Petitioner-Appellant,
                                              D.C. No.
                v.                    2:12-cv-02964-KJM-KJN

 CONNIE GIPSON, Warden,
     Respondent-Appellee.                      OPINION



        Appeal from the United States District Court
           for the Eastern District of California
        Kimberly J. Mueller, District Judge, Presiding

             Argued and Submitted June 15, 2018
                  San Francisco, California

                     Filed September 6, 2018

        Before: Mary M. Schroeder, David M. Ebel, *
           and Ronald M. Gould, Circuit Judges.

                     Opinion by Judge Ebel




    *
      The Honorable David M. Ebel, United States Circuit Judge for the
U.S. Court of Appeals for the Tenth Circuit, sitting by designation.
2                     ANDERSON V. GIPSON

                          SUMMARY **


                         Habeas Corpus

    The panel reversed the district court’s denial of
California state prisoner Aaron Anderson’s 28 U.S.C.
§ 2254 habeas corpus petition challenging his conviction for
domestic violence, assault, and vandalism.

    The panel held that the California Court of Appeal’s
decision denying Anderson relief on his claim that the trial
court violated his due process rights by failing to order sua
sponte a competency hearing involved an unreasonable
application of clearly established federal law. The panel
explained that in the face of strong indicia of incompetence,
including a bona fide suicide attempt on the eve of trial, Pate
v. Robinson, 383 U.S. 375, 385 (1966), and its progeny
demand more than explanation; they demand a competency
hearing.

    The panel remanded the case to the district court with
instructions to grant the writ unless, within a reasonable
time, the State grants a new trial; and dismissed as moot
Anderson’s appeal as to claims of error involving his Faretta
waiver and shackling during trial.




    **
       This summary constitutes no part of the opinion of the court. It
has been prepared by court staff for the convenience of the reader.
                    ANDERSON V. GIPSON                       3

                         COUNSEL

Ann Catherine McClintock (argued), Assistant Federal
Defender; Heather E. Williams, Federal Defender; Office of
the Federal Defender, Sacramento, California; for
Petitioner-Appellant.

David Andrew Eldridge (argued) and Justain P. Riley,
Deputy Attorneys General; Michael P. Farrell, Senior
Assistant Attorney General; Xavier Becerra, Attorney
General; Office of the Attorney General, Sacramento,
California; for Respondent-Appellee.


                         OPINION

EBEL, Circuit Judge:

     In 2008, Petitioner Aaron Anderson was convicted of
domestic violence, assault, and vandalism stemming from a
physical quarrel with his on-again, off-again live-in
girlfriend. Pursuant to California’s Three Strikes law,
Anderson was sentenced to fifty-four years to life. After
exhausting his state remedies, Anderson sought a writ of
habeas corpus in federal court, alleging constitutional
violations involving (1) the failure of his trial judge to call
sua sponte for a competency hearing, (2) the failure of the
trial judge to revoke sua sponte his Faretta waiver, and
(3) the trial court’s decision to keep him shackled during
trial.

    The Anti-Terrorism and Effective Death Penalty Act
(“AEDPA”) sets a high bar for a state petitioner seeking to
establish a constitutional violation. Mindful of that bar, we
nonetheless conclude it was error for the state trial judge not
4                     ANDERSON V. GIPSON

to sua sponte order a competency hearing given the
numerous signs of Anderson’s mental incompetency,
including his suicide attempt on the eve of trial.
Accordingly, we REMAND the case to the district court with
instructions to grant the writ unless, within a reasonable
time, the state grants a new trial consistent with this opinion.
Because of our ruling on the competency issue, we need not
address Anderson’s other issues, and we therefore DISMISS
as moot his appeals as to the Faretta and shackling issues.

                       I. BACKGROUND

    The following facts are drawn primarily from the opinion
of the California Court of Appeal in Anderson’s direct
appeal. 1

    In 2007 Mr. Anderson and the victim, his on-again, off-
again girlfriend, attended a wake for Anderson’s nephew.
This wake left Anderson “distraught,” and he drove with his
brother and the victim to the grocery store. When the victim
refused to join the brother and Anderson for a drink,
Anderson “hit her behind her right ear and grabbed the car
keys, heading for the store. As she followed him toward the
store, he struck her again, knocking her down.”

    The victim got up and continued into the store, where she
asked the manager if she could call 911. “After she made
the call, [Anderson] tried to grab the phone out of her hand.
He put his arm around her neck and dragged her backward
about 15 feet before throwing her to the ground.” The victim
got up and climbed back into the car, but Anderson climbed
    1
       See Wilson v. Sellers, 138 S. Ct. 1188, 1192 (2018) (instructing
that federal habeas courts should “look through” unexplained state court
decisions to the “last related state-court decision that does provide a
relevant rationale”).
                   ANDERSON V. GIPSON                      5

in with her. The two drove off, but were intercepted by
police shortly afterwards. Officers took Anderson into
custody, but after he was placed into a police cruiser he
kicked out the cruiser’s window. When police examined the
victim, she had “a two- by one-inch ‘painful’ contusion
behind [her] ear, bruises, and a lump on her head.”

    The incident at the supermarket was caught on the store’s
surveillance cameras. According to the California Court of
Appeal, the video “did not show the victim attacking
[Anderson] in the car,” as Anderson claims, but instead

       it showed him on top of her in the car drawing
       his hand back several times; it showed him
       standing above her as she lay on the ground
       outside the market, moving his arms and legs;
       and it showed him swinging his arms as he
       stood over her in the store after shoving her
       to the ground.

   A. The Initial Proceedings Before State Judge Balonon

    Anderson was charged with inflicting injury on a
cohabitant, assault by means of force likely to inflict great
bodily injury, vandalism, and resisting a peace officer.
Because of prior California convictions, his trial became a
“three strikes case” under California law, greatly enhancing
the penalties Anderson faced. Anderson was set to proceed
to trial on these charges in October of 2007 before The
Honorable Eugene Balonon.

    At the outset of the Balonon proceedings Petitioner’s
counsel indicated that “relations with his client were rocky
but repairable.” The next day, however, Petitioner, who had
been detained awaiting trial, refused to come to court, and
counsel raised concerns about his client’s competency to
6                   ANDERSON V. GIPSON

proceed. ER 68 (“Defense counsel reported that ‘I don’t
think I can raise things to the level of a doubt of his
competency. But I do have some concerns’ about defendant
not presently taking the anti-depressants previously
prescribed for him while in jail[.]”). At this point defense
counsel requested a short continuance to “get an evaluation
of defendant from professionals with whom he was familiar
and who could work quickly[,]” but Judge Balonon and the
prosecutor both expressed concern that doing so would offer
Petitioner an “indication that being difficult would result in
. . . delay of the proceedings.”

     The point became moot, however, when Petitioner
arrived in court in the afternoon. He was wearing his jail
attire, and refused to change into civilian clothes. Given the
opportunity to address Judge Balonon, Petitioner

       asserted that he did not want to be there, that
       he was not mentally prepared, and [that] he
       did not understand what was happening. He
       said that he had stopped taking his
       medication and thought the strain of the
       proceedings might leave him unable to be
       present throughout them. He also had been
       having trouble eating and sleeping.

Despite these statements from the defendant, Judge Balonon
observed that defendant had become emotional during a
colloquy as to the impact of his previous convictions on his
current case and noted that he “believed that defendant was
simply experiencing the ordinary stress of facing trial (rather
than facing an incipient mental breakdown).” Judge
Balonon then stated for the record: “There is nothing that I
can find from my interaction and my observation of Mr.
Anderson that would in any [ ] way . . . indicate that he
                   ANDERSON V. GIPSON                      7

doesn’t know what was going on . . . either today or in the
prior proceedings . . . .”

    At this point the Balonon proceedings moved into voir
dire, and Judge Balonon asked the courtroom bailiff about
the necessity of restraining the defendant in open court.
According to the California Court of Appeal, “[t]he court
concluded it did not find any basis for any restraints.”
Despite that conclusion from the court, Anderson
nonetheless said he wanted to remain in shackles. Judge
Balonon ordered the bailiff to release Petitioner’s ankle
shackles, but keep the belly-chain shackles in place.

    The proceedings continued briefly, before recessing for
the weekend still in the middle of voir dire. When the jury
returned to court on the following trial date, a Monday,
“[Judge Balonon] announced that [he] was continuing the
proceedings in order to evaluate defendant because
[Anderson] had attempted suicide over the weekend.” At
this point the jury panel was dismissed for good cause.

   B. The Proceedings Before State Judge Orr

    After several continuations, including one at which
defense counsel informed the court that he intended to have
outside experts conduct a psychological evaluation of
Petitioner, the case proceeded to trial roughly three months
later before a different judge, The Honorable Joseph Orr. At
this point Petitioner indicated that he wanted to proceed pro
se.

    In doing so, Petitioner “explained that he felt the
outcome of the trial was inevitable and he would rather reach
that result on his own than with someone else representing
him.” After some discussion, Judge Orr told Petitioner that
he “would accept his waiver [of his right to counsel]
8                   ANDERSON V. GIPSON

notwithstanding his refusal to acknowledge that he could not
raise the incompetence of his own trial performance on
appeal.” The trial court also appointed stand-by counsel.
The case then proceeded to voir dire.

    Prior to voir dire, the court also discussed whether
Anderson would be shackled. The bailiff indicated that
defense counsel had asked for the restraints to be removed
but “it doesn’t make any difference to defendant whether or
not he ha[s] restraints on.” The California Court of Appeal
assumed that this comment was a reference to the previous
proceedings when Petitioner had requested to remain in
shackles. This time, however, Anderson “asserted that he did
not pose any threat and voiced objection to the full restraints
that the deputies wanted as a matter of course.” Judge Orr
ruled that Petitioner’s primary shackles would be removed,
but that he would still be chained to his chair. Petitioner
“expressed his satisfaction with this arrangement.”
According to the California Court of Appeal, “the record
does not indicate whether or not there was an adjustment of
the chain in front of the jury,” and “nothing affirmatively
indicates that the jury actually saw the chair chain, nor does
anything indicate that defendant testified in a chair
restraint.”

    That is not to say that the jury was unaware of
Petitioner’s shackles. While one witness was being direct-
examined, Petitioner twice indicated to the court in the
presence of the jury that the chain was too tight. Then,
during jury instructions, Judge Orr instructed the jury to
disregard the fact that “physical restraints have been placed
on Aaron Anderson.” Based on these two statements, even
if the jury were unable to see the shackles, they certainly
were aware of them.
                        ANDERSON V. GIPSON                                 9

     Petitioner—now representing himself—did not
“meaningfully” participate in voir dire. This resulted in an
all-female jury, including one juror who herself had been a
victim of domestic violence and one whose “best friend” had
been the victim of domestic violence. 2

    At the start of trial on the second day, Judge Orr
reminded Petitioner that defense counsel was standing by,
but Petitioner did not respond. While the first witness was
being presented, Petitioner blurted out that he felt
“overwhelmed,” and when it came time to conduct cross-
examination he admitted that he did not know how to cross-
examine a witness. Judge Orr called a recess after that
witness, and Petitioner “confessed that he was legally
inadequate, and was feeling an extreme amount of stress.”
Judge Orr then recessed the trial to the following Monday to
allow time for Petitioner to go to the prison law library and
prepare.

    When the trial reconvened, Petitioner again complained
about his lack of legal knowledge. During the examination
of at least one witness he was silent, even when asked if he
wanted to conduct cross-examination. When the victim took
the stand, Petitioner “repeatedly interrupted the
questioning,” calling the victim names and pleading with her
to tell the truth.

         When the court called the noon recess,
         defendant had an emotional outburst

    2
       Judge Orr allowed the former to sit on the jury after she testified
that she could be impartial because the violence against her had occurred
well in the past, and the latter because she testified that her friend having
been the victim of domestic violence had not “affected [her] in any way.”
Petitioner did not challenge either of these jurors for cause or use his
peremptory challenges on them (or any other jurors).
10                     ANDERSON V. GIPSON

         (apparently directed at the prosecutor) and
         asked to rescind his waiver of counsel. He
         also demanded a mistrial. After the recess,
         defendant apologized for his behavior and
         again requested a mistrial. At the conclusion
         of the afternoon’s proceedings, the court
         granted defendant’s request to revoke his
         waiver of counsel and reappointed defense
         counsel.

    Defense counsel had been on stand-by, but had not been
present during the entire trial.

    The jury ultimately convicted Petitioner on the domestic
violence, assault, and vandalism counts. 3 Based on
California’s Three Strikes law, he was sentenced to fifty-
four years to life in prison with the possibility of parole.

                II. PROCEDURAL HISTORY

    Petitioner raised each of the issues relevant to this appeal
during his direct appeal, but each was rejected by a reasoned
opinion of the California Court of Appeal. The California
Supreme Court denied Petitioner’s petition for certiorari
without comment. Our review, therefore, focuses on the
California Court of Appeal’s reasoning in denying relief on
the three issues presented here. See Wilson v. Sellers, 138 S.
Ct. 1188, 1192 (2018). Petitioner later sought state habeas
review of several issues irrelevant to this appeal, but those



     3
      A mistrial was declared on the basis of a hung jury as to the last
charge, resisting a peace officer, but that determination is not before us
on appeal.
                       ANDERSON V. GIPSON                            11

claims were denied as well without a further reasoned
opinion.

    In 2012, proceeding pro se, Anderson petitioned the
federal district court for habeas relief. In March 2014, a
federal magistrate issued Findings and Recommendations to
deny all relief. Anderson timely objected to those Findings
and Recommendations, and the district court ordered the
State of California to provide some missing records,
including any report filed by any doctor who examined
Petitioner after his suicide attempt and before the trial
resumed in front of Judge Orr. The State filed a declaration
averring that no such report existed, but that it had been in
contact with Petitioner’s trial counsel, who explained that a
doctor had examined Anderson, and that “it was his common
practice with [the psychologist who examined Anderson]
that no written report was made when the results of the
evaluation did not raise concerns about competency. . . .
[The psychologist’s] examination of Petitioner did not raise
doubts about Petitioner’s competency.” 4

    After receiving this declaration and the other requested
documents, the district court issued an order adopting in full
the Findings and Recommendations of the magistrate and
denying habeas relief. The district court also denied a
certificate of appealability. Petitioner timely filed a notice
of appeal, and the Ninth Circuit granted a certificate of
appealability on the following claims: “whether the trial
court violated the appellant’s right to due process by failing

    4
       Petitioner’s trial counsel’s statement was not under oath, nor had
it ever been submitted to any state court nor has it ever been tested by
cross-examination for accuracy or veracity. And we also note that
Anderson denied in his pro se objections to the magistrate’s findings and
recommendations that any such examination ever occurred.
12                  ANDERSON V. GIPSON

to revoke his pro se status, failing to hold a competency
hearing, and allowing him to remain shackled during trial.”
At this point we also granted Petitioner’s motion for
appointment of counsel.

                     III. DISCUSSION

    AEDPA sets forth two circumstances in which a federal
court may grant habeas relief to a state prisoner: (1) if the
state proceedings “resulted in a decision that was contrary
to, or involved an unreasonable application of, clearly
established Federal law, as determined by the Supreme
Court of the United States; or” (2) if those state proceedings
“resulted in a decision that was based on an unreasonable
determination of the facts in light of the evidence presented
in the State court proceeding.” 28 U.S.C. § 2254(d).
Because the first clause can be further bifurcated into two
sets of circumstances, Anderson’s petition must fail unless
he can convince us his state court proceedings resulted in a
decision that (1) was contrary to clearly established federal
law as determined by the Supreme Court, (2) involved an
unreasonable application of clearly established federal law
as determined by the Supreme Court, or (3) was based on an
unreasonable determination of the facts in light of the
evidence presented at his trial. Id. It is the first two of these
§ 2254 sets of circumstances that are involved in the
dispositive issue in this appeal.

    A decision is contrary to clearly established Supreme
Court law if it “applies a rule that contradicts the governing
law set forth in [Supreme Court] cases.” Early v. Packer,
537 U.S. 3, 8 (2002) (internal quotations omitted). While
circuit precedent may be “persuasive” in establishing the
contours of Supreme Court authority, Maxwell v. Roe,
606 F.3d 561, 567 (9th Cir. 2010), it cannot “refine or
sharpen a general principle of Supreme Court jurisprudence
                    ANDERSON V. GIPSON                       13

into a specific legal rule that [the Supreme Court] has not
announced.” Marshall v. Rodgers, 569 U.S. 58, 64 (2013).

    Assuming the state court identifies and applies the
correct legal standard, the second inquiry becomes whether
the state court unreasonably applied clearly established
federal law. This question, however, does not ask whether
the federal court, on direct review, would have reached a
different decision than did the state court, but only whether
the state court “unreasonably” applied the correct legal
principle to the facts of petitioner’s particular case. Williams
v. Taylor, 529 U.S. 362, 407 (2000). “A state court’s
determination that a claim lacks merit precludes federal
habeas relief so long as ‘fairminded jurists could disagree’
on the correctness of the state court’s decision.” Harrington
v. Richter, 562 U.S. 86, 101 (2011) (quoting Yarborough v.
Alvarado, 541 U.S. 652, 664 (2004)).

    Under the Richter standard, our inquiry is designed not
to probe what arguments exist for overturning the state
court’s determinations, but rather whether “‘arguments or
theories . . . could have supported’ the state court’s . . .
decision.” Sexton v. Beaudreaux, 138 S. Ct. 2555, 2560
(2018) (quoting Richter, 562 U.S. at 102). “‘If this standard
is difficult to meet’—and it is—‘that is because it was meant
to be.’” Burt v. Titlow, 571 U.S. 12, 20 (2013) (quoting
Richter, 562 U.S. at 102).

    But while setting a high standard for relief, AEDPA
protects and preserves the critical role federal courts play in
identifying and correcting constitutional errors. Even under
the strict dictates of AEDPA, constitutional infirmity in a
state court conviction does not become immunized against
federal review by virtue of subsequent affirmances in the
state courts of appeals. See Slack v. McDaniel, 529 U.S. 473,
14                  ANDERSON V. GIPSON

483 (2000) (“The writ of habeas corpus plays a vital role in
protecting constitutional rights.”).

    We review the district court’s denial of Anderson’s
petition de novo, Yee v. Duncan, 463 F.3d 893, 897 (9th Cir.
2006), and its factual determinations for clear error, Paulino
v. Harrison, 542 F.3d 692, 698 (9th Cir. 2008).

    “It has long been accepted that a person whose mental
condition is such that he lacks the capacity to understand the
nature and object of the proceedings against him, to consult
with counsel, and to assist in preparing his defense may not
be subjected to a trial.” Drope v. Missouri, 420 U.S. 162,
171 (1975). Furthermore, in some trials, there comes a point
where the defendant’s behavior displays such marked indicia
of incompetence that the trial court violates due process by
not sua sponte suspending proceedings and conducting a
hearing into defendant’s competency to stand trial. See, e.g.,
Drope, 420 U.S. at 180; Pate v. Robinson, 383 U.S. 375, 385
(1966); de Kaplany v. Enomoto, 540 F.2d 975, 979–81 (9th
Cir. 1976). Anderson argues that his erratic behavior during
the course of the judicial proceedings in this case crossed this
line. While the California Court of Appeal apparently
identified the correct standard, its application of that
standard was contrary to clearly established federal law as
determined by the Supreme Court.

    “Where the evidence raises a ‘bona fide doubt’ as to a
defendant’s competence to stand trial, the judge on his own
motion must impanel a jury and conduct a sanity hearing
pursuant to” the relevant state procedures. Pate, 383 U.S. at
385 (emphasis added) (citing People v. Shrake, 182 N.E.2d
754 (Ill. 1962)). Since Pate, courts, including the Ninth
Circuit, have generally adopted the “bona fide doubt”
standard as to when a trial court is required to order a
                       ANDERSON V. GIPSON                              15

competency hearing before proceedings may continue. 5 See,
e.g., de Kaplany, 540 F.2d at 979. A few years later the
Supreme Court explained that the “import” of its decision in
Pate “is that evidence of a defendant’s irrational behavior,
his demeanor at trial, and any prior medical opinion on
competence to stand trial are all relevant in determining
whether further inquiry is required, but that even one of
those factors standing alone may, in some circumstances, be
sufficient.” Drope, 420 U.S. at 180.

    Looking at these factors, Anderson’s case checks two if
not all three of these evidentiary boxes. His behavior was
irrational, especially when he declined to participate in the
voir dire process, resulting in an all-female jury which
included multiple jurors with personal connections to
domestic violence. His demeanor at trial was erratic and
marked by intermittent withdrawal from the proceedings and

    5
        At oral argument the State suggested, based on language from
Drope, that Pate’s “bona fide doubt” standard was too case-specific to
constitute the “clearly established” federal law required by AEDPA. See
Drope, 420 U.S. at 172 (explaining that Pate did not “prescribe a general
standard with respect to the nature or quantum of evidence necessary to
require resort to an adequate procedure”). However not only does the
“bona fide doubt” standard enunciated in Pate accord with the general
evidentiary inquiries outlined in Drope, but Circuit authority can be
“persuasive” in determining the contours of clearly established Supreme
Court law, Maxwell v. Roe, 606 F.3d 561, 567 (9th Cir. 2010), and the
Courts of Appeals have uniformly interpreted Pate and Drope as
outlining a generally applicable “bona fide doubt” standard. See, e.g.,
Austin v. Davis, 876 F.3d 757, 781 (5th Cir. 2017); McManus v. Neal,
779 F.3d 634, 656 (7th Cir. 2015); Johnson v. Singletary, 162 F.3d 630,
634 (11th Cir. 1998); cf. People v. Rogers, 141 P.3d 135, 152 (Cal. 2006)
(citing Cal. Penal Code § 1368) (establishing that under California law
the trial court judge is required to “suspend trial proceedings and conduct
a competency hearing” if he is “presented with substantial evidence of
incompetence, that is, evidence that raises a reasonable or bona fide
doubt concerning the defendant’s competence to stand trial”).
16                  ANDERSON V. GIPSON

profane outbursts. And while there is a dispute over whether
Petitioner received a mental health evaluation between the
Balonon proceedings and the Orr trial, no mental evaluation
was submitted into the state record. At the very least
Anderson’s suicide attempt which aborted the Balonon
proceedings should have left the court insistent on receiving
the results of any such promised mental examination when
the case resumed. Finally, while there was a roughly three-
month gap between the Balonon proceedings and the Orr
trial, there is nothing in the trial court record that suggests
any amelioration of Petitioner’s mental incompetence during
that hiatus.

     Considered holistically, the trial judge was or should
have been aware of the following indicia of incompetence:
(1) Petitioner’s disengagement during voir dire, which
shows he did not have the wherewithal to remain engaged in
the trial, (2) that he permitted a jury of all women, including
one with a personal experience involving domestic violence
and one whose best friend was a victim of domestic violence,
to be empaneled in this case, where he was charged with
domestic violence, (3) that he did not object to shackles
during trial, and even affirmatively requested them during
the Balonon proceedings, (4) his bizarre performance during
trial, including his emotional outbursts, (5) wearing prison
clothes to court one day during the Balonon proceedings, and
refusing to change, (6) refusing to show up in court one
morning during the Balonon proceedings, (7) that
Petitioner’s own attorney expressed concern regarding his
mental competency during the Balonon proceedings, and
(8) his suicide attempt. Taken together, these indicia raise
such a bona fide doubt as to Anderson’s competence to stand
trial that the trial court erred in not sua sponte ordering a
competency hearing before the trial resumed.
                   ANDERSON V. GIPSON                      17

    Regarding whether a mental health evaluation occurred
between Anderson’s suicide attempt and the Orr
proceedings, Anderson maintains that no such examination
ever occurred and there was no state court hearing to resolve
that factual dispute. Further, if there was such an
examination, it was never submitted to Judge Orr nor tested
in any state judicial proceeding. This lack of any
information about any such examination in the trial court
record is fatal to its ability to cure the constitutional
deficiencies at issue.

    The California Court of Appeal dismissed the above-
referenced indicia of incompetence as demonstrating
nothing more than “the expected reaction of an unprepared
layperson thrust into the complexities of the ill-advised role
of self-representation.” It also concluded that those actions,
“far from being substantial evidence of [Anderson’s]
incompetence, demonstrate[] he knew far too well what was
at stake, including his accurate assessment of the likelihood
of his convictions.” This speculation represents only the
impressions of the California Court of Appeal on the basis
of a paper record rather than the contemporaneous
observations of the trial court and a competency hearing
where evidence could be considered and tested. In the face
of strong indicia of incompetence, including a bona fide
suicide attempt on the eve of trial, Pate and its progeny
demand more than such speculation: they demand a
competency hearing.

    Accordingly, we conclude that the California Court of
Appeal’s decision denying Anderson relief on this claim
involved “an unreasonable application” of clearly
established federal law.       In such circumstance the
appropriate remedy is to remand the case to the district court
with instructions to retain jurisdiction and grant the writ
18                  ANDERSON V. GIPSON

unless, within a reasonable time, the State grants Anderson
a new trial consistent with due process. See, e.g., Petrocelli
v. Baker, 869 F.3d 710, 731 (9th Cir. 2017) (“We remand
with instructions to grant the writ . . . unless, within a
reasonable time . . . the State grants a new . . . trial[.]”);
McKinney v. Ryan, 813 F.3d 798, 827 (9th Cir. 2015) (en
banc).

    Because we find error in the state court’s failure to order
a competency hearing, we need not consider Anderson’s
further asserted grounds for relief.

                    IV. CONCLUSION

    The issue before us is not whether Anderson is
competent today, or whether a court—upon review of a stale
record—believes he was competent a decade ago. The
question is whether his behavior at trial, including his suicide
attempt, created a “bona fide doubt” as to his mental
competency. Upon the conclusion that it did, federal
authority is clear: due process required the trial to cease until
a competency hearing had been held. No such competency
hearing was held, and accordingly, Anderson’s due process
rights were violated.

     This case is REVERSED and the case is REMANDED
to the district court with instructions to grant the writ unless,
within a reasonable time, the State grants Anderson a new
trial consistent with due process. Anderson’s further claims
of error involving his Faretta waiver and shackling during
trial are DISMISSED as moot in light of our ruling on the
competency issue.
