¶1*1516John C. Robbins, Poison & Robbins, Birmingham, AL, for appellant.
¶2Shirley Z. Osborne Brown and Yvonne A. Henderson, Asst. Attys. Gen., Montgomery, AL., for appellees.
¶3Before TJOFLAT, Chief Judge, KRAVITCH, Circuit Judge, and CLARK, Senior Circuit Judge.*
¶6Danny Eugene Esslinger, having been convicted on a plea of guilty to a charge of first degree rape, is serving a ninety-nine year sentence in the Alabama prison system. He seeks a writ of habeas corpus, under 28 U.S.C. § 2254, vacating that conviction on the ground, among others, that his court-appointed attorney rendered ineffective assistance in violation of the Sixth and Fourteenth Amendments by failing adequately to investigate his case and advising him to plead guilty.1 Following an evidentiary hearing before a magistrate judge, the district court, adopting the magistrate judgé’s findings and *1517recommendation, denied the writ.2 We conclude that Esslinger’s defense attorney’s performance constituted ineffective assistance of counsel as a matter of law, and, therefore, direct that the writ issue.
¶7I.
¶8A.
¶9On September 8, 1988, Carolyn Marshall reported to the Gadsden, Alabama Police that Esslinger had raped her twelve-year-old daughter at some time during the first week of August 1988. At the time of the alleged rape, Esslinger was living temporarily in Marshall’s residence.3 A week after Marshall went to the police, the alleged victim was examined at the Gadsden Pediatric Clinic. The examining physician found that the victim’s vaginal opening was enlarged and that her hymen was no longer intact. These findings indicated that the victim had engaged in sexual intercourse. There was no evidence other than the victim’s statement, however, that connected Esslinger to the alleged offense.
¶10Esslinger moved out of the Marshall residence in late August, when he found a job in Gadsden.4 In September, he left Gadsden and went to Ohio.5 Meanwhile, on September 8, the day Carolyn Marshall went to the police, a warrant was issued for Esslinger’s arrest — on a charge of first degree rape. The warrant was not executed, however, until January 16,1989, after Esslinger returned to Gadsden to find work.
¶11On February 7, Esslinger appeared in court. Esslinger was indigent and requested the appointment of counsel. The court appointed Stephen E. Harrison to represent him. Esslinger’s bond was set at $25,000. Esslinger, however, was financially unable to post bond and he remained in custody.6
¶12On March 14, 1989, Esslinger was indicted by an Etowah County, Alabama, grand jury for first degree rape, a class A felony. Es-slinger was arraigned in the Circuit Court for Etowah County on March 31, and, with Harrison representing him, entered alternative pleas of not guilty and not guilty by reason of mental disease or defect. Trial was set for April 17, 1989.
¶13The trial was postponed, however, so that Esslinger could undergo a court-ordered forensic evaluation at the Taylor Hardin Secure Medical Facility. On July 13, 1989, the evaluation having been completed,7 the court found Esslinger competent to stand trial and set his trial for August 21, 1989. On that date, Esslinger appeared before Circuit Judge William W. Cardwell, Jr., and, pursuant to a plea agreement with the district attorney’s office, pled guilty to first degree rape. In exchange for the plea, the district attorney agreed to recommend that Esslinger be sentenced to no more than the minimum prison term prescribed for a class A felony. The minimum prison term for a defendant with no previous felony convictions was ten years, see Ala.Code- § 13A-5-6 (1975); with one previous felony conviction the minimum was fifteen years; with two *1518previous felony convictions the minimum was ninety-nine years. See Ala.Code § 13A-5-9(a)(3), (b)(3) (1975) (“Habitual felony offenders”). Esslinger had two prior felony convictions: More than eighteen years earlier, on October 30,1970, Esslinger pled guilty in the Etowah County Circuit Court to two separate forgery offenses; the same day, the court sentenced him to concurrent two-year prison terms, suspended the execution of the sentences, and then placed him on probation for one year.
¶14During the colloquy that ensued between Judge Cardwell and Harrison after Esslinger tendered his plea of guilty, the prosecutor, Howard Keith Pitts, informed the court that Esslinger’s plea agreement called for a sentence no greater than the statutory minimum. Because the length of the minimum term of imprisonment would depend on the extent of Esslinger’s prior felony record, the court asked Harrison whether Esslinger had a prior record. Harrison, who knew that Esslinger had been convicted of forgery in 1970, replied: “I’m not aware of one at this time, your honor.” Given this response, the court then informed Esslinger that the minimum prison term he could receive would be ten years; the maximum term would be life.
¶15Having informed Esslinger as to the prison sentence he could receive, the court proceeded to determine whether Esslinger was tendering his guilty plea knowingly and voluntarily. The court asked Esslinger whether he had committed the offense charged in the indictment; he responded: “The truth, no, but the time wise I will plead guilty to it.” Following this response, the court asked Pitts what the State could prove. Pitts said that the victim would testify that Esslinger forced her to have sexual intercourse, and that the examining physician would testify that the victim exhibited physical characteristics consistent with the victim’s testimony. The court, apparently assuming that Harrison had investigated the case, asked Harrison whether Pitts’ rendition of the State’s case was accurate. Harrison said that it was. At this point, the court accepted Esslinger’s plea and accepted the parties’ plea agreement; if sentenced to prison, Esslinger would receive the minimum sentence the law would allow.
¶16At Pitts’ request, the court ordered a pre-sentence investigation and said that sentencing would take place in thirty days, on September 20. When Harrison stated that he would be asking the court to place Esslinger on probation, the court replied that, because Esslinger was being held in custody, it would hold the sentencing hearing as soon as the probation officer completed the presentence report.8
¶17Sentencing took place, as scheduled. Because the uncontested presentence report revealed that Esslinger had been convicted of forgery twice in 1970, he faced a minimum prison sentence of ninety-nine years or life. (For this reason, apparently, Harrison did not seek probation.) Therefore, the court asked the district attorney, James Hedgs-peth, who was standing in for Pitts, whether, for purposes of parole, ninety-nine year sentences and life sentences were treated differently; Hedgspeth said that they were not.
¶18Harrison realized that Esslinger’s guilty plea had gained him nothing; Esslinger was going to receive the same sentence he would receive had he been found guilty of first degree rape at trial. When the court asked counsel to comment on the sentence that should be imposed, Harrison said that, when Esslinger tendered his plea, he expected that Esslinger would receive some benefit for pleading guilty; he thought that Esslinger had only one prior felony conviction and therefore would be eligible for the minimum fifteen year prison term, if not probation.9
¶19*1519The court did not respond to Harrison’s remark, and proceeded to sentence Esslinger to the minimum prison term the law prescribed: ninety-nine years.
¶20B.
¶21Esslinger did not appeal his conviction or sentence.10 On September 26, 1989, however, six days after he was sentenced, Esslinger filed a pro se motion in the trial court to withdraw his guilty plea and for the appointment of a new attorney;11 Esslinger stated that he pled guilty without understanding the full consequences of his plea, and that this was due in part to Harrison’s incompetence. Judge Cardwell summarily denied the motion the same day. On November 29,1989, again proceeding pro se, Esslinger moved the court for a new trial. In this motion, he elaborated on his claim that Harrison was incompetent, stating, among other things, that Harrison did not properly investigate the case, and that he plead guilty on the basis of the State’s offer of a ten-year sentence. Judge Cardwell summarily denied this motion as well. Esslinger appealed neither of these two dispositions.
¶22On January 10, 1990, Esslinger, appearing pro se, petitioned the trial court pursuant to Temporary Rule 20 of the Alabama Rules of Criminal Procedure to set aside his sentence and guilty plea and to grant him a trial.12 Esslinger’s motion claimed (1) that his guilty plea was involuntary because (a) it had been induced by the State’s promise that his sentence would not exceed ten years in prison, and (b) he did not understand the consequences of his plea; (2) that his confession, i.e., his plea of guilty to the rape charge, had been coerced; (8) that he was denied the right to appeal his conviction; and (4) that Harrison’s performance in representing him had been ineffective because (a) Harrison made a sentence bargain that he should have known the court would not accept, (b) Harrison failed to investigate the case, and (c) Harrison failed to challenge the sufficiency of the State’s evidence.13 The court denied Es-slinger’s Rule 20 petition on February 22, 1990, without holding an evidentiary hearing. In its dispositive order, the court stated that the record of the proceedings in Esslinger’s case demonstrated that Esslinger entered his guilty plea voluntarily and with a full understanding of its consequences, and that Harrison’s performance satisfied the Sixth Amendment.
¶23A copy of the court’s order was mailed to Esslinger on February 22, the day it was entered; according to the case docket entries in the clerk’s office, however, the order was not “served” on Esslinger at his place of confinement until March 8,1990. Under Ala. R.App.P. 4(b), Esslinger had forty-two days to appeal the Rule 20 disposition;14 on April *152017, 1990, Esslinger’s notice of appeal was filed with the clerk of the Circuit Court for Etowah County.15 On April 20, 1990, Judge Cardwell signed a second order denying Es-slinger Rule 20 relief; the order stated: “[A]ll relief prayed for by Petitioner is hereby denied as time for appeal has expired.”16 On May 2,1990, the Alabama Court of Criminal Appeals entered a “Certificate of Dismissal” denying Esslinger’s appeal as untimely.
¶24C.
¶25On August 20, 1990, Esslinger, still proceeding pro se, commenced the present habe-as corpus proceedings in the United States District Court for the Northern District of Alabama. His petition replicated the Rule 20 petition he had presented earlier to the state trial court. The district court referred Es-slinger’s petition to a magistrate judge, who ordered the State to show cause why habeas relief should not be granted. See Rule 4 of the Rules Governing Section 2254 Cases in the United States District Courts.17
¶26The State answered Esslinger’s petition, in conformance with Rule 5 of the Rules Governing Section 2254 Cases in the United States District Courts, on November 7, 1990.18 Representing that “Petitioner has exhausted his State remedies for purposes of federal habeas review and he has not proee-durally defaulted on any of his claims,” the State asked the district court to deny each of Esslinger’s claims on the merits. On February 1,1991, after examining the copies of the state court proceedings that accompanied the State’s answer to Esslinger’s petition and noting that Esslinger’s appeal from the denial of his Rule 20 petition had been dismissed as untimely, the magistrate judge sua sponte ordered Esslinger to show cause for that “procedural default” and any resulting prejudice. In his order, the magistrate judge informed Esslinger that, without such a showing, the court was “precluded from considering the merits of [his petition].”
¶27Esslinger responded with an affidavit. The affidavit was rambling and disorganized, and reflected Esslinger’s lack of a formal education and his unfamiliarity with the law. Taken as a whole, however, the document described a scheme at the Bullock County Correctional Facility, where Esslinger was incarcerated, that effectively denied him access to the courts. According to Esslinger, the inmates in control of the prison law library prevented him from obtaining the materials he needed to prosecute an appeal from Judge Cardwell’s order rejecting his Rule 20 petition because he was unable to pay what they demanded; further, the prison officials charged with overseeing the library operation knew of the scheme and sanctioned it. The State filed no response to Esslinger’s affidavit, and the magistrate judge did not pursue the procedural default issue.
¶28On August 7, 1991, the magistrate judge granted Esslinger’s request for the appointment of counsel; on October 16, 1991, coun*1521sel filed an amended habeas petition that elaborated on the claims presented in Es-slinger’s initial petition.19 With respect to Esslinger’s Sixth Amendment claim, counsel cited several additional grounds for concluding that Harrison had denied Esslinger his right to effective assistance of counsel. On November 19, 1991, the State, responding to Esslinger’s petition as amended, filed a supplemental answer that (1) adopted its answer to Esslinger’s initial petition, including the representation that Esslinger had exhausted his state remedies and had proeedurally defaulted none of his claims in state court, and (2) asserted that the new matters Esslinger raised were barred because he had not presented them to the state trial court in his Rule 20 petition.20
¶29On November 5, 1992, the magistrate judge held an evidentiary hearing on Es-slinger’s petition, as amended. Esslinger, Harrison, Pitts, and Esslinger’s expert witness, a criminal defense attorney, testified. Esslinger testified that he told Harrison from the outset that he was not guilty of the alleged offense. Harrison, however, gave him little hope for an acquittal; he told Es-slinger that he did not know how to defend him, that he had won few jury trials, and that he had rarely won a “sex” case.
¶30Shortly before the case was to go to trial, Harrison told Esslinger that the district attorney had offered a twelve-year prison sentence in exchange for a plea of guilty to first degree rape. Esslinger rejected the offer. The district attorney returned with an offer of a ten-year sentence; Esslinger rejected that offer as well. On the morning the trial was to begin, Harrison told Esslinger that ten years was “the best he could do.” If Esslinger accepted the offer, he would “be out in two and a half to three and a half years.” Convinced that, if the ease went to trial, Harrison would “mak[e] no kind of defense on [Esslinger’s] behalf,” Esslinger decided to plead guilty “to keep from getting what [Esslinger] believed would be a greater sentence.”21
¶31Harrison recalled the events somewhat differently. He testified that, although he waived a preliminary hearing and the opportunity it would have afforded him to discover the prosecution’s ease, he investigated the case as extensively as he thought necessary — he interviewed Marshall, the victim’s mother, twice (but did not interview the victim), spoke with the deputy district attorney, Pitts (but, according to Pitts, did not take advantage of the district attorney’s open-file policy), and interviewed Esslinger. In all, the out-of-court time Harrison spent on the ease amounted to 7.17 hours.
¶32Harrison said that he advised Esslinger to plead guilty because Esslinger had a weak case; it would be the word of a convicted felon against the word of a child. When Esslinger asked him how much time he would have to serve, Harrison told him that, inasmuch as he had one prior felony conviction,22 he would probably have to serve fifteen years. Harrison said that he cautioned Esslinger that, if he had more than one felony conviction, he would be sentenced to prison for life or ninety-nine years. When asked at the habeas hearing whether it was “essential that [he] know[ ] his client’s prior record before entering the plea,” Harrison *1522responded: “Well, you certainly have got an advantage if you know [it] before entering the plea.”
¶33Harrison did not become aware of the extent of Esslinger’s prior record until he read the probation officer’s presentence report, which disclosed Esslinger’s simultaneous convictions and sentences for forgery in 1970 and indicated that Esslinger’s minimum sentence would be imprisonment for life or ninety-nine years. He was not asked at the habeas hearing, however, what advice, if any, he gave Esslinger when he realized what would be in store for Esslinger at the sentencing hearing. Nor was he asked about what, if anything, he said to Esslinger after it became apparent at the sentencing hearing that Esslinger was going to receive no benefit from pleading guilty.
¶34Esslinger’s failure to perfect a timely appeal from Judge Cardwell’s order denying his Rule 20 petition and the effect, if any, that failure should have on Esslinger’s application for federal habeas relief were not raised directly or indirectly either before or during the evidentiary hearing before the magistrate judge.23 Nor was it suggested at any time before or during the hearing that, while his habeas petition was pending and before the two-year period for filing a Rule 20 petition expired, Esslinger should have asked the district court for leave to return to state court to “exhaust” his claims in a second Rule 20 proceeding.24 Rather, Esslinger’s failure to take these procedural steps was not mentioned until the magistrate judge, acting sua sponte, relied on them in his March 16, 1993 report and recommendation to the district court as an alternative basis for denying Esslinger habeas relief on his ineffective assistance' of counsel claim.
¶35In that report, the magistrate judge recommended that the district court reject Es-slinger’s first three claims, as stated in Es-slinger’s amended petition, on the merits.25 As for Esslinger’s fourth claim, however, that Harrison had rendered ineffective assistance of counsel, the magistrate judge suggested alternative grounds for denying habeas relief. The first ground would deny Esslinger relief not on the merits but because of a “procedural default,” namely,- Esslinger’s “failure to exhaust the claims in a [second Rule 20] post-conviction petition filed within two years of his conviction becoming final.” The alternative ground would deny Esslinger’s ineffective assistance claim on the merits.
¶36The magistrate judge described Esslinger’s procedural default of his ineffective assistance of counsel claim as follows. First, Esslinger failed timely to appeal to the Alabama Court of Criminal Appeals Judge Card-well’s denial of his Rule 20 petition, and thus failed to “exhaust” his state court remedies. Second, having failed to exhaust his ineffective assistance of counsel claim, Esslinger could have returned to state court and reasserted that claim in a new Rule 20 petition at any time prior to the expiration of the two-year limitations period on September 20, *15231991.26 Esslinger did not take this step, however, and, when he let the September 20, 1991 filing deadline expire, he preduded the Alabama courts from ruling on his ineffective assistance of counsel claim, thereby committing a procedural default.27 Because Es-slinger had not shown cause for the default and resulting prejudice, the magistrate judge held that Esslinger’s Sixth Amendment claim was barred.
¶37The magistrate judge concluded alternatively that the evidence Esslinger adduced at the hearing on his claims “failed to demonstrate that [Harrison’s] performance was deficient” under the standards established by Strickland v. Washington, 466 U.S. 668, 104 S.Ct. 2052, 80 L.Ed.2d 674 (1984). According to the magistrate judge, Harrison’s investigation into Esslinger’s criminal history was adequate, even though it failed to disclose Es-slinger’s prior felony convictions; therefore, Harrison’s advice, based on that investigation, that Esslinger plead guilty to the first degree rape charge constituted an effective form of representation.
¶38Esslinger’s attorney filed several objections to the magistrate judge’s report.28 In particular, he objected to the magistrate judge’s sua sponte invocation — as an alternative bar to relief on Esslinger’s ineffective assistance claim — of Esslinger’s failure to return to state court with a second Rule 20 petition within the two-year limitation period prescribed by the Rule. Counsel also took issue with the magistrate judge’s determination that Harrison’s performance satisfied the Strickland standards.
¶39On June 11, 1993, the district court issued an order overruling Esslinger’s objections, adopting the magistrate judge’s report and recommendation in full, and dismissing Es-slinger’s petition for federal habeas corpus relief.29 This appeal followed.
¶40II.
¶41Our disposition of this appeal eliminates the necessity of determining whether the district court, in adopting the magistrate judge’s findings of fact and conclusions of law,30 erred in rejecting on the merits the first three claims of Esslinger’s habeas petition as amended. Rather, we only address Esslinger’s Sixth Amendment claim. We *1524consider that claim as it was stated in Es-slinger’s initial habeas petition to the district court, and earlier in his Rule 20 petition to Judge Cardwell.31
¶42There are two questions with respect to this claim for relief. The first asks whether the magistrate judge abused his discretion in sua sponte barring Esslinger’s Sixth Amendment claim (as stated in his initial petition) on a procedural default ground despite the State’s decision not to raise that ground. The second question assumes an affirmative response to the first and asks whether, contrary to the magistrate judge’s determination, Harrison’s performance denied Esslinger his Sixth Amendment right to the effective assistance of counsel.
¶43A.
¶44If this were a routine civil case, rather than a habeas corpus proceeding, we would not hesitate to condemn as a gross abuse of discretion, if not clear error, the trial court’s sua sponte interposition of an affirmative defense that the defendant did not plead, and that the parties did not litigate by consent, after the case had been tried to the court and taken under submission. But this is a habeas corpus case, and in these cases circumstances may counsel that the district court raise sua sponte a procedural bar to relief that the state has “waived.”32 One potential procedural bar to relief is the petitioner’s failure to exhaust state remedies as required by 28 U.S.C. § 2254(b), (c);33 the district court may invoke the bar sua sponte where, notwithstanding the state’s waiver, requiring the petitioner to return to state court to exhaust his claims serves an important federal interest.34 Another potential bar is the petitioner’s failure to comply *1525with a state procedural rule35 — for example, a rule that specifies the time during a criminal prosecution, or collateral proceeding attacking a conviction, that a claim of error must be raised.36
¶45The magistrate judge concluded that Es-slinger’s Sixth Amendment claim was subject to a bar of this latter type — namely, Esslinger’s failure to present that claim to the state courts in a second Rule 20 petition within the two-year limitations period prescribed by Rule 20.2(e). He made this conclusion despite the fact that the State had waived the bar (if, indeed, the bar was applicable under the circumstances) by asserting in its supplemental answer to Esslinger’s amended petition that, with respect to the claims contained in his initial petition, Esslinger had exhausted his state remedies and had not committed any procedural defaults in doing so.37
¶46We, therefore, return to the first question we pose above, although we rephrase it in more specific language: Whether the court’s disregard of the State’s waiver and its imposition of Esslinger’s supposed Rule 20.2(c) “procedural default” as a bar to relief on his ineffective assistance of counsel claim served an important federal interest. We answer that question in the negative: A Rule 20.2(c) procedural default did not occur in this ease; consequently, there could be no federal interest in refusing to entertain Esslinger’s Sixth Amendment claim, as stated in his initial petition, on the merits.
¶47Esslinger did commit a procedural default, however, but it was not the Rule 20.2(c) default the court seized upon; rather, Es-slinger’s default was his failure to take a timely appeal from Judge Cardwell’s February 22, 1990 order denying him Rule 20 relief. Assuming, without deciding, that the magistrate judge’s report, and thus the district court’s decision, can be read as interposing that default as a bar to habeas relief, we reach the same answer: The State waived the default; thus, invoking thé bar would *1526serve no important federal interest. We elaborate on these two answers below.
¶481.
¶49Underlying the magistrate judge’s conclusion that Esslinger could have returned to state court with a second Rule 20 petition— and thus “exhausted” his Sixth Amendment claim — is the erroneous assumption that Judge Cardwell would have entertained the petition on the merits. Had Esslinger filed a second petition, he would have been thrown out on his ear.38 Temporary Ala.R.Crim.P. 20.2(b) (“Successive Petitions”) stated that:
The court shall not grant relief on a second or successive petition on the same or similar grounds on behalf of the same petitioner. A second or successive petition on different grounds shall be denied unless the petitioner shows both that good cause exists why the new ground or grounds were not known or could not have been ascertained through reasonable diligence when the first petition was heard, and that failure to entertain the petition will result in a miscarriage of justice.
¶50Applying the first sentence of the Rule, Judge Cardwell would have dismissed the second petition — without addressing its merits — to the extent that it contained the same claims presented in the first petition. Applying both the first and second sentences of the Rule, Judge Cardwell would have dismissed the second petition — again, without passing on the merits — to the extent that it contained the additional grounds raised in the amendment to Esslinger’s habeas petition, but not presented in Esslinger’s first Rule 20 petition, because the additional grounds constituted “similar grounds” and they were either “known” to Esslinger, or he could have “ascertained [them] through reasonable diligence” at the time he filed his first petition.39
¶51In sum, the magistrate judge’s determination that Esslinger’s failure to return to state court with a second Rule 20 petition deprived the Alabama courts of the opportunity to review his ineffective assistance claim was based on a rank misinterpretation of Alabama law. This misinterpretation resulted in a misapplication of Alabama law by the district court. What federal interest would be served by upholding a district court’s misapplication of a state procedural bar to deny habeas relief? We can think of none. The district court’s invocation of the Rule 20.2(c) procedural bar, therefore, constituted an abuse of discretion.40
¶53Esslinger did commit a procedural default in this case; he failed to perfect a timely appeal from Judge Cardwell’s denial of Rule 20 relief. The magistrate judge correctly took note of this “untimely appeal” default after examining the State’s answer to Esslinger’s initial habeas petition. The record of the state proceedings appended to the answer indicated that Esslinger had appealed Judge Cardwell’s Rule 20 ruling, but that the Court of Criminal Appeals had dismissed the appeal as untimely. Apparently recognizing that Rule 20’s successive petition bar precluded Esslinger from filing another Rule 20 petition seeking the same relief, and that the untimely appeal therefore constituted a procedural default that could preclude federal habeas relief, the magistrate judge, on February 1, 1991, sua sponte ordered Esslinger to show cause for his failure to perfect a timely appeal. The magistrate judge did so notwithstanding the State’s explicit assertion in its answer to Esslinger’s petition that Esslinger had not procedurally defaulted any of his claims (and that they were exhausted).
¶54As noted, Esslinger responded to the show-cause order with an affidavit stating that the inmates in control of the prison law library, with the knowledge and complicity of the prison officials in charge of the facility, had impaired his ability to prosecute a timely appeal from Judge Cardwell’s order. The State stood silent in the face of Esslinger’s allegations, and the magistrate judge did not pursue the matter until, two years later, he issued his report and recommendation to the district court. In his report, he cited Es-slinger’s failure to take a timely appeal to the Court of Criminal Appeals, but he labeled it a failure to exhaust — not a procedural default.41
¶55Whether the district court used Esslinger’s “untimely appeal” default, rather than his Rule 20.2(c) default, as the procedural basis for rejecting Esslinger’s Sixth Amendment claim, our conclusion is the same: The court’s sua sponte invocation of the procedural default to bar relief, despite the State’s waiver, served no important federal interest.
¶56It is, of course, in the federal interest to vindicate, and thus enhance the enforcement of, procedural rules that a state has adopted to ensure the fair and efficient administration of justice. Alabama’s rule denying appellate review to a criminal who takes an untimely appeal obviously serves such a purpose;42 timely appeals speed the correction of errors and hasten the finality of judgments.43 In a given ease, however, the state is in the best position to know whether, in the interest of justice, its rule needs— indeed, deserves — federal court vindication.44*1528Accordingly, when, as here, the state waives a habeas petitioner’s procedural default in failing to obtain appellate review of a claim, the district court should assume that the waiver is justified.
¶57Here, the Attorney General may have concluded that Esslinger's appeal of Judge Cardwell's denial of Rule 20 relief was timely and, therefore, should not have been dismissed. According to the clerk’s office docket sheet for Esslinger’s Rule 20 proceedings, Esslinger received Judge Cardwell’s order dismissing his petition on March 8,1990. He filed his notice of appeal on April 17, 1990. If the forty-two day period for taking an appeal began the day Esslinger was served, his appeal was timely. It is also possible that the Attorney General concluded that the matter of when the appeal period began was an issue to be litigated. In either event, the Attorney General may have decided to avoid the issue by treating Esslinger as having done all that he could do to obtain appellate review of the Rule 20 disposition.
¶58Another possibility is that the Attorney General waived Esslinger’s default because he did not want to litigate the truth of the affidavit Esslinger filed in response to the magistrate judge’s February 1, 1990 order requiring him to show cause for his failure to file his notice of appeal on time. Even if Esslinger failed to establish cause, litigating the issue might have been time consuming, and perhaps embarrassing to the State.
¶59In addition to finding no federal interest served by the magistrate judge’s sua sponte imposition of the procedural default to bar Esslinger’s Sixth Amendment claim, we also find his imposition of the bar disturbingly arbitrary. In his report to the district court, the magistrate judge did not explain why Esslinger’s procedural default applied to bar relief on his Sixth Amendment claim but not on his other claims. All of the claims presented in Esslinger’s initial habeas petition were subject to the same procedural default bar; yet, inexplicably, the court chose to apply the bar only to one claim. We are at a loss to discern a principled reason for sustaining such an arbitrary application of a bar.
¶60Finally, we think it fundamentally unfair for a court sua sponte to invoke a procedural default without giving the petitioner an opportunity to show cause for the default. In this case, the magistrate judge, and the district court, effectively “sandbagged” the petitioner. After receiving Esslinger’s affidavit in reply to his February 1, 1990 order requiring Esslinger to show cause why his claims should not be dismissed because of his failure to obtain appellate review of Judge Cardwell’s Rule 20 ruling, the magistrate judge dropped the matter. In doing so, he lulled Esslinger and his attorney into believing that a procedural default would not be interposed as a bar to relief. Under the circumstances — and given the State’s continuing waiver of the default — basic fairness required the magistrate judge to inform the petitioner prior to the evidentiary hearing of his intention to consider the default as a bar to relief.
¶61In sum, the district court advanced no important federal interest in denying Es-slinger Sixth Amendment relief on a procedural default ground;45 the court’s ruling *1529therefore constituted an abuse of discretion. We now turn to the merits of the claim.
¶62B.
¶63“The benchmark for judging any claim of ineffectiveness must be whether counsel’s conduct so undermined the proper functioning of the adversarial process that the trial cannot be relied on as having produced a just result.” Strickland v. Washington, 466 U.S. 668, 686, 104 S.Ct. 2052, 2064, 80 L.Ed.2d 674 (1984).
A convicted defendant’s claim that counsel’s assistance was so defective as to require reversal of a conviction or death sentence has two components. First, the defendant must show that counsel’s performance was deficient. This requires showing that counsel made errors so serious that counsel was not functioning as the “counsel” guaranteed the defendant by the Sixth Amendment. Second, the defendant must show that the deficient performance prejudiced the defense. This requires showing that counsel’s errors were so serious as to deprive the defendant of a fair trial, a trial whose result is reliable.
¶64Id. at 687, 104 S.Ct. at 2064. In the guilty plea context, to establish prejudice “the defendant must show that there is a reasonable probability that, but for counsel’s errors, he would not have pleaded guilty and would have insisted on going to trial.” Hill v. Lockhart, 474 U.S. 52, 59, 106 S.Ct. 366, 370, 88 L.Ed.2d 203 (1985).
¶65The transcript of the hearings at which Esslinger pled guilty and was sentenced, augmented by the transcript of the evidentiary hearing before the magistrate judge, demonstrates that Esslinger satisfied both prongs of the Strickland test as a matter of law. It is undisputed that, at the time of Esslinger’s plea, Harrison did not know the full extent of Esslinger’s criminal record; he thought that Esslinger had been convicted of forgery once, whereas Esslinger had been ■ convicted twice.46 The magistrate judge, in his report and recommendation, blamed Es-slinger for Harrison’s lack of information.47 Harrison, however, did not rely on Esslinger for the truth about his prior criminal record. As Harrison testified at the evidentiary hearing before the magistrate judge, he customarily placed no significance on defendants’ representations regarding their prior records because such representations were usually unreliable. In most eases, to ascertain a client’s criminal record, Harrison cheeked with the district attorney’s office and the court’s probation office. In Esslinger’s ease he learned nothing from the district attorney’s office; evidently Esslinger’s forgery convictions, being nineteen years old, were not in the “NCIC” computer. Harrison knew, however, that Esslinger had at least one prior felony conviction. Nonetheless, he did not inquire of the probation office as was his custom; had he done so, he would have learned of Esslinger’s two 1970 forgery convictions and could have negotiated a guilty plea to a reduced charge. According to Pitts, given the weaknesses in the State’s case,48 he would have been willing to negotiate a plea to a reduced charge had he known that Esslinger had two prior felony convictions and, therefore, faced a mandatory ninety-nine year or life sentence. As Pitts explained, had Esslinger understood the full consequences of the “deal” Harrison had *1530made — a plea of guilty to first degree rape in exchange for the minimum sentence the law would allow, a mandatory prison sentence of ninety-nine years or life — Esslinger would have known that he had “nothing to gain by pleading [guilty], nothing to lose by going to trial.” According to Pitts, a plea to a lesser-ineluded offense would have carried a maximum penalty “somewhere in the range of twenty-five, thirty years.”
¶66During the court-counsel colloquy that took place after Esslinger tendered his plea of guilty to first degree rape, Judge Card-well, in explaining the possible sentence that Esslinger would face if the court accepted his plea, asked Harrison whether Esslinger had a prior felony record. Harrison replied that “I’m not aware of one at this time.” We can only speculate as to what would have transpired had Harrison been candid with the court and revealed that Esslinger had told him that he had a felony record. For all we know, as a result of the ensuing dialogue, the plea bargain may have unravelled, and the hearing continued so that Harrison, and Pitts as well, could make the inquiries necessary to ascertain accurately Esslinger’s criminal record.
¶67Harrison’s conduct in this case — specifically, in inducing his client to enter a blind guilty plea to a Class A felony which was subject to an enhanced penalty under Alabama’s Habitual Offender Act — is simply unexcusable. We do not hold that an attorney who recommends a blind plea inherently fails to perform as required by the Sixth Amendment. We merely say that under the circumstances present in this case, in which there is “a reasonable probability that ... [Esslinger] would not have pleaded guilty [to first degree rape] and would have insisted on going to trial,” Hill, 474 U.S. at 59, 106 S.Ct. at 370, counsel’s recommendation that his client enter a blind guilty plea constituted ineffective assistance of counsel.
¶68In fine, Esslinger has satisfied both prongs of the Strickland test: Harrison provided him with representation clearly insufficient to protect his right to counsel under the Sixth and Fourteenth Amendments and, but for that representation, he would not have pled guilty to first degree rape.
¶69III.
¶70The judgment of the district court is therefore REVERSED. The case is REMANDED with the instruction that the writ issue.
¶71IT IS SO ORDERED.