                     FOR PUBLICATION
  UNITED STATES COURT OF APPEALS
       FOR THE NINTH CIRCUIT

HUU THANH NGUYEN,                           
              Petitioner-Appellant,
                v.                                 No. 05-56596
SILVIA GARCIA, Warden; EDWARD                       D.C. No.
                                                  CV-03-01385-JVS
S. ALAMEIDA, JR., Director,
Director of Corrections, California                  OPINION
State Department of Corrections,
            Respondents-Appellees.
                                            
         Appeal from the United States District Court
            for the Central District of California
          James V. Selna, District Judge, Presiding

                    Argued and Submitted
            October 24, 2006—Pasadena, California

                      Filed February 9, 2007

   Before: Eugene E. Siler, Jr.,* A. Wallace Tashima, and
              Carlos T. Bea, Circuit Judges.

                       Opinion by Judge Bea




   *The Honorable Eugene E. Siler, Jr., Senior United States Circuit Judge
for the Sixth Circuit, sitting by designation.

                                  1647
1650                   NGUYEN v. GARCIA


                         COUNSEL

Allen Bloom, San Diego, California, for the petitioner-
appellant.

Bill Lockyer, Attorney General of the State of California,
Robert R. Anderson, Chief Assistant Attorney General, Gary
W. Schons, Senior Assistant Attorney General, Kevin Vienna,
Deputy Attorney General, Lise Jacobsen, Deputy Attorney
General, Quisteen S. Shum, Deputy Attorney General, San
Diego, California, for the respondents-appellees.


                          OPINION

BEA, Circuit Judge:

   In Wainwright v. Greenfield, 474 U.S. 284, 295 (1986), the
Supreme Court held that prosecution evidence the defendant
maintained silence after his arrest, offered to show he wasn’t
all that crazy, and to rebut defendant’s insanity defense in the
guilt phase of trial, constituted a violation of due process.
Here, we consider whether Wainwright, or other applicable
federal law, prohibits the prosecutor’s mention that defendant
requested counsel to show he was able to cooperate in his
                       NGUYEN v. GARCIA                     1651
own defense—not at the guilt phase of trial but during a hear-
ing to determine whether the defendant was mentally compe-
tent to stand trial. We conclude that the state court decision
finding Wainwright inapplicable to a state court competency
hearing is not “contrary to” clearly established federal law
and therefore affirm the denial of appellant’s petition for writ
of habeas corpus brought pursuant to 28 U.S.C. § 2254.

                               I.

   In the early morning of November 15, 1997, a fight broke
out at a billiard hall in Stanton, California. The fight contin-
ued in the parking lot of the billiard hall and shots were fired.
Two of the shots fired struck the outer wall of the billiard hall
and one shot pierced the front window and struck an interior
wall. No one was killed or hit, but probably not for lack of
trying. The owner of the billiard hall saw someone firing a
weapon out of the passenger window of a Nissan Maxima.
After hearing the shots, Deputy Albert Macias observed a
beige Nissan Maxima automobile speed away from the bil-
liard hall parking lot. A brief pursuit ended when the Maxima
spun out of control. Appellant Huu Thanh Nguyen
(“Nguyen”) was the sole occupant of the vehicle.

   Deputy Macias ordered Nguyen out of the car and then
handcuffed Nguyen and placed him in the back of the patrol
car. Macias read Nguyen his Miranda rights after arresting
him, and Nguyen responded that he understood each of his
rights. Nguyen then stated he wanted to tell Macias what had
happened. Nguyen told Macias that a friend had fired the
shots. Nguyen stated he drove off to allow his friend to
escape, and that Nguyen had tossed the gun out of his window
because it was not his. After telling Deputy Macias these
details, Nguyen stated he wanted to talk with a lawyer.
Macias stopped his interrogation.

  The gun used to fire the shots was found 30 to 50 feet from
where the Maxima came to rest. Gunshot residue was found
1652                       NGUYEN v. GARCIA
on Nguyen’s left hand, on the interior and exterior of the pas-
senger door, and on the windshield.

   In January 1998, Nguyen was charged with attempted first
degree murder, Cal. Penal Code §§ 187(a), 664, assault with
the personal use of a firearm, id. § 245(a)(2), shooting at an
occupied building, id. § 246, and being a felon in possession
of a firearm, id. § 12021(a)(1).1 He was charged to have com-
mitted the attempted murder willfully, deliberately, and with
premeditation. Before the jury trial, the proceedings in the
criminal prosecution were suspended pursuant to California
Penal Code §§ 1367-69 for a hearing to determine whether
Nguyen was competent to stand trial.2

   The competency hearing was held in March 1999 before a
jury impaneled solely to decide whether Nguyen was compe-
tent to stand trial on the charges lodged against him.3 At this
  1
     Nguyen stood twice convicted, once in 1992 and once in 1993, of fel-
ony burglary offenses. Cal. Penal Code §§ 459-60.
   2
     Under California law,
         [a] person cannot be tried or adjudged to punishment while that
      person is mentally incompetent. A defendant is mentally incom-
      petent for purposes of this chapter if, as a result of mental disor-
      der or developmental disability, the defendant is unable to
      understand the nature of the criminal proceedings or to assist
      counsel in the conduct of a defense in a rational manner.
Cal. Penal Code § 1367(a).
   3
     In California, competency hearings are distinct from the criminal pros-
ecution: “when an order for a hearing into the present mental competence
of the defendant has been issued, all proceedings in the criminal prosecu-
tion shall be suspended until the question of the present mental compe-
tence of the defendant has been determined.” Cal. Penal Code § 1368(c).
If a jury has been impaneled to decide the guilt of the defendant, the jury
is “retained on call” pending resolution of the defendant’s competency
unless such retention would cause “undue hardship.” Id. A separate jury
may be impaneled to determine the sole issue of the defendant’s compe-
tency. See id.§§ 1368(c), 1369(e), (f); People v. Turner, 34 Cal. 4th 406,
424 (2004). Defendant has the burden of proving by a preponderance of
the evidence that he is mentally incompetent. Id. § 1369(f).
   Here, of course, the competency hearing preceded the guilt phase trial;
the composition of the competency jury was totally different from that of
the eventual guilt phase jury.
                          NGUYEN v. GARCIA                         1653
competency hearing, Dr. Paul Blair testified for the defense.
He testified that he had evaluated Nguyen twice, once in Sep-
tember 1992 (at the request of a public defender who was
defending Nguyen for the 1992 burglary charge) and again in
January 1999. Dr. Blair opined that Nguyen “is not competent
to participate in his own defense at this point in time, nor is
he competent to discuss with you in a legitimate, forthright
manner . . . .” During cross examination of Dr. Blair, the pros-
ecutor mentioned Nguyen’s request for an attorney on the
night of the billiard hall shooting:

      Q: Let me ask you this, Dr. Blair. If Mr. Nguyen on
      the day of his arrest in November of 1997 gave a
      police officer a rational, apparently cogent statement,
      even—even a defense to what he was suspected of
      doing, saying he may not have been involved, telling
      him that he didn’t want to speak to him any longer,
      wanted a lawyer, would that mean that he’s compe-
      tent to stand trial today?4

      A: No.

(emphasis added).

   The prosecution’s psychiatric expert, Dr. Kaushal Sharma,
testified about his interview with Nguyen. Sharma explained
that Nguyen described in detail the charges against him and
explained his defenses. Nguyen’s request for an attorney on
the night of the shooting was not mentioned during Sharma’s
testimony. But Sharma testified that Nguyen’s statement that
he understood his Miranda rights demonstrated “mental intact
functioning.”

   Deputy Macias, the arresting officer, testified as to the
arrest, his recitation of the Miranda rights, and Nguyen’s
  4
   There was neither an objection to this question nor a motion to strike
the answer.
1654                   NGUYEN v. GARCIA
acknowledgment of the rights (including his request for an
attorney) and explanation of the events of the crime. Finally,
during closing arguments of the competency hearing, the
prosecution mentioned Nguyen’s acknowledgment of his
Miranda rights as evidence of his competency:

       When [Macias] says, “You have the right to an
    attorney. Do you understand that? One will be
    appointed to you free of charge before speaking to
    me.” “Yes,” he understands that.

       That tends to show circumstantially that he’s
    aware of at least the element that he’s involved in a
    criminal court proceeding. He’s aware of going to
    court, things that he says to the deputy could be used
    against him, he has a right to a lawyer free of charge
    before talking to the sheriff’s deputy. So circumstan-
    tially, that tends to show to a reasonable person he’s
    aware of things.

SER 435-36. Following closing arguments, the jury empan-
eled only for the competency hearing found Nguyen mentally
competent to stand trial.

   On November 16, 1999, a jury composed totally of persons
who had not served on the jury which determined competency
convicted Nguyen of the charged offenses and found true the
allegations that Nguyen had acted willfully, deliberately, and
with premeditation and that he personally used the firearm in
committing the attempted murder. Nguyen makes no assertion
that his invocation of his right to counsel was at all mentioned
during the criminal phase of trial. On January 21, 2000,
Nguyen was sentenced to state prison for 25 years to life pur-
suant to California’s Three Strikes Law.

   Nguyen appealed the judgment, asserting, inter alia, that
his due process rights were violated when his request to talk
to an attorney was used against him during the competency
                          NGUYEN v. GARCIA                          1655
hearing. Nguyen relied on Wainwright v. Greenfield, 474 U.S.
284 (1986) as support for this contention. On direct appeal,
the California Court of Appeal rejected Nguyen’s application
of Wainwright on the ground that evidence of a defendant’s
invocation of Miranda rights as an indicum of competency
during a competency hearing is distinguishable from the use
of post-Miranda silence to overcome a plea of insanity during
the criminal phase of trial. Specifically, the court stated that
whereas the criminal phase of trial involves a penalty—a
potential guilty verdict—a “mental competency hearing does
not involve any penalty . . . .” Therefore, “what applies to a
criminal case does not necessarily apply to a competency pro-
ceeding.” On these grounds, the state appellate court held that
it was not a violation of due process to use Nguyen’s invoca-
tion of his right to counsel as evidence during the competency
hearing. Without comment, the California Supreme Court
denied Nguyen’s petition for review.5

   Nguyen then filed a petition for writ of habeas corpus with
the United States District Court for the Central District of Cal-
ifornia. Nguyen raised only one claim in his petition:
“[Nguyen’s] constitutional right to due process was violated
when his post-Miranda warning invocation of his right to
counsel was admitted, over defense objections,6 as evidence
  5
     California law does not allow the separate appeal of a competency
determination: “A determination of mental competency is a nonappealable
interlocutory ruling and may be reviewed only on an appeal from a final
judgment in the underlying criminal proceeding.” 5 Witkin, California
Criminal Law, Criminal Trial § 716 (3d ed.); see also People v. Mickle,
54 Cal. 3d 140, 180 (1991) (“We conclude that the verdict finding defen-
dant competent is a nonappealable, interlocutory ruling. It may be
reviewed on appeal only from a final judgment in the underlying criminal
proceeding.”).
   6
     The record does not contain any defense objection, much less “objec-
tions,” to the question in answer to which Deputy Macias stated Nguyen
requested an attorney. See supra page 1653-54. However, in view of the
basis of our decision, the case does not turn on whether a claimed eviden-
tiary error was properly preserved below or whether any error meets the
standard for plain error.
1656                     NGUYEN v. GARCIA
of his mental competency at a hearing under California Penal
Code section 1368.”

   The district court adopted its magistrate’s Report, denied
Nguyen’s habeas petition, and dismissed Nguyen’s habeas
petition with prejudice. The district court held the California
Court of Appeal’s decision was not an objectively unreason-
able application of either Wainwright, 474 U.S. 284, or Doyle
v. Ohio, 426 U.S. 610 (1976) (holding that it is a violation of
due process to use a defendant’s invocation of his right to
remain silent to impeach defendant’s testimony at trial, where
such claim of right to remain silent follows a Miranda warn-
ing).

   Here, a certificate of appealability was granted on one
issue: “[w]hether the state court’s decision—that Petitioner
had suffered no violation of his Miranda rights when his invo-
cation of his right to counsel was brought out at his compe-
tency hearing—was contrary to, or an unreasonable
application of, clearly established federal law as determined
by the Supreme Court . . . .”7 Accordingly, Nguyen appeals
the district court’s denial of his federal habeas petition and
claims the state court’s decision holding Wainwright is inap-
plicable to competency hearings is contrary to federal law.
The holding in Wainwright, Nguyen posits, extended Doyle
from silence to the request for an attorney and is not limited
to issues of guilt or non-guilt.

                                  II.

                                  A.

  The district court’s decision to deny Nguyen’s petition for
writ of habeas corpus is reviewed de novo, and its factual
  7
  We note that Nguyen’s Notice of Appeal was timely under Fed. R.
App. P. 4(a)(6) because Nguyen received no notice of the entry of Judg-
ment.
                             NGUYEN v. GARCIA                           1657
findings are reviewed for clear error. Rios v. Garcia, 390 F.3d
1082, 1084 (9th Cir. 2004).

   The Antiterrorism and Effective Death Penalty Act of
1996, Pub. L. No. 104-132, 110 Stat. 1214, (“AEDPA”)
applies to this case because Nguyen’s petition for writ of
habeas corpus was filed after April 24, 1996. Under AEDPA,
habeas relief is proper only if the state court’s adjudication of
the merits of a habeas claim “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.” 28 U.S.C. § 2254(d)(1).8 We will
“defer to the state court’s determination of the federal issues
unless that determination is ‘contrary to, or involved an unrea-
sonable application of, clearly established Federal law.’ ”
Himes v. Thompson, 336 F.3d 848, 852 (9th Cir. 2003) (quot-
ing Lockyer v. Andrade, 538 U.S. 63, 71 (2003)). The relevant
state court decision here is the decision of the California
Court of Appeal, as that is the last reasoned state decision. See
Ylst v. Nunnemaker, 501 U.S. 797, 803 (1991). Only United
States Supreme Court holdings, but not dicta, constitute
“clearly established federal law” for purposes of the AEDPA
deference standard. See Williams v. Taylor, 529 U.S. 362, 412
  8
   AEDPA provides in pertinent part:
      (d) An application for a writ of habeas corpus on behalf of a per-
      son in custody pursuant to the judgment of a State court shall not
      be granted with respect to any claim that was adjudicated on the
      merits in State court proceedings unless the adjudication of the
      claim —
        (1) 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) resulted in a decision that was based on unreasonable
      determination of the facts in light of the evidence presented in the
      State court proceeding.
28 U.S.C. § 2254(d).
1658                       NGUYEN v. GARCIA
(2000); Lambert v. Blodgett, 393 F.3d 943, 974 (9th Cir.
2004) (quoting Lockyer, 538 U.S. at 71-72).

                                     B.

   [1] Because resolution of this case turns on whether the
state court’s decision is contrary to the holdings in Wain-
wright, 474 U.S. 284, and Doyle, 426 U.S. 610, we begin by
examining these holdings.9 First, in Doyle, defendants charged
with selling marijuana testified at trial that they had not sold
marijuana but been set up by law enforcement in an effort to
buy marijuana. Id. at 612-13. To impeach the veracity of the
defendants’ exculpatory story, the prosecutor on cross-
examination questioned each defendant why they had not told
this story at the time of their arrest. Id. at 613-14. On these
facts, the Supreme Court considered whether the prosecutor’s
use of post-Miranda silence to impeach a defendant’s excul-
patory testimony given at trial violates due process. The Court
held that it did and thereby proscribed the use of an arrestee’s
post-Miranda silence to impeach trial testimony: “while it is
  9
    The “contrary to” clause is the correct clause for analysis in this case.
We have explained that a state court decision is contrary to federal law if
the court either “ ‘applies a rule that contradicts the governing law set
forth’ by the Supreme Court or arrives at a different result in a case, that
is ‘materially indistinguishable from a [Supreme Court] decision.’ ” Luna
v. Cambra, 306 F.3d 954, 960 (alteration in the original) (quoting Penry
v. Johnson, 532 U.S. 782, 792 (2001), as amended 311 F.3d 928 (9th Cir.
2002). The state court did not apply the holdings of Wainwright and Doyle
to the facts of Nguyen’s case; rather, it distinguished Wainwright and
Doyle on the basis that errors in those cases occurred during the guilt
phase of a trial, not during a hearing to determine competency to stand
trial. The state court thus found Wainwright and Doyle inapplicable to a
competency hearing. Whether Nguyen is entitled to habeas relief depends
on whether this decision is contrary to federal law. That the district court
applied the “unreasonable application” clause in its analysis is immaterial
to our analysis. Our review of the district court’s decision is de novo, and
we may “affirm on any ground supported by the record, even if it differs
from the rationale of the district court.” Pollard v. White, 119 F.3d 1430,
1433 (9th Cir. 1997).
                       NGUYEN v. GARCIA                        1659
true that the Miranda warnings contain no express assurance
that silence will carry no penalty, such assurance is implicit
to any person who receives the warnings.” Doyle, 426 U.S. at
618; see also United States v. Hale, 422 U.S. 171, 182-83
(1975) (White, J., concurring). Hence, “it would be funda-
mentally unfair and a deprivation of due process to allow the
arrested persons’s silence to be used to impeach an explana-
tion subsequently offered at trial.” Doyle, 426 U.S. at 619.

   [2] Wainwright presented the Court with a variation on the
theme of Doyle. The question in Wainwright was whether
post-Miranda silence could be used as evidence to prove a
defendant’s sanity, following a defendant’s plea of insanity,
during the criminal phase of trial. 474 U.S. at 285. Pursuant
to the state law applicable in Wainwright, “when a defendant
pleads not guilty by reason of insanity and when his evidence
is sufficient to raise a reasonable doubt about his sanity, the
State has the burden of proving sanity beyond a reasonable
doubt.” Id. at 286. If the State were unable to meet this bur-
den, the defendant would be entitled to an acquittal. Id. at 286
n.1 (citing cases). The Court found Doyle analogous:

    The point of the Doyle holding is that it is fundamen-
    tally unfair to promise an arrested person that his
    silence will not be used against him and thereafter to
    breach that promise by using the silence to impeach
    his trial testimony. It is equally unfair to breach that
    promise by using silence to overcome a defendant’s
    plea of insanity. In both situations, the State gives
    warnings to protect constitutional rights and implic-
    itly promises that any exercise of those rights will
    not be penalized. In both situations, the State then
    seeks to make use of the defendant’s exercise of
    those rights in obtaining his conviction. The implicit
    promise, the breach, and the consequent penalty are
    identical in both situations.

Id. at 284-85 (emphasis added). The Court ruled the use of
post-Miranda silence to disprove insanity unfairly penalized
1660                   NGUYEN v. GARCIA
the defendant in contravention of the Due Process Clause of
the Fourteenth Amendment. Id. at 293-95.

   [3] In sum, the due process violations found in these deci-
sions are a result of the fundamental unfairness of the prose-
cution’s use of post-Miranda silence to infer the defendant’s
guilt and thereby aid in persuading a jury to convict. Such use
amounts to “penalizing” the defendant for invocation of their
rights. Compare Doyle, 426 U.S. at 617-18, with Wainwright,
474 U.S. at 295. After all, that the defendant will not be
penalized is implicit in the opening line of the Miranda warn-
ings: “You have the right to remain silent . . . .” See Miranda
v. Arizona, 384 U.S. 436, 444 (1966). It would not be much
of a “right” if its use penalizes the user.

                              C.

  We now consider whether reference to a defendant’s post-
Miranda invocation of his right to counsel during a pretrial
competency hearing causes the same penalty at issue in Wain-
wright and Doyle. A review of the nature of competency hear-
ings demonstrates that the penalty contemplated in
Wainwright and Doyle simply does not occur in the context
of competency hearings.

                               1.

   [4] It has long been a principle of our law that one who
becomes “mad” after committing an offense should not be
tried for the offense “for how can he make his defense?” Wil-
liam Blackstone, 4 Commentaries 24; see also Drope v. Mis-
souri, 420 U.S. 162, 171 (1975) (“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 proceed-
ings against him, to consult with counsel, and to assist in pre-
paring his defense may not be subjected to a trial.”). The
Supreme Court has held that failure “to protect a defendant’s
right not to be tried or convicted while incompetent to stand
                       NGUYEN v. GARCIA                     1661
trial deprives him of his due process right to a fair trial.” Id.
at 172 (citing Pate v. Robinson, 383 U.S. 375, 385 (1966)).

   [5] To protect against the improper trial of mentally incom-
petent defendants, California has established a competency
hearing procedure to determine a defendant’s competency
prior to a criminal trial. See Cal. Penal Code §§ 1367-69. The
goal of the competency hearing is not to examine the defen-
dant’s sanity at the time of the commission of the offense (the
issue in Wainwright); rather, the goal is to determine whether
“the defendant is unable to understand the nature of the crimi-
nal proceedings or to assist counsel in the conduct of a
defense in a rational manner.” Id. § 1367(a); see also Godinez
v. Moran, 509 U.S. 389, 401 n.12 (1993) (“The focus of a
competency hearing is the defendant’s mental capacity; the
question is whether he has the ability to understand the pro-
ceedings.”); People v. Masterson, 8 Cal. 4th 965, 971 (1994)
(“The sole purpose of a competency proceeding is to deter-
mine the defendant’s present mental competence, i.e., whether
the defendant is able to understand the nature of the criminal
proceedings and to assist counsel in a rational manner.”
(emphasis added)). California law “presume[s] that the defen-
dant is mentally competent unless it is proved by a preponder-
ance of the evidence that the defendant is mentally
incompetent.” Cal. Penal Code § 1369(f). The California
Supreme Court explained that “[a]lthough it arises in the con-
text of a criminal trial, a competency hearing is a special pro-
ceeding, governed generally by the rules applicable to civil
proceedings.” People v. Lawley, 27 Cal. 4th 102, 131 (2002).

   [6] The effect of being found competent in no way affects
the determination of the defendant’s guilt; it merely removes
a procedural barrier to the commencement of trial. See Jack-
son v. Indiana, 406 U.S. 715, 739 (1972) (“[C]riminal respon-
sibility at the time of the alleged offenses, however, is a
distinct issue from [one’s] competency to stand trial.”).
Indeed, the Supreme Court has carefully distinguished a pre-
trial competency determination from a guilt/innocence deter-
1662                       NGUYEN v. GARCIA
mination: “In a competency hearing, the ‘emphasis is on [the
defendant’s] capacity to consult with counsel and to compre-
hend the proceedings, and . . . this is by no means the same
test as those which determine criminal responsibility at the
time of the crime.’ ” Medina v. California, 505 U.S. 437, 448
(1992), (alteration and omission in the original) (quoting Pate
v. Robinson, 383 U.S. 375, 388-89 (1966) (Harlan, J., dissent-
ing)). Regarding California’s competency procedure, Califor-
nia state courts have explained:

       The purpose of [a competency hearing] is not to
       determine guilt or innocence. It has no relation to the
       plea of not guilty by reason of insanity. Rather, the
       sole purpose of [the competency hearing] is the
       humanitarian desire to assure that one who is men-
       tally unable to defend himself not be tried upon a
       criminal charge.

Tarantino v. Superior Court, 48 Cal. App. 3d 465, 469
(1975). The effect of being found incompetent is the “suspen-
sion of the criminal trial until such time, if any, that the defen-
dant regains the capacity to participate in his defense and
understand the proceedings against him.” Medina, 505 U.S. at
448; see also Dusky v. United States, 362 U.S. 402, 402-03
(1960) (per curiam). The effect of being found competent is
the continuation of criminal proceedings to the guilt phase of
trial.10
  10
     We acknowledge that using a defendant’s post-Miranda invocation of
the right to counsel to establish competency to stand trial may help to
remove a procedural barrier to trial and eliminates the tactical advantage
of indefinite pretrial delay, during which time witnesses die and evidence
deteriorates. The removal of a procedural barrier to trial and the loss of a
tactical advantage, however, do not raise the same constitutional concern
at issue in Wainwright. One has a constitutional right not to have one’s
silence be used to prove guilt. No one has a constitutional right to stall
trial until evidence is lost and witnesses expire.
  Likewise, the use of a defendant’s invocation of Miranda rights at a
suppression or evidentiary hearing does not raise the same constitutional
                           NGUYEN v. GARCIA                           1663
                                    2.

   [7] Not only are competency hearings entirely distinct in
purpose from the guilt phase of trial, but competency hearings
do not invoke the same concerns of self-incrimination—the
right Miranda is designed to protect—that are relevant during
the guilt and penalty phases of trial. The Fifth Amendment
privilege against self-incrimination exists to prohibit the gov-
ernment from forcing the defendant to talk and then using the
defendant’s own statements to satisfy its burden of establish-
ing guilt. See Oregon v. Elstad, 470 U.S. 298, 304-05 (1985)
(explaining that use of voluntary statements does not violate
the Fifth Amendment); Estelle v. Smith, 451 U.S. 454, 462
(1981). These concerns have no place at a competency hear-
ing.

   [8] In California, the court may order a competency hearing
and compel a defendant to submit to psychiatric evaluation as
part of the competency determination. Cal. Penal Code
§ 1369. Accordingly, California state courts have expressly
held there is no Fifth Amendment right against self incrimina-
tion during competency hearing proceedings so long as state-
ments made during a competency hearing are immune from
later use by the prosecution to establish guilt. Tarantino, 48
Cal. App. 3d at 469-70. Immunity for competency hearing
statements “is necessary to ensure that an accused is not con-
victed by use of his own statements made at a court-

concern at issue in Wainwright. Thus, use of evidence procured in viola-
tion of Miranda warnings has never been barred in such non-jury, non-
guilt phase proceedings. For example, in United States v. Lemon, 550 F.2d
467, 473 (9th Cir. 1977), we held that although “[s]tatements taken in vio-
lation of Miranda may not be used to prove the prosecution’s case at trial,”
such statements “elicited prior to the giving of Miranda warnings may be
used during a motion to suppress to show defendant’s consent to a
search.” We relied on Lemon in United States v. Patterson, 812 F.2d 1188,
1193 (9th Cir. 1987), cert. denied, 485 U.S. 922 (1988), where we held
that statements taken in violation of Miranda may be used in an affidavit
to establish probable cause for a search warrant.
1664                        NGUYEN v. GARCIA
compelled examination. . . . Hence, the rule protects both an
accused’s privilege against self-incrimination and the public
policy of not trying persons who are mentally incompetent.”
People v. Arcega, 32 Cal. 3d 504, 522 (1982).

   This judicially-created immunity is buttressed by the
Supreme Court’s holding in Estelle, 451 U.S. 454. There, in
holding that the Fifth Amendment privilege against self-
incrimination extends to psychiatric examinations that are
later used in the penalty phase of trial,11 the Court declared
that “[t]he essence” of the Fifth Amendment privilege against
self-incrimination “is ‘the requirement that the State which
proposes to convict and punish an individual produce the evi-
dence against him by the independent labor of its officers, not
by the simple, cruel expedient of forcing it from his own
lips.’ ” Id. at 462 (emphasis omitted) (quoting Culombe v.
Connecticut, 367 U.S. 568, 581-82 (1961)). Since neither con-
viction nor punishment are the result of a competency hear-
ing, the rationale underlying Estelle’s holding simply does not
extend to statements used solely at such a hearing.12

   [9] Unlike guilt or punishment, incompetency can rarely be
determined without the participation of the person claimed to
be incompetent. Furthermore, because under California law
the defendant bears the burden to establish incompetence by
a preponderance of the evidence, the use of a defendant’s own
statements during a competency hearing in no way affects the
government’s evidentiary burden. Cal. Penal Code § 1369(f).
  11
      In Estelle, a psychiatrist spoke with the defendant during competency
proceedings to determine whether he was competent to stand trial. Estelle,
451 U.S. at 456-57. Later, during the penalty phase of trial, the psychia-
trist testified against the defendant—on the basis of their discussions dur-
ing the competency hearing—to establish that the defendant posed great
risk to society. Id. at 459-60.
   12
      In dicta, the Court expressed as much in Estelle: “Indeed, if the appli-
cation of [the psychiatrist’s] findings had been confined to [a competency
hearing], no Fifth Amendment issue would have arisen.” Estelle, 451 U.S.
at 465.
                           NGUYEN v. GARCIA                           1665
In short, a defendant seeking to establish incompetence can be
compelled to talk: a defendant may be required to be a wit-
ness to his own competency, if not his own crime.13

   [10] Miranda exists to provide “procedural safeguards
effective to secure the privilege against self-incrimination.”
Miranda v. Arizona, 384 U.S. 436, 444 (1966). The privilege
against self-incrimination, in turn, exists to protect the defen-
dant from being forced to be a witness against himself.
Estelle, 451 U.S. at 462; see also United States v. Patane, 542
U.S. 630, 637 (2004) (noting “that the core protection
afforded by the Self-Incrimination Clause is a prohibition on
compelling a criminal defendant to testify against himself at
trial” in lieu of producing other evidence). We fail to see how
Wainwright and Doyle, which hold that a defendant shall not
be penalized for invoking Miranda rights, should apply to a
hearing at which the Fifth Amendment privilege against self-
incrimination is inapplicable. Here, reference to Nguyen’s
post-arrest invocation at the competency hearing was not used
to satisfy the prosecutorial burden of proof of guilt; it was
used, rather, to show cognition.

                                    III.

  [11] On these bases, we hold that the California Court of
Appeal’s decision not to apply Wainwright and Doyle to
  13
     This conclusion is in line with previous holdings regarding the right
against self-incrimination at analogous pretrial hearings. For example, in
United States v. Mitchell H., 182 F.3d 1034, 1035-36 (9th Cir. 1999), we
held that the privilege against self-incrimination does not apply to a juve-
nile transfer hearing because the hearing is not a criminal hearing, and
statements during the hearing, like statements made during a competency
hearing, cannot be used at a later criminal trial. We noted that “a juvenile
transfer hearing is a close cousin of a competency hearing” because both
hearings “ ‘deal with whether a defendant should be exempted from crimi-
nal prosecution because he falls within a category of persons who, in the
eyes of the law, are not viewed as fully responsible for their acts.’ ” Id.
at 1035 n.3 (quoting United States v. A.R., 38 F.3d 699, 703 (3d. Cir.
1994)).
1666                       NGUYEN v. GARCIA
Nguyen’s competency hearing was not “contrary to” federal
law. The court correctly explained that “the nature of the pro-
ceeding in this case distinguishes it from Wainwright,” and
that “[a] mental competency hearing does not involve any
penalty . . . .”14 Absent a holding by the Supreme Court to
apply the principles of Wainwright and Doyle to competency
hearings, we are bound by the strictures of AEDPA to defer
to the state court’s determination. See Carey v. Musladin, 127
S. Ct. 649, 652-54 (2006).15

   AFFIRMED




  14
      Having determined that the state court’s decision was not contrary to
established federal law, we need not address Nguyen’s contention that ref-
erence to his post-Miranda invocation of his right to counsel during the
competency hearing was not harmless error under Brecht v. Abrahamson,
507 U.S. 619 (1993).
   15
      We reject Nguyen’s contention that Medina v. California, 505 U.S.
437 (1992), extended Wainwright to competency hearings. In Medina, the
sole issue before the Court was whether the Due Process Clause permitted
California to place the burden of establishing incompetence on the defen-
dant. Id. at 439. The Court held that California’s competency determina-
tion framework did not violate due process. Id. at 448-53. Nothing in the
decision suggests the principles of Wainwright and Doyle should apply in
the context of competency hearings.
