Opinion by Judge REINHARDT; Concurrence by Judge FISHER; Dissent by Judge O’SCANNLAIN
Robert Kennedy was tried twice on a charge of selling 0.-08 grams of a substance in lieu of a controlled narcotic drug — a substance that looked like an illegal drug but wasn’t — to an undercover police officer for $20. The first trial ended in a hung jury: four jurors favored finding Kennedy not guilty; eight jurors thought him guilty. Prior to his second trial, Kennedy twice asked the state court to provide him with a complete transcript of the earlier proceed*1043ing. It refused to do so. Instead, it granted him only the portion of the transcript that contained the witnesses’ testimony and denied him the portion that contained the parties’ motions and the court’s rulings thereon, as well as the court’s instructions and the parties’ opening statements and closing arguments.
At the second trial, Kennedy was represented by a new attorney who proceeded without the aid of a complete transcript of the prior trial. Aware that the new attorney did not have the full transcript, the state introduced evidence intended to show gang involvement on Kennedy’s part — evidence that had been excluded from the first trial after a successful pre-trial motion to suppress. This time, after a one day trial and three days of deliberations, the jury returned a guilty verdict. Because Kennedy had two prior serious or violent offenses, he was sentenced for the $20 sale of a non-drug to a prison term of twenty-five years to life, pursuant to California’s Three Strikes Law, Cal.Penal Code §§ 667(e) and 1170.12(c)(2) (2003).
Kennedy appeals the district court’s dismissal of his habeas corpus petition. He argues that his Fourteenth Amendment right to due process and equal protection was violated when the state court denied his request for the full transcript of his first trial. Because the state court’s decision was contrary to clearly established Supreme Court law, we reverse the district court and direct it to grant Kennedy’s habeas petition.1
I
The Second Trial
The prosecution’s principal witness in the second trial, as in the first, was Detective Leroy McDowell of the San Diego Police Department. Detective McDowell testified that he was working undercover narcotics detail in casual clothes one afternoon in October of 1995. Another officer dropped him off near the intersection of 22nd and J Streets in San Diego. McDowell testified that when he saw Kennedy and Randall Tucker across the street, he made eye contact with Kennedy and nodded his head. McDowell said that he approached the two men and asked, “Are you serving?,” meaning in street terminology, “Are you selling drugs?” Tucker responded by saying, “What?” McDowell testified that he asked the question again and Tucker responded, “What do you want?” McDowell said he told the two men that he wanted a “2-0,” which he testified means $20 of rock cocaine or another controlled substance. In response, Tucker asked, “2-0 of what?;” McDowell said he repeated, “2-0.”
McDowell said that Kennedy then asked for money, and he took a prerecorded $20 bill from his pocket and gave it to him. Kennedy put the bill in his pocket and said to Tucker, “Give it to him, cuz.” Tucker walked over to the fence, picked up a paper bag, and handed it to McDowell. Inside the bag were pieces of an off-white, rock-like substance. Tucker asked if McDowell was a police officer, and McDowell said, “No, why would I be down here if I was the police?”
McDowell testified that he looked in the bag, told Tucker that there was not enough there, and asked him to give him some more. Tucker then said, “That’s all we have. Come back later we’ll give you some more.” McDowell then said, “No, at least give me $5 of my money back.”
McDowell walked away from Kennedy and Tucker and alerted the other officers *1044who were waiting nearby. The officers then moved in and arrested the two. In Kennedy’s pocket, they found the marked $20 bill. The bag contained 0.08 grams of a “non-controlled substance” that had the appearance of an illegal drug.
Although Tucker pled guilty after the first trial, and thereby avoided a three-strike twenty-five years to life sentence,2 he testified for the defense at the second trial. His testimony differed from McDowell’s. Tucker testified that he and Kennedy had been hanging out in the area all day and earlier had been stopped and patted down by police, who found nothing on either man. Tucker told the jury that, when McDowell approached the two, no drugs were ever mentioned but that he noticed McDowell had money in his hands. Tucker said McDowell handed the money to him. Because McDowell was “pushing too much,” Tucker walked over to a nearby area, picked up a piece of paper bag, and gave it to McDowell. Tucker said “2-0” and “are you serving” can mean different things, and that he did not know what McDowell wanted.
In addition to Detective McDowell’s testimony regarding the actual event, the prosecution elicited “gang” testimony from him. The prosecutor asked McDowell if he could tell the jury what the word “cuz” meant, as it was used by Kennedy during the transaction. He replied, “Terminology used by Cripp gang members.” The prosecutor persisted, “Is it on the street used for — commonly used between individuals that are working together?” McDowell answered, “Generally, it was most — a lot of people use it and — -but basically gang members and those that want to be gang members.”
Procedural History
The first trial was a joint trial of the two co-defendants. At a pre-trial hearing, Kennedy’s counsel moved in limine to exclude all references to any gangs and any gang affiliation; the court granted the motion in a written order which provided that, “There will be no mention of ‘gangs or gang affiliation,’ unless cleared by the Court, out of the presence of the jury.”
During the discussion of the motion, the court explained that evidence of possible gang involvement, if introduced at all, could be used only for impeachment purposes, to prove Kennedy and Tucker’s relationship. Before the prosecution could impeach Kennedy on this basis, however, the judge stated that he would hold a hearing outside the presence of the jury, after which he would make a determination as to whether the evidence should be admitted for even this limited purpose. The judge told the prosecutor he would “have to be pretty convincing before [he would] let that[evidence] come in.” The transcript of the discussions regarding the motion to exclude and the court’s ruling thereon was not given to Kennedy or his counsel prior to the second trial.
As soon as the mistrial was declared, Kennedy’s counsel moved for a complete transcript of the first trial in order to prepare for the expected second trial. The judge ruled that Kennedy was entitled only to a transcript of the trial testimony; he denied him the remainder of the transcript, including the parties’ opening statements and closing arguments, evidentiary motions and rulings, jury instructions, and all other motions and colloquies. The following exchange occurred between Kennedy’s counsel and the court:
*1045[Counsel]: Your Honor, I’d also ask for an order for a transcript being prepared for the purpose of the next trial.
[Court]: Well, you can submit that to the court after — I’d—I’d—I would hope that wouldn’t be necessary to go to that expense, but I’d like to explore some disposition short of that. But if it’s going to trial then I think the case law says that you’re entitled to that transcript, just of the testimony, not of the entire trial.
[Counsel]: That’s fine, your Honor.
[Court]: All right.
A second trial date was then scheduled. During a pre-trial hearing, Kennedy told the judge that he was dissatisfied with his counsel’s representation and moved to proceed pro se. The motion was granted and new stand-by counsel was appointed. At the hearing, before relieving counsel of her responsibilities, the court inquired whether she had ordered a transcript of the first trial. She responded that she already had one and would make it available to Kennedy. In fact, however, counsel had only the transcript of the witnesses’ testimony at trial, not the full proceedings.
Ten days later, Kennedy, now proceeding pro se, asked the court to provide him with a full trial transcript in order to enable him to prepare for the second trial. During the hearing on this motion, Kennedy told the judge that he did not have his “full trial transcripts” and that he only had the testimony of the witnesses at the first trial. He told the judge that he needed, at the very least, the transcript of “all motions, opening statements, and final argument.” Kennedy and his standby counsel (who later became appointed counsel)3 explained that Kennedy needed to review the full transcript so that he could prepare his defense for the second trial. The court denied the request.4
During the second trial, the prosecution, which was aware that the prior trial judge had excluded any mention of Kennedy’s alleged gang involvement, proceeded, deliberately, to elicit testimony from Detective McDowell on the subject of gangs. The prosecutor asked Detective McDowell what the word “cuz,” used by Kennedy during the street discussion, meant. McDowell testified that when Kennedy said, “Give it to him cuz,” that “cuz” was “[t]erminology used by Cripp gang members.” On further questioning by the prosecutor, McDowell elaborated, stating that “cuz” is a phrase “basically” used by “gang members and those that want to be gang members.”
The trial lasted one day, but the jury deliberated for three. During the course of their deliberations, the jurors asked that McDowell’s testimony be read back to them. Ultimately, the jury returned a guilty verdict, and the court sentenced *1046Kennedy to a prison term of twenty-five years to life pursuant to California’s Three Strikes Law. CaLPenal Code §§ 667(e) and 1170.12(c)(2).
The California Court of Appeal affirmed the conviction. After the California Supreme Court summarily denied review, Kennedy filed a habeas corpus petition in federal court. The magistrate judge recommended dismissal of the petition, and the district court adopted the magistrate’s recommendation. Kennedy appealed.
II
AEDPA Standard of Review
We review de novo the district court’s decision to grant or deny a petition for habeas corpus. Dows v. Wood, 211 F.3d 480, 484 (9th Cir.2000). The petition in this case was filed on November 26, 1999, well after the effective date of the Antiter-rorism and Effective Death Penalty Act of 1996 (“AEDPA”). Therefore, AEDPA’s provisions apply, and our review of the state court’s decision is governed by them.
Under AEDPA, we may grant a writ of habeas corpus to a person in state custody only if the state court’s decision was “based on an unreasonable determination of the facts in light of the evidence presented in State court proceeding,” 28 U.S.C. § 2254(d)(2), or the claimed constitutional error “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).
A state court’s merit determination is “contrary to” United States Supreme Court clearly established law if it applies a rule (1) “different from the governing law set forth in [Supreme Court] cases,” Bell v. Cone, 535 U.S. 685, 694, 122 S.Ct. 1843, 152 L.Ed.2d 914 (2002), or (2) if it “confronts a set of facts that are materially indistinguishable from a decision of [the] Court and nevertheless arrives at a result different from [Supreme Court] precedent.” Price v. Vincent, 538 U.S. 634, 123 S.Ct. 1848, 1853, 155 L.Ed.2d 877 (2003).
III
It is well-established that “the State must, as a matter of equal protection, provide indigent prisoners with the basic tools of an adequate defense or appeal, when those tools are available for a price to other prisoners.” Britt v. North Carolina, 404 U.S. 226, 227, 92 S.Ct. 431, 30 L.Ed.2d 400 (1971). Applying this fundamental legal principle, the Britt Court held that the state is ordinarily required to provide an indigent defendant with the transcript of the proceedings of a prior mistrial in order to aid him in preparing for a second trial. Id. at 227-28, 92 S.Ct. 431. Here, the state does not dispute that Kennedy was entitled to a transcript of his prior mistrial. Rather, it contends that, under the relevant Supreme Court cases, an indigent defendant is entitled only to a transcript of trial testimony, not to a full transcript of the proceedings of the prior trial. The state is incorrect.
The Supreme Court held in Britt that “the State must provide an indigent defendant with a transcript of prior proceedings when that transcript is needed for an effective defense or appeal.” Id. at 227, 92 S.Ct. 431 (emphasis added). Although the Court did not define “prior proceedings” in its opinion, the meaning of the term is clear. Black’s Law Dictionary defines “proceeding,” in relevant part, as “the regular and orderly progression of a lawsuit, including all acts and events between the time of commencement to the entry of judgment.”5 Black’s Law Dictio*1047nary 1221 (7th ed.1999) (emphasis added); see also Black’s Law Dictionary 1204 (6th ed. 1990) (“The proceedings of a suit embrace all matters that occur in its progress judicially.”) (emphasis in original). From the dictionary definition it follows that the most “natural understanding” of “prior proceedings” is one that encompasses all of the acts and events that occur from the commencement of the judicial action until the entry of judgment. See Dastar Corp. v. Twentieth Century Fox Film Corp., 539 U.S. 23, 123 S.Ct. 2041, 2047, 156 L.Ed.2d 18 (2003) (adopting the most natural understanding of a given term as defined in the dictionary). Because parties’ motions, and the court’s rulings thereon, as well as opening statements and closing arguments, and the jury instructions all occur during the course of the judicial action, they are part of the proceedings. In asking this court to limit the meaning of “prior proceedings” to a transcript of witness testimony, the state would have us construe the term so as to violate its ordinary and plain meaning. We are not free to do so. See Dunn v. Commodity Futures Trading Comm’n, 519 U.S. 465, 470-71, 117 S.Ct. 913, 137 L.Ed.2d 93 (1997) (refusing to adopt the Commission’s reading of a term which violated the term’s ordinary and plain meaning).
There is nothing in the Supreme Court’s Britt decision or in any other Supreme Court case dealing with the provision of transcripts of proceedings that would permit the adoption of as narrow and cramped a reading as the state suggests. Rather, the Supreme Court’s other relevant decisions support our adoption of the term’s literal construction. For example, the Court in Griffin v. Illinois, 351 U.S. 12, 13, n. 3, 76 S.Ct. 585, 100 L.Ed. 891 (1956), held that, on appeal, indigent defendants must be provided with a free copy of a “report of proceedings,” defined by the Court as “all proceedings in the case from the time of the convening of the court until the termination of the trial[,]” including “all of the motions and rulings of the trial court, evidence heard, instructions and other matters which do not come within the clerk’s mandatory record.”6 The Court’s adopted definition of “report of proceedings” closely mirrors the dictionary meaning of “proceeding” provided in Black’s; because of the Britt Court’s reliance on Griffin, we infer that the Court meant its definition of the term “proceedings” to be the same as the definition of “proceedings” used in Griffin. Britt, 404 U.S. at 227-28, 92 S.Ct. 431. Further, in Mayer v. City of Chicago, 404 U.S. 189, 92 S.Ct. 410, 30 L.Ed.2d 372 (1971), the Court held that on appeal an *1048indigent defendant must be provided with a “full verbatim record where that is necessary to assure the indigent as effective an appeal as would be available to the defendant with resources to pay his own way.” Id. at 195, 92 S.Ct. 410. Again, the Court did not define “full verbatim record,” but its meaning is clear. Black’s defines “record on appeal,” as “the history of the proceedings on the trial of the action below (with the pleadings, offers, objections to evidence, rulings of the court, exceptions, charge, etc.), in so far as the same appears in the record furnished to the appellate court in the paperbooks or other transcripts.” Black’s Law Dictionary 1274 (6th ed.1990).7 The Court has made it clear that a transcript of pre-trial, as well as trial, proceedings must be provided. Roberts v. LaVallee, 389 U.S. 40, 42-43, 88 S.Ct. 194, 19 L.Ed.2d 41 (1967) (holding that state court must provide indigent defendant with his preliminary hearing transcript). Courts of Appeal have long understood its rulings. See, e.g., United States v. Devlin, 13 F.3d 1361,1365 (9th Cir.1994) (holding that the state must provide an indigent defendant with a suppression hearing transcript for trial preparation purposes); United States v. Vandivere, 579 F.2d 1240, 1243 (10th Cir.1978) (holding that “the presumption should be that indigent defendants in criminal cases are entitled to a transcript of any preliminary examination”); United States v. Young, 472 F.2d 628, 629 (6th Cir.1972) (holding that reversal was required where the trial court refused to grant defendant’s motion for a transcript of the first trial and the preliminary examination).8
Moreover, limiting the right to a transcript of a prior mistrial to the receipt of the transcript of witnesses’ testimony would be contrary to the Court’s reasons for requiring the state courts to provide such transcripts. In Griffin and its progeny, the Court made it clear that the provision of a full transcript was necessary to ensure that indigent defendants have the same opportunity to effectively defend themselves against criminal charges as those with money to buy transcripts. See, e.g., Roberts, 389 U.S. at 42, 88 S.Ct. 194 (1967) (“Our decisions for more than a decade now have made clear that differ-*1049enees in access to the instruments needed to vindicate legal rights, when based upon the financial situation of the defendant, are repugnant to the Constitution”)- We doubt seriously that a wealthy defendant would ordinarily proceed in a subsequent trial without purchasing a full transcript of the proceedings, including, but not limited to, the parties’ motions and the court rulings thereon and the opening statements and closing arguments. Britt, 404 U.S. 226, 92 S.Ct. at 437-38 (Douglas, J., dissenting) (stating that “wealthier defendants tend to purchase transcripts as a matter of course”); Martin v. Rose, 525 F.2d 111, 113 (6th Cir.1975) (“[W]e can think of no more valuable document for defense counsel approaching a contested trial than the record of the previous trial of his client for the exact same crime with which he is charged again before the court of another sovereign. We cannot conceive of a competent lawyer for an affluent client who would not order a trial transcript under such circumstances.”).
Portions of the transcript, other than the testimony of witnesses, are often crucial to the preparation of an effective defense. Opening and closing arguments may provide valuable insight into the government’s strategy; motions to suppress or exclude often reveal, as here, information regarding damaging and prejudicial evidence that the state plans to introduce, and the rulings thereon may sometimes be case-dispositive. Cf. United States v. Ash, 413 U.S. 300, 310-311, 93 S.Ct. 2568, 37 L.Ed.2d 619 (1973) (stating that the result of “critical confrontations” of the accused by the prosecution at “pretrial proceedings” might well “settle the accused’s fate and reduce the trial itself to a mere formality”) (quoting United States v. Wade, 388 U.S. 218, 224, 87 S.Ct. 1926, 18 L.Ed.2d 1149 (1967)). The state’s contention that such portions of the proceedings need not be furnished to indigent defendants cannot be reconciled with the Court’s stated purpose in establishing the right to a transcript of prior proceedings, to ensure that the defendant can prepare an “effective defense,” or with its mandate that poor defendants have the same access to transcripts and other basic materials as the wealthy. See Britt, 404 U.S. at 227, 92 S.Ct. 431.
We conclude that the Court’s cases clearly establish that an indigent defendant must be provided with a transcript of prior proceedings which includes, among other things, motions and the court’s rulings thereon, as well as opening statements, closing arguments, jury instructions, and relevant colloquies.9 California *1050law is similar. In its decision, the California Court of Appeal conceded that under California Supreme Court precedent the trial judge erred in failing to provide Kennedy with the full transcript of prior proceedings. The Court of Appeal stated that the trial court “should have provided” the “additional portions of the transcript” requested by Kennedy.
Therefore, the Court of Appeal did not contend, as the state does here, that either Supreme Court or California case law provides indigent defendants with the right to witnesses’ testimony only. Rather, the Court of Appeal held that the trial judge’s failure to provide the indigent defendant with a full transcript of all proceedings did not require reversal because of the doctrine of “substantial compliance.” Established Supreme Court law, however, does not provide a “substantial compliance” exception to the requirement that state courts provide a transcript of prior proceedings to indigent defendants facing a subsequent trial. Under Britt, it is assumed that a defendant will “ordinarily” need a complete transcript of a prior mistrial in order to present an effective defense. Britt, 404 U.S. at 228, 92 S.Ct. 43110 (declaring the transcript of a prior mistrial to be valuable to the defendant both as a discovery device in preparation for the next trial and as a tool at the trial itself for the impeachment of witnesses); see also Roberts, 389 U.S. at 43-44, 88 S.Ct. 194 (finding it unnecessary to discuss the importance of a preliminary hearing transcript to the defendant and holding that the transcript must be granted notwithstanding the dissent’s argument that the petitioner had suggested no use to which the transcript could be put).
The state contends that Mayer has created an exception, similar to “substantial compliance,” to the Britt rule that a defendant must be provided a complete transcript in order to prepare for a subsequent trial. The state’s reliance on Mayer is in error; the exception delineated there is not applicable in the case of second or successive trials. Mayer addressed the issue whether the state must provide a defendant with a full verbatim record for use on appeal. The Court held that because an appellant’s challenges to his conviction or sentence are limited to the specific issues raised by him in the appellate court (such as, for example, “the validity of the statute or the sufficiency of the indictment upon which conviction was predicated”), the state may show that the complete record contains extraneous material that it need not provide because it is irrelevant to the issues before the appellate court. Mayer, 404 U.S. at 194, 92 S.Ct. 410. Thus, on appeal, where the state meets its burden, it may provide an indigent defendant with “a record of sufficient completeness” — the record that is relevant to the issues raised — rather than a complete transcript, because “part or all of the stenographic transcript ... [is not] germane to the consideration of the appeal.” Id. at 194-95, 92 S.Ct. 410. Because all of the proceedings from a first trial are ordinarily germane to a second trial (at least in the absence of a dismissal of some of the initial charges), the record of “sufficient completeness” exception is inapplicable. The Supreme Court acknowledged this when it failed to incorporate similar lan*1051guage regarding a “record of sufficient completeness” in its Britt opinion — an opinion filed the same day as Mayer.11
The Court has recognized only one exception to the Britt requirement in the case of a second or successive trial. In Britt, the Court said that the state may provide an indigent defendant with an alternative device that would fulfill the same functions as a court-prepared transcript, but only after meeting its burden of establishing that the proposed alternative is sufficient. Britt, 404 U.S. at 230, 92 S.Ct. 431(stating that the defendant does not “bear the burden of proving inadequate such alternatives as may be suggested by the State or conjured up by a court in hindsight.”). The state does not contend that this exception is applicable here.12
Our dissenting colleague contends that there is another exception to Britt in addition to the “narrow” exception discussed here. Id. at 227, 92 S.Ct. 431. He states that a free transcript need not be provided if it is not “necessary to an effective defense,” and that for a “transcript to truly be ‘necessary to an effective defense’ ” it need be more than “merely helpful.” Dissent at 1061. He would then put the burden on the defendant to prove that there is a “need” for the transcript. The dissent’s attempt to create a second exception conflicts directly with Britt. In Britt, the Supreme Court stated that a decision to deny a petitioner a transcript which rested on the “petitioner’s failure to specify how the transcript might have been useful to him” would be constitutionally suspect. Id. at 228, 92 S.Ct. 431. It emphasized that its “cases ha[d] consistently recognized the value to a defendant of a transcript of prior proceedings, without requiring a showing of need.” Id. (emphasis added). In this regard, the Court cited Roberts v. LaVallee, in which it had granted the writ and concluded that, despite the fact that the petitioner had pointed to “no use to which the [preliminary hearing] transcript could have been put,” the state was required to provide it. Id. at 228 n. 3, 92 S.Ct. 431 (emphasis added). Like the California Court of Appeal, our dissenting colleague would have us abrogate clearly established Supreme Court law. This we are not free to do.
IV
Having identified clearly established Supreme Court law, we must next decide whether the California Court of Ap*1052peal’s decision is contrary to or an unreasonable application of that law. When determining whether a decision is either “contrary to” or an “unreasonable application” of AEDPA, the habeas court must examine the last reasoned decision by the state court. See Ylst v. Nunnemaker, 501 U.S. 797, 801-02, 111 S.Ct. 2590, 115 L.Ed.2d 706 (1991). In this case, the California Supreme Court summarily denied review of Kennedy’s claim, so the last reasoned state court decision is the California Court of Appeal decision on direct appeal.
In reaching its decision, the Court of Appeal relied on People v. Hosner, 15 Cal.3d 60, 123 Cal.Rptr. 381, 538 P.2d 1141 (1975), which adopted, in sum and substance, the applicable Supreme Court precedents, including Britt, and which held that “an indigent defendant in a criminal trial who was entitled to a free transcript of a prior mistrial was presumptively entitled to a full transcript of those prior proceedings.” Id. at 70, 123 Cal.Rptr. 381, 538 P.2d 1141 (citing Britt, 404 U.S. at 227, 92 S.Ct. 431) (emphasis in original). As discussed, applying Hosner, the California Court of Appeal concluded that the trial court should have provided Kennedy with a full transcript. If the Court had stopped its analysis here, the determination on the merits would not have been contrary to clearly established Supreme Court law.
The California Court of Appeal, however, went on to reject Kennedy’s constitutional claim on the basis that in providing Kennedy with only a transcript “of the[trial] testimony, the [trial] court substantially complied” with Hosner. In so doing, the state court added an additional factor to the Supreme Court rule, and thus its decision was contrary to clearly established Supreme Court law. The alteration of the existing Supreme Court requirements through the addition of the “substantial compliance” doctrine contravened controlling precedent, which requires the state to provide an indigent defendant with a full transcript of the prior proceedings for use in a subsequent trial. Britt, 404 U.S. at 227, 92 S.Ct. 431. In sum, because the California Court of Appeal created a new and additional “substantial compliance” exception to the governing Supreme Court rule, and thereby altered or amended the well-established Supreme Court requirement that indigent defendants be provided with a complete transcript of the “prior proceedings,” we hold that the state court’s decision was contrary to clearly established law. See Williams v. Taylor, 529 U.S. 362, 393, 397, 120 S.Ct. 1495, 146 L.Ed.2d 389 (2000) (holding that where the State Supreme Court “mischaracterized at best” the governing rule and read a “separate inquiry” into the established Supreme Court Strickland ineffective assistance standard, the writ must be granted); Benn v. Lambert, 283 F.3d 1040, 1051, n. 5 (9th Cir.2002) (“The addition, deletion, or alteration of a factor in a test established by the Supreme Court[ ] constitutes a failure to apply controlling Supreme Court law under the ‘contrary to’ clause of AEDPA.”).13
Where the state completely fails to provide an indigent defendant with a transcript of a mistrial for use in connection with a second trial, we would likely find a structural error, requiring automatic reversal. See Turner v. Malley, 613 F.2d 264, 266 (10th Cir.1979) (holding that Britt requires automatic reversal where the state fails entirely to provide the defendant with a transcript for use at the second trial and also fails to show the existence of an alternative device that would fulfill the same functions as the transcript); Martin, 525 F.2d at 113 (same); United States v. Pulido, 879 F.2d 1255, 1257 (5th Cir.1989) (same); United States v. Talbert, 706 F.2d 464, 470 (4th Cir.1983) (same); see also Roberts, 389 U.S. at 43, 88 S.Ct. 194(reversing the state conviction, granting the writ, and failing to adopt the dissent’s suggestion that a separate harmless error analysis should be conducted where the state failed to provide the indigent defendant with a transcript of a preliminary hearing for use at trial). Where the state fails to provide only a portion of the transcript, however, we conclude that harmless error analysis applies. Cf. United States v. Devlin, 13 F.3d 1361, 1364-65 (9th Cir.1994) (applying harmless error where the trial court failed to provide the defendant with a transcript of a suppression hearing conducted prior to trial); United States v. Rosales-Lopez, 617 F.2d 1349, 1355(9th Cir.1980) (same). We note, however, that where significant and crucial portions of the proceedings of a first trial are omitted, it will generally be prejudicial to an indigent defendant’s ability to prepare an effective defense. See, e.g., Roberts, 389 U.S. at 43, 88 S.Ct. 194(holding that the failure to provide defendant with preliminary hearing transcript at which key state witnesses testified was constitutional error requiring reversal). The more significant and crucial the portions of the proceedings omitted, the more likely that we will be compelled to conclude that the defendant was deprived of the “basic tools of an adequate defense.” 14 Britt, 404 U.S. at 227, 92 S.Ct. 431.
In making a harmless error determination in a habeas case, “[n]ormally a record review will permit a judge to make up his or her mind about the matter. And indeed a judge has an obligation to do so.” O’Neal v. McAninch, 513 U.S. 432, 435, 115 S.Ct. 992, 130 L.Ed.2d 947 (1995). When reviewing a state court decision to determine “whether the error had a substantial and injurious influence or effect on the verdict,” Brecht v. Abrahamson, 507 U.S. 619, 627, 113 S.Ct. 1710, 123 L.Ed.2d 353 (1993), a judge should “ask directly, ‘Do I, the judge, think that the error sub*1054stantially influenced the jury’s decision?’ ” O’Neal, 513 U.S. at 436-37, 115 S.Ct. 992. Further, “[w]hen a federal judge in a ha-beas proceeding is in grave doubt about whether a trial error of federal law had a substantial and injurious effect or influence on the jury’s verdict, that error is not harmless. And, the petitioner must win.” Id. at 436, 115 S.Ct. 992(quotations omitted). These principles apply in post-AEDPA as well as pre-AEDPA cases. Early v. Packer, 537 U.S. 3, 10, 123 S.Ct. 362, 154 L.Ed.2d 263 (2003); Penry v. Johnson, 532 U.S. 782, 795, 121 S.Ct. 1910, 150 L.Ed.2d 9 (2001).
Upon review of the record, we conclude that the state court’s denial of a complete transcript of prior proceedings had a substantial and injurious effect on the jury’s verdict.15 Brecht, 507 U.S. at *1055627, 113 S.Ct. 1710. The prosecution took advantage of Kennedy’s counsel’s lack of knowledge regarding the prior trial court order prohibiting gang testimony in order to introduce the prejudicial testimony in the second trial; the state conceded as much during oral argument. The transcript of the trial testimony provided to the defense was devoid of any mention of gang involvement, gang language, or of a witness who would testify to the connection between the two. However, had Kennedy’s counsel had access to the missing portions of the transcript of the proceedings — which portions included the discussions regarding the introduction of gang related evidence, the motion to exclude, and the judge’s favorable ruling thereon— we have little doubt that Kennedy’s counsel in the second trial would have presented a similar motion with a substantial likelihood of success.16
After hearing arguments from counsel, the first trial judge made a determination that the introduction of evidence tending to show gang affiliation on the part of Kennedy would be highly prejudicial. The case law in this circuit provides ample support for that conclusion and for the conclusion that the failure to provide Kennedy with the portion of the transcript relating to that evidentiary issue, and the consequent introduction in the second trial of the gang related evidence, was prejudicial. Our cases make it clear that evidence relating to gang involvement will almost always be prejudicial and will constitute reversible error. Evidence of gang membership may not be introduced, as it was here, to prove intent or culpability. See Mitchell v. Prunty, 107 F.3d 1337, 1342-43 (9th Cir.1997), cert. denied, 522 U.S. 913, 118 S.Ct. 295, 139 L.Ed.2d 227 (1997) (reversing the conviction and holding that evidence of membership in a gang cannot serve as proof of intent, because, while someone may be an “evil person,” that is not enough to make him guilty under California law), overruled on other grounds by Santamaria v. Horsley, 133 F.3d 1242, 1248 (9th Cir.1998); see also United States v. Garcia, 151 F.3d 1243, 1244-46 (9th Cir.1998) (reversing the conviction and stating that it would be contrary to the fundamental principles of our justice system to find a defendant guilty on the basis of his association with gang members). In *1056this regard, we have stated that testimony-regarding gang membership “creates a risk that the jury will [probably] equate gang membership with the charged crimes.” United States v. Hankey, 203 F.3d 1160, 1170 (9th Cir.2000) (internal quotations and citations omitted). We further stated that where, as here, “gang” evidence is proffered to prove a substantive element of the crime (and not for impeachment purposes), it would likely be “unduly prejudicial.” Id. In sum, the use of gang membership evidence to imply “guilt by association” is impermissible and prejudicial. Garcia, 151 F.3d at 1246.
Here, the prosecution, well aware that the first trial court had forbidden the introduction of testimony relating to gang involvement or association in order to establish defendant’s guilt, deliberately elicited testimony from Detective McDowell for this purpose.17 We conclude that the jurors in Kennedy’s case most likely drew impermissible inferences from Detective McDowell’s testimony, equating Kennedy’s purported gang membership with the charged crime. The fact that the first trial ended in a hung jury and that, following a one day trial, the jury in the second trial deliberated for three days before reaching a verdict, also supports our determination that the refusal to provide Kennedy with a complete transcript had a substantial and injurious effect on the jury’s decision.18 In sum, had a transcript containing the missing portions of the proceedings, including the motion to exclude gang related testimony and the court’s favorable ruling thereon, been furnished to the defense, it would have served as precisely the type of “discovery device in preparation for[the second] trial” that Britt referred to when explaining why it is necessary to provide the defense with a transcript of the proceedings.19 404 U.S. at 228, 92 S.Ct. 431.
*1057We note that the prejudice in this case stemmed not only from the failure to provide Kennedy with the portion of the proceedings relating to the exclusion of gang related evidence, but also from the omission of other portions of the transcript. We consider at this point only the opening statements and the closing arguments from the first trial. The statements and arguments, which Kennedy explicitly requested but was denied, were also crucial to the development of an effective defense. Various tactical and strategic decisions made by Kennedy’s new counsel might have been affected had he been provided with a copy of the prosecutor’s opening statement and closing argument; he might, for example, have been able to anticipate some of the prosecution’s key arguments, identify potential weaknesses in its case, assess the relative weight that the prosecution would place on various items of evidence, and better determine what would be needed to refute them. As the California Supreme Court itself has explained, as “in the manner of the denial of the assistance of counsel, the denial of a transcript of a former trial infects all the evidence offered at the latter trial, for there is no way of knowing to what extent adroit counsel assisted by the transcript to which the defendant was entitled might have been able to impeach or rebut any given item of evidence.” Hosner, 15 Cal.3d at 70, 123 Cal.Rptr. 381, 538 P.2d 1141. In hindsight, it is difficult to conclude that the omitted portions of the transcript would not have been important to Kennedy in preparing an effective defense, particularly where, as here, the prosecution had a distinct advantage in presenting the government’s case, having knowledge of all that occurred during the course of the first trial. See Devlin, 13 F.3d at 1364 (stating that the transcript should have been provided to “placet ] the defendant on equal footing with the prosecution”). For these reasons, we hold that denying Kennedy a full transcript of the proceedings for use in relation to his second trial was not harmless error.20
*1058We REVERSE the district court’s denial of the petition for writ of habeas corpus and REMAND the matter for issuance of the writ.