
    David J. OAKES, Petitioner, Appellant, v. UNITED STATES of America, Respondent, Appellee.
    No. 02-2640.
    United States Court of Appeals, First Circuit.
    Heard Feb. 8, 2005.
    Decided March 16, 2005.
    
      James H. Feldman, Jr., with whom Alan Ellis, Peter Goldberger, and Law Offices of Alan Ellis were on brief, for appellant.
    F. Mark Terison, Assistant United States Attorney (Senior Litigation Counsel), with whom Paula D. Silsby, United States Attorney, was on brief, for appellee.
    Before SELYA, Circuit Judge, STAHL, Senior Circuit Judge, and LYNCH, Circuit Judge.
   SELYA, Circuit Judge.

Petitioner-appellant David J. Oakes, a person incarcerated by reason of a previous conviction on federal child pornography charges, appeals from the dismissal of his petition to vacate his conviction and sentence. The district court based its decision on procedural default even though the government had failed to raise that defense in its response to Oakes’s petition. In a challenge that frames a question of first impression in this circuit, Oakes now posits, inter alia, that the district court lacked the authority to interject the question of procedural default into the case sua sponte. Although we reject that premise, we nonetheless vacate the judgment below because the court failed to give Oakes either notice of its intention to consider the previously unraised issue or an opportunity to be heard on that issue before dismissing his petition.

We briefly rehearse the background. In July of 2000, police officers executed a search warrant and discovered approximately 45,000 images of what appeared to be child pornography in Oakes’s computer files. The next month, a federal grand jury charged him with one count of knowingly receiving child pornography and one count of knowingly possessing child pornography. See 18 U.S.C. § 2252A(a)(2)(A) & (5)(B). Oakes eventually entered a guilty plea to the first of these counts and, on July 19, 2001, the district court sentenced him to a 54-month incarcerative term.

Oakes appealed solely on sentence-related grounds. During the pendency of that appeal, the Supreme Court decided Ashcroft v. Free Speech Coalition, 535 U.S. 234, 122 S.Ct. 1389, 152 L.Ed.2d 403 (2002). That decision held unconstitutional under the First Amendment the Child Pornography Prevention Act of 1996 (CPPA), insofar as it prohibited virtual pornographic images (i.e., images that were created without using actual children). See id. at 251-56, 122 S.Ct. 1389. The CPPA encompassed the statute of conviction in Oakes’s case and, six days after the decision in Free Speech Coalition, Oakes filed in the district court a pro se petition to vacate his conviction and sentence pursuant to the federal habeas statute, 28 U.S.C. § 2255.

On April 26, 2002, Oakes filed a supporting memorandum that crystallized his argument. In it, he asserted that his conviction and sentence should be vacated because his guilty plea had been neither knowing nor voluntary. He based this assertion on a claim that he did not understand, at the time he pleaded guilty, that the government would have to prove that the images 'in his possession depicted actual children. Anticipating what seemed a likely government rejoinder, he also argued that his failure to challenge his guilty plea on direct appeal should be excused as the possibility of mounting a challenge based on the unconstitutionality of the CPPA was not knowable at the time of that appeal.

The district court referred Oakes’s petition to a magistrate judge, see Fed R. Civ. P. 72(b), who recommended that it be dismissed without prejudice due to the pendency of Oakes’s direct appeal. See, e.g., United States v. Gordon, 634 F.2d 638, 638 (1st Cir.1980) (holding that “the orderly administration of criminal justice precludes a district court from considering a § 2255 motion while review of the direct appeal is still pending”) (citations and internal quotation marks omitted). Oakes objected, thus bringing the matter before the district court for de novo review. See Fed.R.Civ.P. 72(b). The court sensibly appointed counsel for Oakes and directed the government to reply to the petition. In its reply, the government did not raise a defense of procedural default; it argued only that Free Speech Coalition was inapposite to Oakes’s case.

On October 4, 2002, this court rejected the petitioner’s direct appeal, see United States v. Oakes, 47 Fed.Appx. 5, 6 (1st Cir.2002) (per curiam), thus removing the sequencing obstacle that had concerned the magistrate judge. A few weeks later, the district court took up the habeas petition, raised sua sponte the question of procedural default, and denied relief on that basis. United States v. Oakes, 224 F.Supp.2d 296, 298 (D.Me.2002). In the course of its ruling, the court discussed and discarded two possible avenues for avoiding the usual consequences of procedural default, namely, (i) cause and prejudice (including the argument preemptively raised in the petition), and (ii) actual innocence. Id. at 300-02. Oakes was not afforded an opportunity to address either avenue.

Oakes unsuccessfully sought to have the district court issue a certificate of appealability. See 28 U.S.C. § 2253(c)(1); 1st Cir. R. 22(b)(1). He then repaired to this court in search of such a certificate. We obliged, limiting review .to “[wjhether the district court [had] erred in denying petitioner’s 28 U.S.C. § 2255 motion on the ground of procedural default.” This timely appeal followed.

It is a bedrock principle that, under ordinary circumstances, the- volun-tariness of a guilty plea can be questioned on collateral review under 28 U.S.C. § 2255 only if, and to the extent that, the plea has been challenged on direct appeal. Bousley v. United States, 523 U.S. 614, 621, 118 S.Ct. 1604, 140 L.Ed.2d 828 (1998). If a federal habeas petitioner challenges his conviction or sentence on a ground that he did not advance on direct appeal, his claim is deemed proeedurally defaulted. Id.

A'procedural default is not necessarily a'total bar to federal habeas relief. Notwithstanding such a default, a federal habeas petition will be allowed to go forward if the petitioner can show either (i) that there is cause for the default and actual prejudice resulting from it, or (ii) that he is actually innocent of the offense of conviction. See id. at 622-23, 118 S.Ct. 1604; Derman v. United States, 298 F.3d 34, 45 (1st Cir.2002). Before ús, the petitioner does not dispute the default, but, rather, challenges both the district court’s ability to invoke the doctrine of procedural default sua sponte and the court’s treatment of the two avenues that have the potential to offset his procedural default.

Oakes’s first assignment of error has several dimensions. He begins with the proposition that procedural default is an affirmative defense and that, therefore, the government may lose the defense by neglecting to raise it in a response to a habeas petition. That is a correct statement of the law. See, e.g., Howard v. United States, 374 F.3d 1068, 1073 (11th Cir.2004); Doe v. United States, 51 F.3d 693, 698-99 (7th Cir.1995); cf. Trest v. Cain, 522 U.S. 87, 89, 118 S.Ct. 478, 139 L.Ed.2d 444 (1997) (holding, under 28 U.S.C. § 2254, that “procedural default is normally a defense that the State is obligated to raise” (citation and internal quotation marks omitted)). Building on this foundation, Oakes urges us to find that allowing the district court to “choose sides” by spontaneously curing the government’s omission would undermine the adversarial system.

This exhortation presents a question of first impression in this circuit. There are, however, straws in the wind. In the related context of habeas appeals from state convictions under 28 U.S.C. § 2254, we have sanctioned the practice of district courts raising issues of procedural default sua sponte. See, e.g., Brewer v. Marshall, 119 F.3d 993, 999 (1st Cir.1997). Other courts of appeals have agreed that a district court has discretion to raise the issue of procedural default sua sponte in the section 2254 milieu. See, e.g., Sweger v. Chesney, 294 F.3d 506, 520-21 (3d Cir.2002); Yeatts v. Angelone, 166 F.3d 255, 261 (4th Cir.1999); Burgin v. Broglin, 900 F.2d 990, 997-98 (7th Cir.1990).

Oakes labors to distinguish between the two contexts by pointing out that, in permitting district courts to raise procedural default sua sponte in section 2254 cases, courts have commented that doing so assuages federal-state comity concerns. See, e.g., Sweger, 294 F.3d at 521; Yeatts, 166 F.3d at 261; Ortiz v. Dubois, 19 F.3d 708, 714-15 (1st Cir.1994). In that sense, section 2254 offers more fertile soil for sua sponte recognition of procedural default. Even so, the section 2254 cases furnish some support for allowing district courts, in section 2255 cases, to raise issues of procedural default sua sponte. We explain briefly.

In regard to section 2254, courts also have noted that allowing sua sponte recognition of procedural defaults serves a second interest: the federal courts’ interest in husbanding, and efficiently allocating, scarce judicial resources. See Sweger, 294 F.3d at 521; Yeatts, 166 F.3d at 261; Ortiz, 19 F.3d at 715; see also Hardiman v. Reynolds, 971 F.2d 500, 502-03 (10th Cir.1992). That interest is equally compelling in section 2255 cases. And the praxis, in both sets of cases, implicates the federal courts’ interest in finality. Cf. Andiarena v. Untied States, 967 F.2d 715, 717 (1st Cir.1992) (per curiam) (rejecting any distinction between section 2254 and section 2255 in “abuse of the writ” cases and noting that while section 2254 abuse of the writ jurisprudence has its roots in comity and federalism, “the central concern underlying [that jurisprudence] — the importance of promoting finality in the criminal arena — is not confined to state prisoners”). That is a matter of great import because “[ijnroads on the concept of finality tend to undermine confidence in the integrity of our procedures.” Hines v. Untied States, 971 F.2d 506, 508 (10th Cir.1992) (quoting United States v. Addonizio, 442 U.S. 178, 184 n. 11, 99 S.Ct. 2235, 60 L.Ed.2d 805 (1979)). We previously have recognized the strong interest in finality served by section 2255’s procedural default rule. See Prou v. Untied States, 199 F.3d 37, 47 (1st Cir.1999); United States v. Barrett, 178 F.3d 34, 38 (1st Cir.1999). That interest, is heightened in the circumstances of this case. See Bousley, 523 U.S. at 621, 118 S.Ct. 1604 (noting that the “concern with finality served by the limitation on collateral attack has special'force with respect to convictions based on guilty pleas”) (quoting United States v. Timmreck, 441 U.S. 780, 784, 99 S.Ct. 2085, 60 L.Ed.2d 634 (1979)).

We add, moreover, that the articulation of the procedural default rule in state ha-beas cases under section 2254 is similar to that in federal habeas cases under section 2255. In both instances, the rule holds that if a person in custody has cut himself off from otherwise-available remedies on a particular matter due to his own procedural default, that default constitutes an independent and adequate ground sufficient to foreclose federal habeas review of the alleged error. Ortiz, 19 F.3d at 714 (citing Wainwright v. Sykes, 433 U.S. 72, 87, 97 S.Ct. 2497, 53 L.Ed.2d 594 (1977)); accord Derman, 298 F.3d at 44 & n. 5 (noting that the Supreme Court has extended Wainwright’s “general rule that a criminal defendant must seasonably advance an objection to a potential constitutional infirmity in order to preserve the point for collateral attack” to the section 2255 context) (citing Bousley, 523 U.S. at 622, 118 S.Ct. 1604); see generally 3 Charles Alan Wright et al., Federal Practice and Procedure § 596.1 (3d ed.2004); 17A id. §§ 4266-4266.1 (2d ed.1988). So viewed, the rule has the salutary effect of preventing criminal defendants from using collateral review as a painless surrogate for direct appellate review. See Bousley, 523 U.S. at 621, 118 S.Ct. 1604 (discussing procedural default in the section 2255 context); Reed v. Farley, 512 U.S. 339, 354, 114 S.Ct. 2291, 129 L.Ed.2d 277 (1994) (discussing procedural default in the section 2254 context).

To sum up, judicial economy and finality, like comity, are institutional values that transcend the litigants’ parochial interests. Where such values are in play, the court should have some say in deciding whether a defense should be considered or deemed waived. Cf. Hardiman, 971 F.2d at 503 (“Unless the state' procedural bar defense can be raised sua sponte, a state that fails to raise that defense can effectively force a federal court to review the merits of a case that may be simpler to decide on procedural grounds.”). Preventing the facile use of a habeas petition as a substitute for a direct appeal can best be accomplished If district courts have the discretion to enforce the procedural default rule even though the government (federal or state) turns a blind eye. Consequently, we hold that a district court has the discretion, in a section 2255 case, to raise questions of procedural default sua sponte, even when the government has filed a reply and eschewed any reference to that defense. This holding is consistent with the position adopted by the two other courts of appeals that have addressed this matter to date. See United States v. Willis, 273 F.3d 592, 596-97 (5th Cir.2001); Hines, 971 F.2d at 508-09; cf. Femia v. United States, 47 F.3d 519, 523 (2d Cir.1995) (relying on the interests of judicial economy and finality in allowing district court to dismiss section 2255 petition sua sponte on the procedural ground of abuse of the writ); United States v. Fallon, 992 F.2d 212, 213 (8th Cir.1993) (same).

This holding does not end our inquiry. Oakes argues persuasively that he should not have been required to be prescient. He says that he had no duty to anticipate potential affirmative defenses, but, rather, was entitled to wait and address such defenses when and if they were raised. Thus, even if the district court acted within the realm of its discretion in bringing up the issue of procedural, default sua sponte — and we have held that it did — he (Oakes) should have been given notice of the court’s intention and afforded an opportunity to respond.,

We think that this position is well-taken. The ubiquity of the “notice and opportunity to be heard”' principle as a matter of fundamental fairness is deeply engrained in our jurisprudence. See Cleveland Bd. of Educ. v. Loudermill, 470 U.S. 532, 542, 105 S.Ct. 1487, 84 L.Ed.2d 494 (1985) (stating that notice and an opportunity to be heard together comprise an “essential principle of due process”); Earle v. McVeigh, 91 U.S.(1 Otto) 503, 504, 23 L.Ed. 398 (1875) (citing the “well-known legal maxim, that no one, shall be condemned in his person or property without notice, and an opportunity to be heard in his defence”). That this principle applies in the context of the procedural default defense cannot be gainsaid. See, e.g., Willis, 273 F.3d at 597; Boyd v. Thompson, 147 F.3d 1124, 1128 (9th Cir.1998); Hines, 971 F.2d at 509; Hardiman, 971 F.2d at 505. This is as it should be; procedural default is an affirmative defense, and a plaintiff generally is not required to negate an affirmative defense unless and until the defendant has placed it in issue. See, e.g., Gomez v. Toledo, 446 U.S. 635, 640, 100 S.Ct. 1920, 64 L.Ed.2d 572 (1980); Tregenza v. Great Am. Communications Co., 12 F.3d 717, 718 (7th Cir.1993). That rule applies foursquare in habeas cases — and particularly so in cases involving pro se petitioners. See, e.g., Hill v. Braxton, 277 F.3d 701, 706 (4th Cir.2002).

In this instance, the district court directed the government to reply to the petition. Its response omitted any mention of procedural default. At that juncture, Oakes was entitled to assume that the defense was by the boards and the fact that he had preemptively addressed the defense in his original pro se petition does not alter this entitlement. For one thing, once the government chose to eschew the defense despite the petition’s explicit reference to it, Oakes had even more cause than usual to assume that the issue was out of the case. Cf. Lewis v. Sternes, 390 F.3d 1019, 1029 (7th Cir.2004) (noting that government’s specific failure to raise procedural default after it has been mentioned elsewhere in pleadings may raise an inference of intentional waiver). For another thing, the petitioner’s preemptive thrust did not exhaust the compendium of his possible answers to a procedural default defense. Had he been made aware that the issue was live, he could have mustered all of his arguments in response. Cf. Bousley, 523 U.S. at 623, 118 S.Ct. 1604 (finding it “appropriate” to permit a habeas petitioner to raise an actual innocence claim for the first time on remand even though he had not raised the claim in his initial petition).

To be sure, despite the government’s nonchalance the district court lawfully exercised its discretion in choosing to resurrect the procedural default issue. At that point, however, the court should have given the petitioner notice of its intention and afforded him an opportunity to respond before dismissing the petition. See Lugo v. Keane, 15 F.3d 29, 30 (2d Cir.1994) (per curiam) (“No principle is more fundamental to our system of judicial administration than that a person is entitled to notice before adverse judicial action is taken against him.”); cf. Berkovitz v. Home Box Office, Inc., 89 F.3d 24, 29 (1st Cir.1996) (enforcing, in the sna sponte summary judgment context, a requirement of notice and an opportunity to be heard).

In some circumstances, such an error might be harmless. That would be true if, say, a petitioner admittedly could not demonstrate either cause and prejudice or actual innocence. Cf. Lattab v. Ashcroft, 384 F.3d 8, 20-21 & n. 6 (1st Cir.2004) (noting that claim of lack of due process need not be adjudicated when, in all events, petitioner’s admissions conclusively showed a lack of any prejudice). But this is not such a case. We explain briefly.

While Oakes does not challenge the district court’s holding that the supposed “unavailability” of a First Amendment defense does not constitute cause for his procedural default, see supra note 1, he does advance two other theories on which the default might be excused. First, he proffers a claim of actual innocence. Although the district court did state that it believed Oakes would not be able to successfully raise such a claim, Oakes, 224 F.Supp.2d at 302 n. 8, it hardly can fault the petitioner for failing to flesh out a winning “actual innocence” argument when it deprived him both of notice that such an argument would be necessary and of an opportunity to develop it.

The petitioner also insinuates that he has another possible ground for cause: ineffective assistance of counsel. In this regard, he notes that the Supreme Court decided Free Speech Coalition while briefing was still ongoing in his direct appeal. Building on this foundation, he suggests that counsel’s failure to raise the First Amendment argument during that proceeding constituted substandard performance that redounded to his detriment. Ineffective assistance of counsel, if proved, would constitute cause for excusing. the procedural default. Murray v. Carrier, 477 U.S. 478, 488, 106 S.Ct. 2639, 91 L.Ed.2d 397 (1986); Prou, 199 F.3d at 47. Here too, however, Oakes was not given notice, and a fair chance to make that case.

We need go no further. Because the lower court failed to afford Oakes either notice of its intention to rely upon his procedural default or an opportunity to respond to that issue, we must vacate the judgment and remand the case for further proceedings consistent with this opinion. In that respect, we hold only that Oakes should have a fair opportunity to show why his petition is not barred by procedural default. We take no view either of his claim of actual innocence or of his claim of ineffective assistance of counsel.

Vacated and remanded. 
      
      . To this end, the district court noted that, at the time of the petitioner's sentencing, the First Amendment argument that the Supreme Court would later accept in Free Speech Coalition already had been made and rejected in this circuit. See Oakes, 224 F.Supp.2d at 300-01 (citing United States v. Hilton, 167 F.3d 61, 73 (1st Cir.1999)). Thus, such an argument was available — and the fact that it may have seemed futile did not excuse the default. Id. at 301.
     
      
      . We emphasize that this authority is discretionary and that a district court, if it so elects, may choose to hold the government to its waiver. See Hines, 971 F.2d at 509; cf. Trest, 522 U.S. at 89, 118 S.Ct. 478 (noting, in a section 2254 case, that a "court of appeals is not required to raise the issue of procedural default sua sponte ").
     
      
      . We note that the district court found that Oakes failed to raise actual innocence in his pro se petition. Oakes, 224 F.Supp.2d at 302. Whether or not he raised the point is hotly contested but, in the last analysis, is beside the point. After all, Oakes was not under an obligation to meet a charge of procedural default unless and until such a charge was levied (either by the government or by the district-court). ,
     