                       FOR PUBLICATION

         UNITED STATES COURT OF APPEALS
              FOR THE NINTH CIRCUIT


 YUN HSENG LIAO,                                No. 14-55897
        Petitioner-Appellant,
                                                 D.C. No.
                  v.                     2:10-cv-05691-JGB-JCG

 MAURICE JUNIOUS,
       Respondent-Appellee.                    ORDER AND
                                                OPINION


          Appeal from the United States District Court
              for the Central District of California
           Jesus G. Bernal, District Judge, Presiding

                    Argued and Submitted
            October 23, 2015—Pasadena, California

                        Filed April 1, 2016

      Before: Harry Pregerson and Stephen S. Trott, Circuit
     Judges and William H. Stafford,* Senior District Judge.

                              Order;
                       Opinion by Judge Trott



 *
   The Honorable William H. Stafford, Jr., Senior District Judge for the
U.S. District Court for the Northern District of Florida, sitting by
designation.
2                         LIAO V. JUNIOUS

                           SUMMARY**


                          Habeas Corpus

    The panel (1) withdrew its opinion filed January 29, 2016;
(2) filed a new opinion reversing the district court’s denial of
California state prisoner Yun Hseng Liao’s habeas corpus
petition challenging his conviction for assaulting and
attempting with premeditation to kill his ex-girlfriend’s
teenage son, and remanding; and (3) dismissed as moot the
warden’s petition for rehearing en banc.

    Liao’s unsuccessful defense was that the incident
happened while he was in a state of unconsciousness during
an episode of sleepwalking, and thus, that he lacked the intent
required for the crimes with which he was charged.

    During further proceedings on Liao’s ineffective
assistance claim after newly discovered evidence revealed a
significant lapse on trial counsel’s part, the Superior Court
concluded that trial counsel’s performance had been
constitutionally defective by failing to secure medical
evidence to support Liao’s primary expert’s sleepwalking
opinion, but that counsel’s failure had not been prejudicial.

   The panel concluded (1) that the Superior Court’s
decision that Liao suffered no prejudice was based on an
unreasonable determination of the facts and was objectively
unreasonable in its application of clearly established Federal


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

constitutional law; and (2) that his conviction was an extreme
malfunction of justice.


                        COUNSEL

Dennis A. Fischer (argued) and John M. Bishop, Law office
of Dennis A. Fischer, Santa Monica, California, for
Petitioner-Appellant.

Ryan M. Smith (argued), Deputy Attorney General, Kamala
D. Harris, Attorney General of California, Gerald A. Engler,
Chief Assistant Attorney General, Lance E. Winters, Senior
Assistant Attorney General, and Kenneth C. Bryne,
Supervising Deputy Attorney General, Los Angeles,
California, for Respondent-Appellee.


                          ORDER

    The Opinion filed January 29, 2016, is withdrawn. It may
not be cited as precedent by or to this court or any district
court of the Ninth Circuit.

   The attached Opinion is filed simultaneously with this
Order.

    Appellee Junious’s pending petition for rehearing en banc
is dismissed as moot.

   SO ORDERED.
4                     LIAO V. JUNIOUS

                         OPINION

TROTT, Senior Circuit Judge:

    On June 16, 2003, a jury in the Superior Court of Los
Angeles County, California convicted appellant Yun Liao of
assaulting and attempting with premeditation to kill Henry
Chen, his ex-girlfriend Li’s teenage son. Liao admittedly hit
Chen three times on the head with a hammer at 4:00 a.m
while Chen was asleep. Liao’s unsuccessful defense was that
the incident happened while he was in a state of
unconsciousness during an episode of sleepwalking, and thus,
that he lacked the intent required for the crimes with which he
was charged. The court sentenced him to life in prison with
the possibility of parole, plus four years. Twelve years later,
he has served his time and is out of prison on parole.

    Liao’s appeal as well as his pursuit of state habeas corpus
relief failed, but because of newly discovered evidence
revealing a significant lapse on his trial counsel’s part, the
California Court of Appeal returned his case to the Superior
Court for further proceedings on his claim of ineffectiveness
of counsel. The Court of Appeal ordered the California
Department of Corrections and Rehabilitation to show cause
why Liao’s conviction should not be set aside. After a
hearing, the Superior Court concluded in a decision spoken
from the bench that trial counsel’s performance had indeed
been constitutionally defective by failing to secure medical
evidence to support his primary expert’s sleepwalking
opinion – a conclusion with which the prosecution agreed.
The Superior Court found, however, that counsel’s failure had
not been prejudicial.
                          LIAO V. JUNIOUS                             5

    After unsuccessful attempts in state court to overturn the
Superior Court’s decision, Liao filed a petition for a writ of
habeas corpus in the Central District of California, alleging a
violation of his Sixth Amendment right to effective assistance
of counsel.       In an order accepting the report and
recommendation of a magistrate judge agreeing with the
Superior Court, the district court denied Liao’s petition. He
appeals.

    We have jurisdiction over this timely appeal pursuant to
28 U.S.C. §§ 1291 and 2253. Because we conclude (1) that
the Superior Court’s decision was based on an unreasonable
determination of the facts and objectively unreasonable in its
application of clearly established Federal constitutional law,
and (2) that his conviction was an extreme malfunction of
justice, we reverse.

                                   I

                                Facts1

     At about 4:00 a.m. on August 4, 2002, Henry Chen was
awakened by the sensation of three blows on his head. They
were inflicted by a household hammer, which Chen had left
on the floor of his room. He covered his head with his hands,
and in the dark sought his assailant, whom he pushed to the
ground. Chen then saw that it was Liao, and he asked Liao
what he was doing. Liao did not reply. Chen ran into his
mother Li’s room, passing his younger brother Danny, and
telling her Liao had hit him. She covered his head, and asked


 1
  We borrow these facts without attribution from the California Court of
Appeal’s unpublished decision. People v. Yun Hseng Liao, Second
Appellate District, No. B170596.
6                      LIAO V. JUNIOUS

Liao to call the police. He stated he would go to jail, but after
several requests, he made the call. Li asked Liao why he hit
Chen. After repeatedly saying, “Why did I do it?” Liao
replied that he had been dreaming someone was hitting him,
and he had fought back.

    As Chen walked outside to meet arriving paramedics,
Liao told him to say he had fallen down the stairs, because
otherwise he would go to jail.

    Chen suffered three scalp lacerations, each over an inch
long, which were closed by staples, as well as a cut to his ear.
He also suffered a concussion, and both of his hands were
fractured. He remained at the hospital for about six hours.
The attending physician opined that Chen had received a
series of glancing but direct blows to the head. There was no
skull or brain damage. At the time of trial, Chen still
experienced headaches and dizziness, as well as some pain in
his hands.

    Chen had known Liao for five years, during which time
Liao had been Li’s boyfriend, and had lived with her and her
sons for four years. In that time, Liao had never previously
struck Chen, although, according [to] Chen, he had hit Danny
once, and Li twice (out of Chen’s presence). Liao had shown
no animosity toward Chen, who believed Liao had attacked
him out of anger at Li.

    On the night of the incident, Chen testified that Liao and
Li had had an argument in her room. Li then stopped a fight
between the brothers, and Liao told Chen not to make Li
angry. Before Chen went to bed around midnight, he saw
Liao, smoking a cigarette and staring out the sliding window
by the balcony. Chen testified that Liao smoked when he was
                       LIAO V. JUNIOUS                        7

“stressed.” Danny went to sleep on the living room couch.
When awakened by the blows, Chen, who had been sleeping
face down, threw Liao off, and then saw him. Liao seemed
shocked, and stared at Chen, mouth open. Liao was holding
the hammer, raised, while leaning against a wall about seven
feet from Chen. Chen then asked Liao what he was doing,
and received no reply.

    Danny had gone to sleep about 9:00 p.m. He was
awakened by the sound of three blows, like a hammer striking
a nail. He saw his brother bleeding profusely. Li asked Liao
to call the police. The first time he refused, saying that if he
went to jail this time it would cost him a lot of money to get
out. After a second request he did call, and he accompanied
Li to the hospital.

                              II

                              A.

                      Counsel’s Error

    In preparation for Liao’s trial, his counsel hired Dr. Clete
Kushida, a Director of the Stanford University Center for
Human Research and a board certified physician at Stanford’s
Sleep Disorders Clinic. Dr. Kushida is also on the academic
faculty of the Stanford School of Medicine. After reviewing
the facts and circumstances of Liao’s unusual pre-dawn
behavior, Dr. Kushida recommended that Liao undergo a
medical examination and a “sleep study,” formally known as
polysomnogram.

   Dr. Kushida put his recommendations in a letter dated
April 8, 2003. In the letter, Dr. Kushida said that “further
8                     LIAO V. JUNIOUS

evaluation of Mr. Liao is warranted, with a consideration of
a sleepwalking diagnosis.” The inquiry would include “[a]n
evaluation conducted by a sleep specialist. This would entail
a review of Mr. Liao’s medical history and a physical
evaluation.” Dr. Kushida also recommended “[a]n overnight
polysomnogram (sleep study) conducted by an experienced
polysomnographic technologist, and reviewed by a sleep
specialist . . . an important component of the evaluation of an
individual with a diagnosis of sleepwalking.”

     Because Liao was in custody, counsel filed a request with
the Superior Court for authorization to conduct the
procedures recommended by Dr. Kushida. On April 10,
2003, a court commissioner – not the trial judge – denied the
motion without prejudice. On April 25, 2003 counsel
promptly renewed his motion, supplementing it with a second
letter from Dr. Kushida dated April 22, 2003, reiterating the
necessity of a sleep study. We will discuss the content of this
second letter in more detail in part I B. of this opinion. The
commissioner took the matter under submission. When
counsel’s associate later called the court to inquire about the
status of the request, a court clerk erroneously told him that
the motion had been denied when in fact it had been granted
on May 1, 2003. On the commissioner’s Order, he wrote, “1.
To be completed prior to trial date – 2. Not to exceed $2500,”
followed by his signature. The approving Order, prepared by
counsel and signed by the court commissioner, lay
undiscovered in the court’s file until Liao’s conviction was on
appeal.

    Instead of conducting any further inquiry into the status
of his motion, counsel proceeded to trial without the benefit
of the medical examination and study for which Dr. Kushida
                      LIAO V. JUNIOUS                       9

had asked. During the trial, the absence of a sleep study
turned out to be the Achilles heel of Liao’s defense.

    At all stages of the proceedings, California has conceded
that counsel’s failure to verify what the court clerk told his
associate over the phone amounted to constitutionally
ineffective assistance under Strickland v. Washington,
466 U.S. 668 (1984).

                             B.

                The Effect at Liao’s Trial
             of the Absence of a Sleep Study

    The heart of Liao’s defense was lack of intent caused by
a sleep disorder. The Superior Court correctly articulated the
importance of this issue, saying,

           The evidence in this case centered upon
       the issue of consciousness. If Mr. Liao was,
       in fact, in an unconscious state, under the law,
       he would not be responsible for his act. An
       unconsciousness would preclude an express
       malice or the intent to kill. It would preclude
       deliberation and premeditation because,
       obviously, one cannot formulate an intent to
       kill or deliberate or premeditated [sic] in an
       unconscious state.

    To establish Liao’s sleepwalking / lack of criminal intent
defense, counsel called Dr. Kushida as an expert witness.
When Dr. Kushida took the stand however, he did not have
any of the material referenced in his letter to rely on or to
support his opinion. He testified that because he did not have
10                     LIAO V. JUNIOUS

what he had asked for, a sleep study and physical
examination, he could not diagnose Liao as a sleepwalker,
only render an opinion that he suffered from that condition.

    The absence of this information enabled the prosecutor on
cross-examination to discredit Dr. Kushida’s testimony and
to render his opinion suspect. The prosecutor’s first question
was whether Dr. Kushida had interviewed the defendant. His
answer was no. The second question was whether he had
“conducted any sleep studies of the defendant,” to which Dr.
Kushida gave the same negative answer. The third question
was a statement: “So your opinion is based on – well,
obviously your opinion is not based on anything that the
defendant has told you or anything that you have observed in
studying his sleep patterns, correct?” Answer, “That is
correct.”

    Over and over the prosecutor returned to the absence of
a sleep study and physical examination to support Dr.
Kushida’s testimony—an absence caused by counsel’s error.
On re-cross, she effectively bludgeoned Dr. Kushida with his
second pre-trial letter submitted to the court commissioner in
support of counsel’s motion, using his own words
recommending an examination and a sleep study.

     Q: The Prosecutor         A: Dr. Kushida

        Q Doctor, directing your attention to your
        letter to Mr. Donoghue, or his associate, dated
        April the 22nd. I think you have a copy in
        your hand?

        A Yes, I do.
               LIAO V. JUNIOUS                   11

Q Do you state in that letter that
sleepwalking is suspected in Mr. Liao’s case
because of the following?

A Yes, I do.

Q Okay. Do you also state in that letter that
the above points raise clinical suspicion that
Mr. Liao’s behavior during the episode in
question is compatible with sleepwalking?

A Yes.

Q Okay. Do you also say in that letter that
further evaluation is warranted?

A Yes.

Q Do you continue to explain, specifically
on page 2 of your letter that an overnight
polysonogram [sic], a sleep study, is
warranted to further evaluate Mr. Liao’s
preliminary sleepwalking diagnosis?

A Yes.

Q And then do you give the rationale for a
sleep study in Mr. Liao’s case?

A Yes, I do.

Q And there are three different rationales,
correct?
12                  LIAO V. JUNIOUS

     A Yes.

     Q You also state that it’s – a sleep study is
     an objective test that is used to assess patients
     with sleep disorders, correct?

     A Yes, I do.

     Q And the last sentence you say that in the
     case of Mr. Liao the sleep study is an
     important component in his evaluation for a
     diagnosis of sleepwalking, correct?

     A That is correct.

     ....

     Q During my cross-examination did you say
     that – did you testify that you could not
     conclude that the defendant was a
     sleepwalker, just that he may be a
     sleepwalker?

     A What I said was I could not make an
     official diagnosis because official diagnosis
     depends on actually clinically examining the
     patient.

     Q But you said that it was your opinion that
     he may be a sleepwalker?

     A Yes.
               LIAO V. JUNIOUS                     13

Q Okay. But – and it was also your opinion
that you needed to do a sleep study because it
was important to the diagnosis of him being a
sleepwalker, correct?

A At that time, yes.

....

Q Well, then why did you want to do a sleep
study as you stated in you letter and as I
thought you stated this morning?

A To rule out other potential causes that –
the main reason is that there are things that
can mimic sleepwalking and that is nocturnal
seizures or epilepsy. That’s the first point.
And that can really be confused with
sleepwalking and that’s easily treated by
putting the person on anticonvulsants. That’s
the first point.

    The second point is looking at markers on
the sleep study because there are some
elements on the sleep study that you can find
that are non specific markers, you know, that
indicate that the person might have
sleepwalking. The third reason is to rule out
other sleep disorders such as sleep apnea or
periodic limb movements that can fragment
the sleep and trigger off a sleepwalking
episode. So that’s the reason. It’s more to
look at the etiology of the condition, the cause
of the condition.
14                  LIAO V. JUNIOUS

     ....

     Q And now you are saying that your opinion
     is that he is a sleepwalker, correct?

     A Correct.

     Q That indicates to me that there has been a
     change in opinion since you have been on the
     witness stand from this morning.

     A I would have to go back, look at exactly
     what I said. But it’s my opinion that he is a
     sleepwalker. At that time maybe perhaps I
     was thinking about the actual diagnosis. And
     just to reiterate, to actually make a diagnosis,
     I would have to actually evaluate the patient.
     If you were to ask me what my opinion is, my
     opinion is he is a sleepwalker.

     ....

     The Court: Doctor, tell us the difference
     between your opinion and a medical
     diagnosis.

     The Witness: Yes. For medical diagnosis I
     would actually have to see the patient, and,
     you know, lay hands on the patient, physically
     examine the patient. In terms of an opinion,
     it’s based on material that I acquired about the
     patient to actually make my opinion regarding
     diagnosis. But I can’t actually say the word I
     diagnose this patient as having a condition
                      LIAO V. JUNIOUS                      15

       without actually talking with the patient. But
       to clarify, you know, based on the material
       that I have received, you know, it is my
       opinion that he is a sleepwalker. It’s just that
       I can’t actually say I diagnosed the patient as
       being a sleepwalker because I haven’t actually
       physically evaluated the patient.

                             C.

                          Rebuttal

    In rebuttal to Dr. Kushida’s vulnerable opinion testimony,
the prosecution called Dr. Kaushal Sharma, a physician board
certified in psychiatry. Dr. Sharma’s expertise was in
applying “knowledge and information about a suspected
sleepwalker to the forensic issue.” He admitted he had “not
run any sleep lab, therefore I would not call myself
exclusively an expert in the field of sleepwalking.” The
prosecution used Dr. Sharma to counter Dr. Kushida’s
opinion. She did, using the absence of a sleep study as her
weapon.

   Q: Prosecutor           A: Dr. Sharma

       A I was given the task of looking over the
       documents you described and helping,
       initially, understanding a little bit more about
       the sleep disorders including sleepwalking.
       And I was given the task of looking at the
       report or letters of two of my professional
       colleagues and seeing if medically what they
       had described based on the information they
       had and whatever else they may have done
16                  LIAO V. JUNIOUS

     was the diagnosis consistent with the
     information they had, and to tell you if I
     agreed, in what aspect, and if I did not, in
     what aspect.

     Q And did – in that process have you also
     formed your own opinion with regard to the
     defendant’s mental status?

     A Yes.

     Q Let me just directly jump into whether or
     not you believe the defendant is a sleepwalker
     or has sleep disorders.

     A Sleep disorders range from having
     difficulty falling asleep. He may have that
     problem in the jail. I don’t know for a fact.
     But specifically about sleepwalking I believe
     the information given to me is insufficient to
     prove that he suffers from sleepwalking
     disorder.

     Q And any information – well, why is that?

     A Any confirm ed di agnosis of
     somnambulism, s-o-m-n-a-b-u-l-i-s-m [sic],
     which is just the fancy term for sleepwalking,
     requires that the person be subjected to sleep
     lab tests where electrodes are placed on the
     person’s brain and the brain’s activity, as well
     as the activity of the eyes, because they move
     at a rapid pace in certain phases of the sleep,
     is detected. And then it’s seen if the person is
                 LIAO V. JUNIOUS                      17

   doing activity which is inconsistent with the
   normal average sleep.

       To the best of my knowledge the
   defendant in this case was not given any such
   sleep lab test. So that’s the one problem I
   have and therefore I believe that there is
   insufficient data.

On cross-examination, Dr. Sharma stuck to his guns.

Q: Defense Attorney      A: Dr. Sharma

   Q Now your opinion there is insufficient
   information to determine a diagnosis whether
   or not the defendant suffered from
   sleepwalking. Is – what about as to an
   opinion, a medical opinion as compared to a
   medical diagnosis, is there a difference?

   A Well, diagnosis – well, in many ways they
   are. In the context, they are the same.
   Diagnosis is an opinion.

   Q Then are all opinions diagnoses?

   A No, they are not.

   Q So there is a difference?

   A Yes.
18                   LIAO V. JUNIOUS

       Q So it’s possible for a doctor to reach – to
       form an opinion without yet having a
       diagnosis, is that correct?

       A Sure. A doctor may have opinion that
       there is no diagnosis.

       Q Is it your opinion that a – it’s your
       opinion, I believe you testified, that a
       diagnosis requires that the person be subjected
       to a sleep lab test, correct?

       A In this context, yes.

                             D.

                     Jury Argument

    Having set up her summation with the precision of a
surgeon, the prosecutor belittled and mocked Dr. Kushida’s
testimony when she addressed the jurors in final argument.

       (Prosecutor) Dr. Kushida’s opinion, we have
       three different things with Dr. Kushida. I
       couldn’t believe the way he testified on the
       stand, frankly, ladies and gentlemen. He says
       that in his letters to the defense attorney
       sleepwalking is suspected, you know, et
       cetera, et cetera. This raises a clinical
       suspicion. But the sleep study is very
       important. The sleep study is very important.

           Then when he comes to the stand and he
       testifies in court he starts out and he says,
               LIAO V. JUNIOUS                     19

yeah, the defendant may be a sleepwalker.
But I mean [sic] need to do the sleep study in
order to diagnose him or in order to say that
he is a sleepwalker. This happened in direct
examination, in my cross-examination. But
when we come to the defendant’s or the
defense attorney’s redirect examination, what
does he say, he changes his testimony, right
here in front of us, in front our eyes. He says
the defendant is a sleepwalker. Oh, yeah,
with medical certainty. That means a doctor’s
guarantee, a stamp of medical approval. How
can you tell me that’s not a diagnosis. He
says with medical certainty. And sleep study
is not required contrary to what he said. Then
– and then let’s look – so, you know, these are
the doctors the defense is putting up and
asking you to be convinced.              That’s
unreasonable, ladies and gentlemen. These
doctors have changed their testimony.

    With regard to Dr. Sharma’s opinion, Dr.
Sharma is the only consistent doctor. His
duty was to review Dr. Kushida’s’s [sic]
opinions and letters, review Dr. Vicary’s
opinions and letters and his findings in that 8-
page report, review the preliminary hearing
transcript, the police reports, the evidence, so
on so forth, and tell us whether or not he
thought – whether or not he agreed with them.
And that was a major risk on my part because
he could have agreed with him. But you
know what, it defies these two doctors, defies
common sense. And Dr. Sharma told us that.
20                    LIAO V. JUNIOUS

       He said there is insufficient evidence that the
       defendant is a sleepwalker. He was very – I
       think very professional about that. He could
       have said, you know, there is no evidence that
       the defendant is a sleepwalker or I don’t think
       the defendant is a sleepwalker for X, Y, and Z
       reasons. But he tells us there is insufficient
       evidence. Why? Because there was no sleep
       study that was done, which is important.

(Emphasis added.)

                             III

                      The Sleep Study

    On remand, the parties litigated in the Superior Court the
effect of Liao’s trial counsel’s failure to secure an
examination of his client and a sleep study. Before the
evidentiary hearing, Liao finally received his sleep study,
conducted in two phases by Dr. Milton Erman, a
distinguished fellow of both the American Psychiatric
Association and the American Academy of Sleep Medicine.
Dr. Erman completed his psychiatric residency in Boston at
Massachusetts General Hospital and a four-year fellowship at
Harvard Medical School before going on to practice his
specialty. In arriving at his diagnosis regarding Liao, Dr.
Erman consulted an expert from Stanford, Dr. Guilleminault.
Dr. Guilleminault is a world-renowned specialist in sleep
disorders who has created a proprietary computer scoring
technique called “power spectral analysis” which analyzes
objective data obtained from a patient during sleep studies.
                      LIAO V. JUNIOUS                     21

    Based on the objective and subjective data collected
during this detailed process, the doctors diagnosed Liao as a
somnambulist, or a sleepwalker. They supported their
collective opinion with their findings of sleep apnea, low
sleep efficiency, stress and turmoil leading up to the event,
E.E.G. results, a sleep hypnogram, significant nocturnal
oxygen desaturations, and abrupt arousals from sleep caused
by a lack of oxygen, all information Dr. Kushida did not
have. Arousals from sleep result when the brain realizes that
a person is not breathing. Sleep apnea arousals can produce
sleepwalking. Dr. Erman’s explanation was as follows:

       But let me clarify one of the things I am not
       sure we actually stated very clearly and that is
       the relationship between sleep apnea and the
       capacity to provoke arousal events that may
       lead to an episode of sleepwalking.

            When someone is experiencing a sleep
       apnea event, they are suffocating. The airway
       is closed off. The oxygen level is falling. The
       levels of carbon dioxide in the body are rising,
       and it is a stressor that typically will lead to
       something very much like a classic fight-or-
       flight response. So when the body recognizes
       the body and brain recognizes this event is
       going on after amorphizing a little bit, but the
       event is ended by an arousal. If we don’t
       arouse, we die. And that’s why people who
       are on sedative medications or alcohol may
       die from sleep apnea. This arousal is very
       much akin to somebody poking with a stick.
       This is the analogy I often use for patients
       which explains why people with sleep apnea
22                     LIAO V. JUNIOUS

        are so tired because awakening repetitively
        during the night.

            The sleep apnea event can be a trigger in
        susceptible individuals for these episodes of
        sleepwalking. So the relevancy here as well is
        that not only would it contribute to the sleep
        deprivation that would increase the risk of the
        apnea – of the sleepwalking event, it could
        also serve as the specific trigger that would
        cause the sleepwalking event.

    Dr. Erman also testified that Liao’s behavior on the night
of the assault was consistent with not having been a “focused
assault that leads to injuries that might have been expected
had there been an intent to really seriously injure or kill, that
there was amnesia and confusion following the episode.”

    Dr. Erman was appropriately skeptical of Liao’s
description of the events. To ensure that Liao was not
manufacturing a self-serving version of what happened on the
night in question, Dr. Erman gave him an occasion to do so,
but Liao stuck to his story:

        (Dr. Erman) I actually gave him the
        opportunity to embellish on the story because
        to satisfy myself that this was an accurate
        history that would be consistent with a non-
        rem arousal disorder, I wanted to see whether
        given the opportunity to embellish the report
        to provide with more detail were there
        monsters, were there dragons; and he didn’t
        provide that, which to me was consistent with
        the history and also consistent with his giving
                       LIAO V. JUNIOUS                       23

       the truthful account and not really providing
       me with more gory details even when I gave
       him the opportunity and suggested perhaps
       those might have been present.

                              IV

                    Standard of Review

    Although we review de novo a district court’s decision to
grant or to deny a 28 U.S.C. § 2254 habeas petition, our
review of a state court decision is quite deferential. In this
respect, we accept and assiduously apply the Warden’s
statement of our demanding standard of review.

    As amended by the Antiterrorism and Effective Death
Penalty Act of 1996 (AEDPA), 28 U.S.C. § 2254(d)
constitutes a “threshold restriction,” Renico v. Lett, 559 U.S.
766, 773 n.1 (2010), on federal habeas corpus relief as to state
prisoners that “bars relitigation of any claim ‘adjudicated on
the merits’ in state court” unless the claim meets one of the
statute’s two exceptions. Harrington v. Richter, 562 U.S. 86,
98 (2011). Under those exceptions, relief may be available if
the state court decision was (1) “contrary to, or involved an
unreasonable application of, clearly established Federal law,
as determined by the Supreme Court of the United States,” or
(2) “based on an unreasonable determination of the facts in
light of the evidence presented in the State court proceeding.”
Id. (quoting 28 U.S.C. § 2254(d)). Only if a petitioner can
survive this threshold review as to claims previously rejected
on their merits by a state court is a federal court permitted to
reach the merits of a petitioner’s claims, reviewing them de
novo. See Panetti v. Quarterman, 551 U.S. 930, 953 (2007)
(“When a state court’s adjudication of a claim is dependent
24                    LIAO V. JUNIOUS

on an antecedent unreasonable application of federal law, the
requirement set forth in § 2254(d)(1) is satisfied. A federal
court must then resolve the claim without the deference
AEDPA otherwise requires.”); see also Howard v. Clark,
608 F.3d 563, 571–72 (9th Cir. 2010); Frantz v. Hazey,
533 F.3d 724, 735–36 (9th Cir. 2008) (en banc).

    A state court decision is “contrary to” federal law only if
it “applies a rule that contradicts the governing law” as set
forth in Supreme Court opinions, or reaches a different
decision from a Supreme Court opinion when confronted with
materially indistinguishable facts. Williams v. Taylor,
529 U.S. 362, 405–06 (2000). A state court engages in an
“unreasonable application” of federal law if it identifies the
correct governing legal principle from the Supreme Court’s
decisions but unreasonably applies it to the facts of the
prisoner’s case. Id. at 413.

    The inquiry under 28 U.S.C. § 2254(d)(1) is sharply
circumscribed. First, “clearly established federal law” is
limited to Supreme Court authority that “squarely addresses”
the claim at issue and provides a “clear answer.” Wright v.
Van Patten, 552 U.S. 120, 125–26 (2008); see also Lopez v.
Smith, 135 S. Ct. 1, 5–6 (2014) (per curiam) (grant of habeas
relief reversed where court relied heavily on circuit decisions
and the Supreme Court had failed to address the specific
question presented by that case); Marshall v. Rodgers, 133 S.
Ct. 1446, 1450–51 (2013) (federal habeas court may “look to
circuit precedent to ascertain whether [a federal appellate
court] has already held that the particular point in issue is
clearly established by Supreme Court precedent,” but may not
use lower court authority “to refine or sharpen a general
principle of Supreme Court jurisprudence into a specific legal
rule” or “to determine whether a particular rule of law is so
                       LIAO V. JUNIOUS                       25

widely accepted among the Federal Circuits that it would, if
presented to [the Supreme] Court, be accepted as correct”);
Premo v. Moore, 562 U.S. 115, 127–28 (2011); Knowles v.
Mirzayance, 556 U.S. 111, 121–22 (2009); Carey v.
Musladin, 549 U.S. 70, 77 (2006). And, in light of the record
before the state court and the clearly established Supreme
Court precedent, the state court decision must have been
“objectively unreasonable,” and not merely incorrect in the
view of the federal court. Lett, 559 U.S. at 773; Richter,
562 U.S. at 101–02; see also Felkner v. Jackson, 562 U.S.
594, 597–98 (2011) (per curiam). “[E]ven a strong case for
relief does not mean the state court’s contrary conclusion was
unreasonable.” Richter, 562 U.S. at 102.

      The standard set forth in § 2254(d) is “difficult to meet
. . . because it was meant to be.” Id.; see also Burt v. Titlow,
134 S. Ct. 10, 15–16 (2013) (“Recognizing the duty and
ability of our state-court colleagues to adjudicate claims of
constitutional wrong, AEDPA erects a formidable barrier to
federal habeas relief for prisoners whose claims have been
adjudicated in state court.”). It “reflects the view that habeas
corpus is a guard against extreme malfunctions in the state
criminal justice systems, not a substitute for ordinary error
correction through appeal.” Richter, 562 U.S. at 102–03. To
that end, it precludes review of any claims previously rejected
on their merits by a state court except in the narrow category
of cases “where there is no possibility fairminded jurists
could disagree that the state court’s decision conflicts with
[the Supreme] Court’s precedents.” Id. at 102. Accordingly,
to overcome the bar of § 2254(d), a petitioner is required to
show at the threshold that “the state court’s ruling on the
claim being presented in federal court was so lacking in
justification that there was an error well understood and
comprehended in existing law beyond any possibility for
26                     LIAO V. JUNIOUS

fairminded disagreement.” Id. at 103; see also Titlow, 134 S.
Ct. at 16 (“We will not lightly conclude that a State’s
criminal justice system has experienced the ‘extreme
malfunction’ for which federal habeas relief is the remedy.”)
(quoting Richter, 562 U.S. at 102) (alteration omitted);
Johnson v. Williams, 133 S. Ct. 1088, 1091, 1094 (2013)
(standard of § 2254(d) is “difficult to meet” and “sharply
limits the circumstances in which a federal court may issue a
writ of habeas corpus to a state prisoner whose claim was
‘adjudicated on the merits in State court proceedings’”)
(quoting 28 U.S.C. § 2254(d)).

     Moreover,

        [i]n a proceeding instituted by an application
        for a writ of habeas corpus by a person in
        custody pursuant to the judgment of a State
        court, a determination of a factual issue made
        by a State court shall be presumed to be
        correct. The applicant shall have the burden
        of rebutting the presumption of correctness by
        clear and convincing evidence.

28 U.S.C. § 2254(e)(1).

    As for whether or not Liao suffered prejudice because of
counsel’s error, our first task therefore is to determine
whether the Superior Court’s application of the prejudice
prong of Strickland as measured under § 2254(d) “was so
lacking in justification that there was an error well understood
and comprehended in existing law beyond any possibility for
fairminded disagreement.” Richter, 562 U.S. 86 at 103.
Specifically, does the Superior Court’s conclusion that there
was not a reasonable probability that the missing evidence
                       LIAO V. JUNIOUS                        27

would have resulted in a different result in Liao’s trial survive
this rigorous test?

                                V

                           Analysis

    We begin our evaluation with the State’s admission
during oral argument of the obvious: Liao was unmistakably
prejudiced during his trial by the absence of both a sleep
study and the additional information sought by Dr. Kushida.
Counsel for the Warden agreed (1) that Dr. Kushida was
“clobbered” on cross-examination, (2) that “his credibility
was pretty much destroyed,” and (3) that Liao thereby
suffered prejudice during the trial in connection with the core
of his defense. We quote Deputy Attorney General Ryan
Smith’s answers to our questions.

        Judge Pregerson: [Dr. Kushida’s] credibility
                         was pretty much destroyed
                         by the cross examination.

        Mr. Smith:      Yes, sir. . . .

        Judge Trott:    She [the prosecutor] used the
                        absence [of a sleep study] to
                        clobber the expert witness [Dr.
                        Kushida] . . .

        Mr. Smith:      Correct.

        Judge Trott:    Clobbered him.
28                    LIAO V. JUNIOUS

       Mr. Smith:      Correct. The point would be
                       that still that the evidence of a
                       sleep study, which is what we
                       are looking at here, whether
                       the absence of that prejudiced
                       the petitioner in this case.

       Judge Trott:    It did in the trial.

       Mr. Smith:      It did in the trial because it
                       was absent then, but now
                       looking back [it did not].

       Judge Trott:    If we look at the trial it did
                       prejudice Liao.

       Mr. Smith:      Correct, but now that we know
                       what it is, it would not have
                       helped him.

Dr. Sharma’s rebuttal and the prosecutor’s summation prove
the incontestable validity of counsel’s concession regarding
the immediate effect of counsel’s error on the trial. What was
the fatal flaw according to Dr. Sharma? The lack of a sleep
study.

    Then, the prosecutor vouched for Dr. Sharma’s testimony
in her summation to the jury, saying,

       [Dr. Sharma] was very – I think he was very
       professional about that. He could have said,
       you know, there is no evidence that the
       defendant is a sleepwalker or I don’t think the
       defendant is a sleepwalker for X, Y, and Z
                       LIAO V. JUNIOUS                        29

        reasons. But he tells us there is insufficient
        evidence. Why? Because there was no sleep
        study that was done.

(Emphasis added.)

Why was there insufficient evidence to support Dr. Kushida’s
opinion and therefore Liao’s defense? Because of counsel’s
pre-trial error.

    However, the warden’s counsel now describes Dr.
Erman’s sleep study as discrediting Dr. Kushida, not at all
supporting his opinion. Counsel argues that had this sleep
study been available during the trial, it would not have helped
Liao – to the contrary. Therefore, he argues Liao suffered no
prejudice.

        Judge Trott:    Is it your point now . . . that
                        the sleep studies themselves
                        would have been used to
                        destroy Dr. Kushida?

        Mr. Smith:      Yes, that’s absolutely correct,
                        your honor.

        Judge Trott:    That’s your point?

        Mr. Smith:      Yes, your Honor.

    This counterintuitive argument, which is based on an
outlandish portrayal of Dr. Erman’s testimony, was not
articulated in the State’s responsive brief. It appears to have
been manufactured for oral argument. In fact, the State’s
argument in its brief is inconsistent with what it asserted to us
30                    LIAO V. JUNIOUS

during oral argument. In its brief, the State says that because
“Dr. Kushida’s opinion was the same as Dr. Erman’s . . . ,”
Dr. Erman’s testimony was merely “cumulative” (emphasis
added). This is the same mistake made by the magistrate
judge, which we discuss in Section VII of this opinion.
Moreover, the State contradicts itself. Merely cumulative
information can hardly contradict the “same” information
from another source.

    The State’s new argument is not only unconvincing, but
it is patently irreconcilable with and contradicted by the
record. Doctor Erman’s detailed testimony as quoted earlier
speaks for itself. Dr. Erman and Dr. Guilleminault looked at
the objective measurable results of the sleep study and
concluded that Liao was a sleepwalker. Their joint diagnosis
would not only have corroborated Dr. Kushida’s opinion, but
it was largely predicated on objective criteria that amounted
to direct medical evidence strongly tending to prove the
validity of Liao’s defense. This evidence was not just
corroborative, and certainly more than cumulative. It was
direct essential evidence of Liao’s asserted unconscious state
during the attack. It is inconceivable that the results of Dr.
Erman’s sleep study and testimony would have impeached
Dr. Kushida. Any argument to the contrary defies reason.
Moreover, if counsel had Dr. Erman’s and Dr.
Guilleminault’s testimony available at Liao’s trial, we firmly
believe that they would have likely been called as witnesses
before Dr. Kushida took the stand. Why? Because they had
what Dr. Kushida lacked: The objective results of a sleep
study.

   The argument that the sleep study actually damaged Dr.
Kushida’s testimony is spurious to the point of being absurd.
To call this argument “unreasonable” is to be charitable. We
                       LIAO V. JUNIOUS                       31

hesitate to be blunt, but AEDPA’s standard of review
demands more than polite disagreement. So be it. The
State’s claim that the prosecutor could have called Dr. Erman
as a witness to destroy Dr. Kushida is fatuous.

    The Superior Court’s fact-driven finding that Liao
suffered no prejudice evinces additional consequential errors
which highlight the unreasonableness of its decision.

    First, the court failed in its decision to acknowledge Dr.
Erman and Dr. Guilleminault’s sleepwalking diagnosis and
the objective evidence supporting it. Instead, the court
focused out of context on bits and pieces of Dr. Erman’s
testimony which the court regarded as diluting his diagnosis.
In so doing, the court omitted Dr. Erman’s explanation of
why these fragments did not erode his diagnosis. We can
only conclude that in considering Dr. Erman’s testimony, the
Superior Court did not recognize its full force and
importance.

    Second, the court opined that the lay evidence of Liao’s
sleepwalking offered during the trial by his relatives, plus Dr.
Kushida’s belittled opinion, were sufficient to establish
Liao’s defense, making Dr. Erman’s evidence essentially
unnecessary. Equating lay testimony on a medical subject
with the testimony of two qualified doctors makes no sense,
none. One doubts that there is a lawyer alive who, with
doctors available to prove a medical condition, would use lay
witnesses instead, especially in a criminal trial where a
defendant needs only a reasonable doubt to prevail. Indeed,
the prosecutor pointed out not only the weaknesses in Liao’s
relatives’ testimonies, but that they were biased in his favor.
She told the jury, “These women have biases. But, you know,
what doesn’t have a bias is the evidence.” We agree, the
32                    LIAO V. JUNIOUS

sleep study also would have had no bias. The Superior Court
may have been impressed with the relatives’ testimonies of
sleepwalking, but the prosecutor certainly was not. Neither
was the jury.

    Third, the Superior Court inexplicably minimized the
devastating effect of the absence of a sleep study on Dr.
Kushida’s testimony, referencing instead Dr. Kushida’s
defensive claim that a sleep study was optional. The court
said, “The fact that Dr. Kushida was aggressively cross-
examined is not a basis to grant a second opportunity to
present its case but is something that happens in the search
for truth.” Liao doesn’t complain about aggressive cross-
examination per se, but that his counsel’s error made the
cross-examination brutally effective – as Dr. Sharma’s
rebuttal testimony undeniably demonstrates. We note that
without a study, Dr. Kushida was left with only an opinion,
not a diagnosis. Dr. Erman came forth with a diagnosis.
Moreover, the Superior Court did not even mention Dr.
Guilleminault, identified as the leading expert in his field.

      Fourth, the Superior Court discredited the sleep study
because it did not produce an episode of actual sleepwalking
on Liao’s part. The court said, “Obviously, if the sleep study
had noted a full episode of sleepwalking, there would be no
question that the outcome probably would have been
different.” This comment and expectation ignored what Dr.
Kushida said in his April 8, 2003 letter to the court about
what the study might show: “However, it is very unlikely to
capture an actual sleepwalking episode by polysomnography
. . . .”

     Dr. Erman agreed with Dr Kushida.
                      LIAO V. JUNIOUS                     33

       (Dr. Erman) [W]e typically don’t expect to
       see the full episodes of arousal in patients
       with good histories of these arousal disorders
       when they’re in the lab. It’s very often as if
       part of the brain is functioning to – to keep an
       eye out on what is going on in these new
       surroundings. When you add into that the
       circumstances of someone who’s been
       incarcerated who knows guards are outside
       the room and who is shackled, the expectation
       would be that this would lighten fragment
       sleep; and we did see this, the sleep
       efficiencies for the two studies we did were
       both in the low range and 60% range. We
       would ordinarily expect that to be in the high
       80’s [sic] to low 90’s [sic].

The court simply discounted this unimpeached evidence and
improperly substituted its flawed understanding of the
expected results of a sleep study for those of qualified
doctors.

    Fifth, in discussing the facts surrounding the early
morning attack, the court highlighted only those that might
prove Liao was conscious and aware of what he was doing,
omitting those that did not. From these selected facts, the
court concluded that in comparison to the defense, the
prosecutor’s case was strong. What the court did not discuss
were those contemporaneous facts offered by Henry Chen
and his mother that strongly implied that Liao was not aware
of what he was doing. As indicated in Part I of this opinion,
those facts are:
34                     LIAO V. JUNIOUS

     1) At midnight, just four hours before the attack, Li’s
        sons Henry and Danny got into a fight. Liao helped
        Li separate them, and when Li started to punish them,
        Liao intervened on their behalf and asked her not to
        do so.

     2) Within seconds of the attack, when Chen asked Liao
        what he was doing, Liao did not reply. Liao appeared
        to be in shock.

        Q What do you mean by that, he seemed to
          be shocked?

        A (Henry Chen) Like open his mouth and
        just looking at me.

        Q Sorry? Open mouth, and what else?

        A (Henry Chen) And staring at me.

     3) When Li asked Liao immediately after the attack why
        he hit Chen, Liao repeatedly said, “Why did I do it?”
        His answer was that he had a dream someone was
        hitting him and he was fighting back.

     4) Immediately after the attack, Liao assisted Li to tend
        to her son’s wounds.

        Q What was [Liao] doing?

        A (Li) Nothing. Walking back and forth.
          And also he was calling 911.

        ....
                      LIAO V. JUNIOUS                      35

       Q Was he helping you and your son that
         evening?

       A Yes.

       Q And how was he helping you and your
         son?

       A He asked me to examine my son’s injury
         and to put something over the injury to
         stop the bleeding.

       Q Did he seem concerned about your son
         and his injury?

       ....

       A Yes. He was trembling all over at seeing
         my son’s bleeding.

   5) Liao did not flee, he called the police and
      accompanied Li and Chen to the hospital.

In other words, Dr. Erman and Dr. Guilleminault’s diagnosis
would not have existed in a vacuum, but would have served
to explain and to interpret Liao’s behavior that was not
consistent with trying to murder Li’s son with premeditation.

    We are acutely aware that the Superior Court need not
have referred to or addressed in its statement of decision all
the facts weighing on this issue. But in this case, the facts
omitted from the court’s discussion are so glaring and
essential to a proper weighing and evaluation of the evidence
that when exposed and viewed in context, they render
36                    LIAO V. JUNIOUS

objectively unreasonable the court’s conclusion that because
the prosecution had a strong case, Liao did not suffer any
prejudice. With all respect to our colleague on the Superior
Court, we do not see how any “fairminded jurist” could have
arrived at such a faulty determination. Davis v. Ayala,
135 S.Ct. 2187, 2199 (2015). We regret the use of such harsh
language, but as the State repeatedly demands, we must
adhere to the Supreme Court’s articulation of our strict
standard of review.

                             VI

    The Superior Court’s fact-based decision that Liao
suffered no prejudice from his counsel’s error was not just
merely incorrect, but “objectively unreasonable.” Lett,
559 U.S. at 773; see also Richter, 562 U.S. at 101–02. What
is more, the Superior Court’s application of Strickland to the
facts of this case also was unreasonable as that term has been
construed in this context by the United States Supreme Court.

   Thus, deference to the state’s decision is not applicable.
Milke v. Ryan, 711 F.3d 998, 1008 (9th Cir. 2013).
Therefore, we look de novo at this issue.

    From this perspective, we note that our precedent
recognizes that prejudice is established when, as Liao’s
counsel argues, “counsel’s error left the defense with
weaknesses that were exploited by the prosecution.”

    In Brown v. Myers, 137 F.3d 1154 (9th Cir. 1998), for
example, counsel’s error was his failure to call available
witnesses who could have corroborated his client’s alibi
defense. We said,
                        LIAO V. JUNIOUS                         37

        The district court concluded that the alibi
        witnesses would not have helped Melvin at
        trial because their testimony during the
        evidentiary hearing was vague with regard to
        time.     Their testimony, however, was
        consistent with Melvin’s account that he
        arrived at Saunders’ house too early to have
        participated in the shooting. Because their
        testimony buttressed Melvin’s account on this
        crucial point, it creates a reasonable
        probability that the fact-finder would have
        entertained a reasonable doubt concerning
        guilt. As it was, without any corroborating
        witnesses, Melvin’s bare testimony left him
        without any effective defense.

Id. at 1157–58 (citations omitted).

     We came to a similar conclusion in Luna v. Cambra,
306 F.3d 954 amended in 311 F.3d 928 (9th Cir. 2002),
another case involving a failure of trial counsel to call known
alibi witnesses to corroborate his client’s testimony. Citing
Brown, we determined that counsel’s error prejudiced Luna
because without corroborating witnesses, his “bare testimony
left him without any effective defense.” Luna, 306 F.3d at
961 (quoting Brown, 137 F.3d at 1158).

    The validity of our precedents as they relate to this appeal
finds support in a recent Supreme Court case, Hinton v.
Alabama, 134 S. Ct. 1081 (2014). The Court said that a
defendant could well be prejudiced by his attorney’s failure
to secure an expert witness on a scientific issue if “there is a
reasonable probability that . . . [the] expert . . . would have
instilled in the jury a reasonable doubt as to [his client’s] guilt
38                    LIAO V. JUNIOUS

. . . .” Id. at 1089. The Court could easily have been talking
about Dr. Erman.

                             VII

    The magistrate judge’s decision was similarly flawed.
The decision erroneously labeled Dr. Erman’s testimony as
well as the results of the sleep study “merely cumulative.”
This label betrays a serious misunderstanding of the
difference between direct and corroborating evidence, on one
hand, and evidence that unnecessarily proves a point already
sufficiently established, on the other. Black’s Law Dictionary
defines cumulative evidence as “[a]dditional evidence that
supports a fact established by the existing evidence (esp. that
which does not need further support).” Evidence, Black’s
Law Dictionary (10th ed. 2014). Corroborative evidence, on
the other hand, is “[e]vidence that differs from but
strengthens or confirms what other evidence shows (esp. that
which needs support).” Id. Articulating these definitions
exposes the fatal error in degrading Dr. Erman’s and Dr.
Guilleminault’s input and the sleep study results to
unnecessary surplusage.

                            VIII

    Contrary to the State’s claim that we are improperly
second-guessing a reasonable state court decision, we are not.
Neither are we merely quibbling or disagreeing with our state
court colleagues. We are simply performing the function that
federal law requires: To guard against the illegal and
unconstitutional confinement by a state of an individual
entitled to the benefits of the rule of law. Performing this
task, we conclude that the presumption of correctness
                      LIAO V. JUNIOUS                       39

afforded to the state court’s decision has been shattered by
clear and convincing evidence.

    Liao spent years in prison without having had a fair trial.
His attorney’s serious mistake, triggered by an equally
grievous error by a court clerk, eviscerated a viable defense
of unconsciousness. His conviction represents an extreme
malfunction of justice caused by a violation of his Sixth
Amendment right to competent and effective counsel, a
violation which the State does not dispute. This error was
anything and everything but harmless.

                              IX

    Liao has served his time in prison and is currently on
parole. It is difficult to conceive of circumstances under
which the State would again take him before a jury.
Nevertheless, as is our practice and authority, we reverse the
decision of the District Court and remand with instructions to
grant a conditional writ of habeas corpus ordering Liao’s
release from all forms of custody unless the State of
California elects within 90 days of the issuance of the
mandate to retry him. Any such retrial shall commence
within a reasonable time thereafter to be set by the District
Court.

   REVERSED AND REMANDED.
