Opinion by Judge KOZINSKI; Concurrence by Judge O’SCANNLAIN.
OPINION
KOZINSKI, Circuit Judge.
Lawrence Bittaker was convicted in California state court of multiple murders and was sentenced to death. After unsuccessfully exhausting his state remedies, In re Bittaker, No. S052371, 2000 Cal. LEXIS 9066 (Cal. Nov. 29, 2000); In re Bittaker, No. S058797, 2000 Cal. LEXIS 9067 (Cal. Nov. 29, 2000), Bittaker filed a federal habeas petition pursuant to 28 U.S.C. § 2254 raising a multitude of claims, including a variety of ineffective assistance of counsel claims.
It has long been the rule in the federal courts that, where a habeas petitioner raises a claim of ineffective assistance of counsel, he waives the attorney-client privilege as to all communications with his allegedly ineffective lawyer. See, e.g., Wharton v. Calderon, 127 F.3d 1201, 1203 (9th Cir.1997); Tasby v. United States, 504 F.2d 332, 336 (8th Cir.1974); Laughner v. United States, 373 F.2d 326, 327 (5th Cir.1967). The question present[717]*717ed to us is the scope of the habeas petitioner’s waiver: Does it extend only to litigation of the federal habeas petition, or is the attorney-client privilege waived for all time and all purposes—including the possible retrial of the petitioner, should he succeed in setting aside his original conviction or sentence?
The district court entered a protective order precluding use of the privileged materials for any purpose other than litigating the federal habeas petition, and barring the Attorney General from turning them over to any other persons or offices, including, in particular, law enforcement or prosecutorial agencies.1 The state appeals this order, arguing that petitioner completely waived his privilege and the district court therefore had no authority to preclude dissemination of these non-privileged materials, or their use to re-prosecute petitioner.2
Jurisdiction
The challenged order is not a final judgment, yet the parties agree that it is reviewable as a collateral order pursuant to 28 U.S.C. § 1291. See Cohen v. Beneficial Indus. Loan Corp., 387 U.S. 541, 545-47, 69 S.Ct. 1221, 93 L.Ed. 1528 (1949). While we ultimately agree, the matter is closer than the concurrence of the parties would suggest. The protective order is, after all, reviewable on appeal from the final judgment, no matter who wins below on the merits. See, e.g., Anderson v. Calderon, 232 F.3d 1053, 1061-62, 1099-100 (9th Cir.2000) (reviewing the denial of petitioner’s request for a protective order on his appeal from the district court’s final denial of his habeas petition). Moreover, at that time we will know much more about the practical effect of the order, if any. If petitioner is unsuccessful in any of his claims, and no retrial is necessary, the order would become irrelevant for all practical purposes.
Nevertheless, we conclude that the order is appealable because significant strategic decisions turn on its validity; review after final judgment may therefore come [718]*718too late. If petitioner relies on the protective order by releasing privileged materials and it turns out to be invalid, he will suffer serious prejudice during any retrial. Similar reasoning has led some of our sister circuits to accept interlocutory appeals of discovery orders under the collateral order doctrine. See, e.g., In re Ford Motor Co., 110 F.3d 954, 962-64 (3d Cir.1997) (“Appeal after final judgment cannot remedy the breach in confidentiality occasioned by erroneous disclosure of protected materials.... [T]he cat is already out of the bag- [T]here is no way to unscramble the egg scrambled by the disclosure .... ”); In re Cont’l Ill. Sec. Litig., 732 F.2d 1302, 1307-08 (7th Cir.1984) (“Once the Report was released, any error in releasing it would be impossible to correct.”); In re Grand Jury Investigation of Ocean Tramp., 604 F.2d 672, 673-74 (D.C.Cir.1979) (per curiam) (holding that, because the district court’s order “conclusively determined the question of waiver” of the attorney-client privilege, appellant “must pursue its claim of attorney-client privilege at this time in order to ensure that its claim not later become moot by reason of the documents’ disclosure to third parties”); S. Methodist Univ. Ass’n of Women Law Students v. Wynne & Jaffe, 599 F.2d 707, 712 (5th Cir.1979) (“[B]ecause[information], once revealed, could not again be concealed, review following a decision on the merits would come too late.... ”).
Moreover, as the Attorney General points out, the order complicates the litigation process, even if it is ultimately vacated.3 The uncertainty of the order’s validity will significantly increase the cost, delay and burden for the parties and the court.
We have reviewed such orders under the collateral order doctrine in the past. See, e.g., Osband v. Woodford, 290 F.3d 1036, 1039-41 (9th Cir.2002); Wharton, 127 F.3d at 1203-04. For the foregoing reasons, we see no reason to depart from this practice. Rather, we agree with the parties that considerations of “inconvenience and costs” to the judicial system as a whole and “the danger of denying justice by delay” favor asserting appellate jurisdiction at this time. Johnson v. Jones, 515 U.S. 304, 315, 115 S.Ct. 2151, 132 L.Ed.2d 238 (1995) (internal quotation marks omitted).
The Merits
A. The rule that a litigant waives the attorney-client privilege by putting the lawyer’s performance at issue during the course of litigation dates back to at least Hunt v. Blackburn, 128 U.S. 464, 9 S.Ct. 125, 32 L.Ed. 488 (1888), where the Court stated: “When Mrs. Blackburn entered [719]*719upon a line of defence which involved what transpired between herself and Mr. Weatherford [her lawyer], and respecting which she testified, she waived her right to object to his giving his own account of the matter.” Id. at 470-71, 9 S.Ct. 125. The Court thought this proposition so self-evident it felt no need to support it with either citation to authority or further analysis. In the intervening years, courts and commentators have come to identify this simple rule as the fairness principle. See, e.g., United States v. Amlani, 169 F.3d 1189, 1196 (9th Cir.1999); 8 John Henry Wigmore, Evidence in Trials at Common Law § 2327, at 636 (John T. McNaughton rev., 1961) [hereinafter Wigmore on Evidence]. The principle is often expressed in terms of preventing a party from using the privilege as both a shield and a sword. See, e.g., Chevron Corp. v. Pennzoil Co., 974 F.2d 1156, 1162 (9th Cir.1992) (“The privilege which protects attorney-client communications may'not be used both as a sword and a shield.”); 3 Jack B. Weinstein & Margaret A. Berger, Weinstein’s Federal Evidence § 503.41[1], at 503-104.1 to.2 (Joseph M. McLaughlin ed., 2d ed. 2003) (“[T]he privilege may be found to have been waived by implication when a party takes a position in litigation that makes it unfair to protect that party’s attorney-client communications.... The doctrine of waiver by implication reflects the position that the attorney-client privilege was intended as a shield, not a sword.” (internal quotation marks omitted)). In practical terms, this means that parties in litigation may not abuse the privilege by asserting claims the opposing party cannot adequately dispute unless it has access to the privileged materials. The party asserting the claim is said to have implicitly waived the privilege. See, e.g., Christopher B. Mueller & Laird C. Kirkpatrick, Evidence: Practice Under the Rules § 5.30, at 549 (2d ed. 1999) (“Substantial authority holds the attorney-client privilege to be impliedly waived where the client asserts a claim or defense that places at issue the nature of the privileged material.”).
Such waivers by implication differ materially from the more traditional express waivers.4 An express waiver occurs when a party discloses privileged information to a third party who is not bound by the privilege, or otherwise shows disregard for the privilege by making the information public. See generally Mueller & Kirkpatrick § 5.28, at 530-33; Developments in the Law—Privileged Communications, 98 Harv. L.Rev. 1450, 1630 & n. 2 (1985) [hereinafter Privileged Communications]. Disclosures that effect an express waiver are typically within the full control of the party holding the privilege; courts have no role in encouraging or forcing the disclosure—they merely recognize the waiver after it has occurred. The cases upon which the state relies, see, e.g., Permian Corp. v. United States, 665 F.2d 1214, 1219-22 (D.C.Cir.1981); Westinghouse Elec. Corp. v. Republic of the Philippines, 951 F.2d 1414, 1423-27 (3d Cir.1991), fall [720]*720into this category. These cases hold that, once documents have been turned over to another party voluntarily, the privilege is gone, and the litigant may not thereafter reassert it to block discovery of the information and related communications by his adversaries. See also In re Sealed Case, 676 F.2d 793, 809 (D.C.Cir.1982).5 Because these express waiver cases do not involve the court-ordered disclosure of privileged information after “the client [has] assert[ed] a claim or defense that place[d] at issue the nature of the privileged material,” Mueller & Kirkpatrick § 5.30, at 549, we do not find them particularly useful in ascertaining the scope of Bittaker’s waiver of his attorney-client privilege under the fairness principle. See In re von Bulow, 828 F.2d 94, 101-02 (2d Cir.1987) (declining to extend the fairness principle to disclosures made outside the course of judicial proceedings).
We look, instead, to the doctrine of implied waiver. “[T]he doctrine of implied waiver allocates control of the privilege between the judicial system and the party holding the privilege.” Privileged Communications, 98 Harv. L.Rev. at 1630. The court imposing the waiver does not order disclosure of the materials categorically; rather, the court directs the party holding the privilege to produce the privileged materials if it wishes to go forward with its claims implicating them. The court thus gives the holder of the privilege a choice: If you want to litigate this claim, then you must waive your privilege to the extent necessary to give your opponent a fair opportunity to defend against it. See, e.g., Amlani, 169 F.3d at 1195 (holding that courts must evaluate “whether allowing the privilege would deny the opposing party access to information vital to its defense” (internal quotation marks omitted)); Chevron, 974 F.2d at 1162. Essentially, the court is striking a bargain with the holder of the privilege by letting him know how much of the privilege he must waive in order to proceed with his claim.
Three important implications flow from this regime. The first is that the court must impose a waiver no broader than needed to ensure the fairness of the proceedings before it. Because a waiver is required so as to be fair to the opposing side, the rationale only supports a waiver broad enough to serve that purpose. Courts, including ours, that have imposed waivers under the fairness principle have therefore closely tailored the scope of the waiver to the needs of the opposing party in litigating the claim in question. See, e.g., Kerr v. U.S. Dist. Court, 426 U.S. 394, 405, 96 S.Ct. 2119, 48 L.Ed.2d 725 (1976) (recognizing the need to ensure that the “balance between petitioners’ claim[] of ... privilege and plaintiffs’ asserted need for the documents is correctly struck”); Amlani, 169 F.3d at 1196 (holding that “only those documents or portions of documents relating to the [claim asserted by the client] [should be] disclosed”); Greater Newburyport Clamshell Alliance v. Pub. Serv. Co., 838 F.2d 13, 22 (1st Cir.1988) (holding that the client need reveal only [721]*721information “for which defendants have so far shown a true need and without which they may be unfairly prejudiced in their defense”); see also Mueller & Kirkpatrick § 5.31, at 553 (suggesting that “in applying the doctrine of implied waiver by claim assertion, courts must be careful to target only” those privileged materials without which the adverse party would be unfairly prejudiced).
Second, the holder of the privilege may preserve the confidentiality of the privileged communications by choosing to abandon the claim that gives rise to the waiver condition. Cf. Lyons v. Johnson, 415 F.2d 540, 541-42 (9th Cir.1969) (affirming dismissal of plaintiffs complaint after she persisted in hiding behind the privilege against self-incrimination by refusing to answer any deposition questions or to submit to discovery).
Finally, if a party complies with the court’s conditions and turns over privileged materials, it is entitled to rely on the contours of the waiver the court imposes, so that it will not be unfairly surprised in the future by learning that it actually waived more than it bargained for in pressing its claims. See Transamerica Computer Co. v. IBM Corp., 573 F.2d 646, 652 (9th Cir.1978) (holding that, because the district court had made an explicit ruling “protecting and preserving all claims of privilege” to expedite the parties’ discovery, “IBM did not waive its right to claim the privilege as to any documents produced after [the] date [of the order]”). It follows that the court imposing the waiver must be able to bind the party receiving the privileged materials to the court’s limitations and conditions. See id. The party receiving and using privileged materials pursuant to a court-imposed waiver implicitly agrees to the conditions of the waiver; if it does not wish to be bound, it is free to reject the materials and litigate without them, but it must do so before any disclosure is made.
B. With these considerations in mind, we turn to the question of the proper scope of the waiver in cases such as the one now before us. We start by noting that, in the federal habeas context, we must strike a delicate balance between the interests of the state and those of the federal government. See Duckworth v. Eagan, 492 U.S. 195, 211, 109 S.Ct. 2875, 106 L.Ed.2d 166 (1989) (O’Connor, J., concurring) (noting that federal habeas review “has always been a flashpoint of tension in the delicate relationship of the federal and state courts”). The state, for its part, has established the attorney-client privilege, Cal. Evid.Code § 954, and has made it fully applicable to “all proceedings,” id. § 910. The California Supreme Court has recently described the privilege as “fundamental to [its] legal system” and “a hallmark of [its] jurisprudence.” People v. Superior Court (Laff), 25 Cal.4th 703, 715, 107 Cal.Rptr.2d 323, 23 P.3d 563 (2001) (internal quotation marks omitted). The “lawyer-client privilege,” as it’s officially known in California, is “no mere peripheral evidentiary rule, but is held vital to the effective administration of justice.” Roberts v. City of Palmdale, 5 Cal.4th 363, 380, 20 Cal.Rptr.2d 330, 853 P.2d 496 (1993). State law imposes upon every attorney the duty “ ‘[t]o maintain inviolate the confidence, and at every peril to himself or herself to preserve the secrets, of his or her client.’ ” Laff, 25 Cal.4th at 715, 107 Cal.Rptr.2d 323, 23 P.3d 563 (quoting Cal. Bus. & Prof.Code § 6068(e)). Lawyers in California, as elsewhere, consider this duty central to the attorney-client relationship.
At the same time, Congress has given state prisoners the right to petition the federal courts for collateral review of their state convictions to ensure that state pro[722]*722ceedings comply with constitutional requirements. 28 U.S.C. § 2254. In performing their constitutional duties, the federal courts have determined that claims of ineffective assistance of counsel cannot be fairly litigated unless the petitioner waives his privilege for purposes of resolving the dispute. See, e.g., Wharton, 127 F.3d at 1203. However sensible and necessary the waiver rule might be in practice, it nonetheless runs counter to the rationale behind the privilege and carries with it the potential of severely undermining the state’s interest in maintaining the confidentiality of attorney-client communications. Claims of ineffective assistance of counsel are routinely raised in felony cases, particularly when a sentence of death has been imposed. If the federal courts were to require habeas petitioners to give up the privilege categorically and for all purposes, attorneys representing criminal defendants in state court would have to worry constantly about whether their casefiles and client conversations would someday fall into the hands of the prosecution. In addition, they would have to consider the very real possibility that they might be called to testify against their clients, not merely to defend their own professional conduct, but to help secure a conviction on retrial. A broad waiver rule would no doubt inhibit the kind of frank attorney-client communications and vigorous investigation of all possible defenses that the attorney-client and work product privileges are designed to promote.6
Were such a broad waiver necessary to satisfy federal interests, the state’s interest in protecting lawyer-client confidences might have to yield. But we can conceive of no federal interest in enlarging the scope of the waiver beyond what is needed to litigate the claim of ineffective assistance of counsel in federal court. A waiver that limits the use of privileged communications to adjudicating the ineffective assistance of counsel claim fully serves federal interests. See Laughner, 373 F.2d at 327. At the same time, a narrow waiver rule — one limited to the rationale under-girding it — will best preserve the state’s vital interest in safeguarding the attorney-client privilege in criminal cases, thereby ensuring that the state’s criminal lawyers continue to represent their clients zealously.
A narrow waiver rule is also consistent with the interests of the habeas petitioner in obtaining a fair adjudication of his petition and securing a retrial untainted by constitutional errors. Here, Bittaker is claiming that he was denied a constitutionally adequate criminal trial because he had ineffective counsel and for many other reasons as well. If he succeeds on any of these claims, it will mean that his trial was constitutionally defective. Extending the waiver to cover Bittaker’s retrial would immediately and perversely skew the second trial in the prosecution’s favor by handing to the state all the information in petitioner’s first counsel’s casefile. If a prisoner is successful in persuading a federal court to grant the writ, the court should aim to restore him to the position he would have occupied, had the first trial been constitutionally error-free. Giving the prosecution the advantage of obtaining the defense casefile — and possibly even forcing the first lawyer to testify against the client during the second trial — would [723]*723assuredly not put the parties back at the same starting gate.
What s more, requiring the petitioner to enter such a broad waiver would force him to the painful choice of, on the one hand, asserting his ineffective assistance claim and risking a trial where the prosecution can use against him every statement he made to his first lawyer and, on the other hand, retaining the privilege but giving up his ineffective assistance claim. This would violate the spirit, and perhaps the letter, of Simmons v. United States, 390 U.S. 377, 394, 88 S.Ct. 967, 19 L.Ed.2d 1247 (1968).7 It is no answer to say that Bittaker created this dilemma for himself — that he was the one who voluntarily “chose” to challenge his conviction on grounds of ineffective assistance. The [724]*724Constitution guarantees Bittaker the right to effective assistance of counsel at trial, Strickland v. Washington, 466 U.S. 668, 686, 104 S.Ct. 2052, 80 L.Ed.2d 674 (1984), and Congress has provided him an avenue to claim that his constitutional rights were violated, 28 U.S.C. § 2254. As one of our sister circuits has recognized in a different context, one may be “a ‘voluntary’ party only because there is no other means of protecting legal rights.... The scope of required disclosure should not be so broad as to effectively eliminate any incentive to vindicate [one’s] constitutional right[s].... ” Greater Newburyport Clamshell Alliance, 838 F.2d at 21-22.
Nor would a narrowly tailored waiver unfairly prejudice the prosecution. State law precludes access to materials in the defense lawyer’s casefile and commands the lawyer to stand mute if he has information damaging to his client. The fortuity that defendant’s initial trial was constitutionally defective gives the prosecution no just claim to the lawyer’s casefile or testimony. To the contrary, allowing the prosecution at retrial to use information gathered by the first defense lawyer— including defendant’s statements to his lawyer — would give the prosecution a wholly gratuitous advantage. It is assuredly not consistent with the fairness principle to give one side of the dispute such a munificent windfall for use in proceedings unrelated to the matters litigated in federal court.
We are not alone in our concern about the effect of a broad waiver on the fairness of state criminal trials. In one case that has been brought to our attention, the California Supreme Court, during the course of a state habeas proceeding, entered an order very similar to the one here.8 While the order is not published, and therefore presumably not binding in future cases,9 it does seem to strike the same balance among the competing interests as we do. Significantly, the order specifically bars the use of privileged materials at petitioner’s possible retrial. [725]*725While we can only infer the court’s rationale, we believe it must have been similar to our own.10
C. Relying on the majority’s analysis in Anderson v. Calderon, 232 F.3d 1053, 1099-100 (9th Cir.2000), the state argues that precluding the prosecution from using evidence found in defense counsel’s casefile in subsequent state court proceedings “would constitute an unwarranted anticipatory interference with the prerogatives of the state courts” and “contravene basic principles of comity and federalism,” in violation of Younger v. Harris, 401 U.S. 37, 43-54, 91 S.Ct. 746, 27 L.Ed.2d 669 (1971), and its progeny. Anderson, 232 F.3d at 1099-100. But Anderson was decided on the mistaken premise that petitioner’s waiver of the attorney-client privilege is [726]*726governed by state law and therefore best determined by the state courts. Id. at 1100. For the reasons already explained, we hold that the scope of the implied waiver must be determined by the court imposing it as a condition for the fair adjudication of the issue before it. When that court is a federal court, the scope of the waiver is a matter of federal law. See Fed.R.Evid. 501; Tennenbaum v. Deloitte & Touche, 77 F.3d 337, 340 (9th Cir.1996) (applying federal law on the question of waiver); Weil, 647 F.2d at 24 (same). After all, it is the federal courts that are inducing petitioner to waive his privilege, so the federal courts must be able to guarantee the integrity of the bargain if petitioner chooses to waive the privilege so he can litigate his ineffective assistance of counsel claim. See generally William W Schwarzer et al., California Practice Guide: Federal Civil Procedure Before Trial § 11:113.15, at 11-70 (2002) (“In appropriate circumstances, courts may grant a protective order restricting the use of any discovery to the present lawsuit.... A court may also limit dissemination of information obtained through discovery” by, among other things, “restricting disclosure.”).
Nor do we believe that the protective order impinges on the dignity or authority of the state courts. The power of courts, state as well as federal, to delimit how parties may use information obtained through the court’s power of compulsion is of long standing and well-accepted. See, e.g., Degen v. United States, 517 U.S. 820, 826, 116 S.Ct. 1777, 135 L.Ed.2d 102 (1996) (noting that protective orders may be used “to prevent parties from using civil discovery to evade restrictions on discovery in criminal cases”); E.I. DuPont De Nemours Powder Co. v. Masland, 244 U.S. 100, 103, 37 S.Ct. 575, 61 L.Ed. 1016 (1917) (“It will be understood that if, in the opinion of the trial judge, it is or should become necessary to reveal the secrets to others, it will rest in the judge’s discretion to determine whether, to whom, and under what precautions, the revelation should be made.”); Brown Bag Software v. Symantec Corp., 960 F.2d 1465, 1469, 1471-72 (9th Cir.1992) (upholding a protective order that precluded plaintiffs in-house counsel from accessing defendant’s trade secrets while providing the information to an independent consultant); Covey Oil Co. v. Cont’l Oil Co., 340 F.2d 993 (10th Cir.1965) (upholding a protective order that restricted access to sensitive documents to counsel and independent certified public accountants and prohibited use of the materials for competitive purposes), overruled on other grounds as stated in FTC v. Alaska Land Leasing, Inc., 778 F.2d 577, 578 (10th Cir.1985); Chem. & Indus. Corp. v. Druffel, 301 F.2d 126, 130 (6th Cir.1962) (noting that the district court may enter a protective order prohibiting public disclosure of information obtained through discovery); see also 8 Charles Alan Wright, Arthur R. Miller & Richard L. Marcus, Federal Practice and Procedure § 2043, at 566 (2d ed.1994) (listing examples of protective orders “limiting the persons who are to have access to the information disclosed and the use to which these persons may put the information”). Courts could not function effectively in cases involving sensitive information—trade secrets, medical files and minors, among many others— if they lacked the power to limit the use parties could make of sensitive information obtained from the opposing party by invoking the court’s authority.
The courts of California remain free, of course, to determine whether Bittaker waived his attorney-client privilege dn some basis other than his disclosure of privileged information during the course of the federal litigation. In addition, if the district attorney is able to obtain the privi[727]*727leged materials through a source other than the Attorney General’s office, he would be free to present them to the state court and seek a ruling on their admissibility. The district court’s order simply precludes a party before it from misusing materials it obtained for a limited purpose by invoking the court’s power of compulsion. We are confident that the state courts will not feel in the least uncomfortable because a party may not use confidential information it secured by invoking our power and authority, just as we would respect a similar order limiting the use of privileged materials obtained during the course of state court litigation. This is comity, not encroachment.
We are comforted in our conclusion by the fact that the parties have failed to bring to our attention — and we have been unable to find — very many cases where the prosecution has even attempted to use privileged information obtained as a result of federal discovery procedures in a defendant’s retrial. Except for a small handful of cases from our own court, all originating in California, see Osband, 290 F.3d at 1042-43; Anderson, 232 F.3d at 1099-100; McDowell v. Calderon, 197 F.3d 1253, 1255-56 (9th Cir.1999) (en banc) (per curiam), the only case we have found that even remotely raises this possibility is United States v. Suarez, 820 F.2d 1158 (11th Cir.1987). In Suarez, the defendant sought to withdraw his guilty plea, claiming that he was misinformed by his lawyer. The lawyer testified, and the plea was set aside. At trial, the same lawyer testified about Suarez’s reaction — how his “ ‘attitude completely changed’ when he heard [an][audio]tape containing his voice.” Id. at 1159. This testimony supported the prosecution’s theory that defendant was involved in secretly recorded meetings involving the charged offenses.
We are somewhat surprised by the result in Suarez, but note that this holding has not been replicated in the Eleventh Circuit or any other federal court in the intervening fifteen years. In any event, Suarez’s two cautionary passages — explaining what issues the court there did not consider — distinguish the case from ours. First, in footnote 3, Suarez explicitly notes that the court did not consider the argument that the waiver of the privilege was limited to the suppression hearing, because counsel had not attempted to limit the scope of the waiver. Id. at 1160 n. 3. While it is not clear to us that counsel is required to utter magic words to demarcate the scope of the waiver, what matters for our purposes is that Suarez simply did not consider the limited waiver argument. Second, in the penultimate paragraph, the Suarez court tells us unequivocally that it did not consider Simmons because that argument had not been timely raised. Id. at 1161. We are reasonably confident that,' had the Suarez court considered these arguments, it would have reached a different conclusion.
D. We turn, finally, to the question of enforcement. As is evident, the narrow waiver rule we adopt today is not self-enforcing. That is to say, unlike the usual situation where those given access to confidential materials have an independent ethical, and perhaps legal, obligation to maintain that confidence (such as the ethical constraints on lawyers, doctors and the clergy), those who are given access to confidential attorney-client materials under our limited waiver rule have no such obligation or incentive. Given this absence of external constraints (external to the case), district courts have the obligation, whenever they permit discovery of attorney-client materials as relevant to the defense of ineffective assistance of counsel claims in habeas cases, to ensure that the party given such access does not disclose these [728]*728materials, except to the extent necessary-in the habeas proceeding, i.e., to ensure that such a party’s actions do not result in a rupture of the privilege.
Fortunately, district courts have ample tools at their disposal to ensure compliance with any limitations they impose on the dissemination of confidential materials. Parties in habeas cases, unlike those in ordinary civil cases, have no right to discovery. Campbell v. Blodgett, 982 F.2d 1356, 1358 (9th Cir.1993) (“[T]here simply is no federal right, constitutional or otherwise, to discovery in habeas proceedings as a general matter.” (citing Harris v. Nelson, 394 U.S. 286, 296, 89 S.Ct. 1082, 22 L.Ed.2d 281 (1969))). In a habeas case, discovery under the Federal Rules of Civil Procedure is available “if, and to the extent that, the judge in the exercise of his discretion and for good cause shown grants leave to do so, but not otherwise.” Rules Governing Section 2254 Cases in the United States District Courts [hereinafter Habeas Rules], Rule 6(a); see Bracy v. Gramley, 520 U.S. 899, 904, 117 S.Ct. 1793, 138 L.Ed.2d 97 (1997). If a district court exercises its discretion to allow such discovery “to the extent that ... good cause [is] shown,” it must ensure compliance with the fairness principle. To that end, it must enter appropriate orders clearly delineating the contours of the limited waiver before the commencement of discovery, and strictly police those limits thereafter.11
* * * * * *
The district court was entirely justified in entering the protective order that is the subject of this appeal; indeed, it would have abused its discretion had it done otherwise. The portion of Anderson v. Calderon, 232 F.3d 1053, that reached a contrary conclusion is overruled. On remand, the district court remains free to modify the order as it deems appropriate to fully protect petitioner’s rights.
AFFIRMED.