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,
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.
*95
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,
On October 4, 2002, this court rejected the petitioner’s direct appeal,
see United States v. Oakes,
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,
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,
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,
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,
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,
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,
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,
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,
*98 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,
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,
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,
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,
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.
3
Although the district court did state that it believed Oakes would not be able to successfully raise such a claim,
Oakes,
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,
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.
Notes
. 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,
. 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,
. We note that the district court found that Oakes failed to raise actual innocence in his pro se petition.
Oakes,
