Justice O’Connor
delivered the opinion of the Court, except as to Parts III-B and III-C.
For the second time this Term, we are faced with the question whether federal posteonviction relief is available when a prisoner challenges a current sentence on the ground that it was enhanced based'on an allegedly unconstitutional prior conviction for which the petitioner is no longer in custody. In Daniels v. United States, ante, p. 374, we held that such relief is generally not available to a federal prisoner through a motion to vacate the sentence under 28 U.S. C. §2255 (1994 ed., Supp. V), but left open the possibility that relief might be appropriate in rare circumstances. We now hold that relief is similarly unavailable to state prisoners through a petition for a writ of habeas corpus under 28 U. S. C. §2254 (1994 ed. and Supp. V).
I
Respondent Edward R. Coss, Jr., has an extensive criminal record. By the age of 16, he had been adjudged a juvenile delinquent on five separate occasions for offenses including theft, disorderly conduct, assault, and burglary. See Record Doc. No. 101 (PI. Exh. 5, pp. 4-6). By the time he turned 23, Coss had been convicted in adult court of assault, institutional vandalism, criminal mischief, disorderly conduct, and possession of a controlled substance. See id., at 6-7. His record also reveals arrests for assault, making terroristic threats, delivery of controlled substances, reckless endangerment, disorderly conduct, resisting arrest, retail theft, and criminal conspiracy, although each of those charges was later dropped. See ibid. A report generated by the Lacka-wanna County Adult Probation Office sums up the “one consistent factor in this defendant’s life: criminal behavior, much of it being aggressive.” Id., at 8.
This case revolves around two of the many entries on Coss’ criminal record. In October 1986, Coss was convicted in Pennsylvania state court of simple assault, institutional vandalism, and criminal mischief. He was then sentenced to two consecutive prison terms of six months to one year. He did not file a direct appeal. See App. 54a; see also Tr. of Oral Arg. 28-29.
In June 1987, Coss filed a petition for relief from the 1986 convictions under the Pennsylvania Post Conviction Relief Act, 42 Pa. Cons. Stat. § 9541 et seq. (1998), alleging that his trial attorney had been constitutionally ineffective. See App. 50a-53a. The Lackawanna County Court of Common Pleas promptly appointed counsel for Coss, id., at 57a, and the district attorney filed an answer to the petition, id., at 59a. The court, however, took no further action on the petition for the remainder of Coss’ time in custody. Indeed, it appears that Coss’ state postconviction petition has now been pending for almost 14 years, and has never been the subject of a judicial ruling. Neither petitioners nor respondent is able to explain this lapse. Tr. of Oral Arg. 4,29.
In 1990, after he had served the full sentences for his 1986 convictions, Coss was again convicted in Pennsylvania state court, this time of aggravated assault. He was sentenced to 6 to 12 years in prison, but successfully challenged this sentence on direct appeal because of a possible inaccuracy in the presentence report. App. 62a.
On remand, the court’s first task was to determine the range of sentences for which Coss was eligible. In calculating Coss’ “prior record score” — one of two determinants of the applicable sentencing range, see 42 Pa. Cons. Stat. § 9721 (1998) (reproducing 204 Pa. Code § 803.9(a) (1998)) — the new presentence report took account of Coss’ most serious juvenile adjudication and Coss’ 1986 misdemeanor convictions, counting the latter as separate offenses. See Record Doc. No. 101 (PI. Exh. 3, at 10). Coss objected, claiming that his 1986 convictions should be counted as one misdemeanor offense because they arose from the same transaction. See ibid. (PI. Exh. 5, at 3-4). The trial court sustained Coss’ objection, finding that the convictions should be “viewfed]... as being one transaction, one incident, one conviction.” Id., at 5. Under the Pennsylvania Sentencing Guidelines, one prior misdemeanor does not affect the prior record score. See id., at 10 (displaying grid for calculating prior record score). Thus, the practical effect of the court’s decision was to eliminate the 1986 convictions from Coss’ prior record score entirely. See ibid.; see also 204 F. 3d 453, 467-468 (CA3 2000) (en banc) (Nygaard, J., dissenting). Consequently, Coss’ 1986 convictions played no part in determining the range of sentences to which Coss was exposed.
The court’s next task was to choose a sentence within that range. In doing so, the trial court considered a number of factors, including “the seriousness and nature of the crime involved here, the well being and protection of the people who live in our community, your criminal disposition, your prior criminal record, the possibility of your rehabilitation, and the testimony that I’ve heard.” Record Doc. No. 101 (PI. Exh. 3, at 26). The court concluded that “it’s indicative that from your actions that you will continue to break the law unless given a period of incarceration.” Ibid. The court then reimposed a 6 to 12 year sentence. Because Coss’ 1986 convictions are a part of his prior criminal record, the Court of Appeals concluded that the state court took those convictions “into consideration” in sentencing Coss. See 204 P. 3d, at 459.
In September 1994, Coss filed a petition for a writ of ha-beas corpus under 28 U. S. C. § 2254 in the United States District Court for the Middle District of Pennsylvania. That provision, a postconviction remedy in federal court for state prisoners, provides that a writ of habeas corpus is available to “a person in custody pursuant to the judgment of a State court” if that person “is in custody in violation of the Constitution or laws or treaties of the United States.” § 2254(a). In his petition, Coss contended that his 1986 assault conviction was the product of ineffective assistance of counsel. App. 73a-74a.
In answer to Coss’ §2254 petition, the Lackawanna County District Attorney argued that the District Court could not review the constitutionality of Coss’ 1986 convictions because Coss was no longer in custody on those convictions. Record Doe. No. 55, p. 2. The district attorney, however, indicated his understanding that the crux of Coss’ claim was that his 1986 convictions “may have impact [sic] upon the sentences which have been imposed... upon [Coss] for criminal convictions rendered against him” for his 1990 convictions. Ibid. See also Brief for Petitioners 4 (“[Respondent argues that the sentence for his 1990 conviction was adversely and unconstitutionally affected by the 1986 simple assault conviction”).
The District Court stated that Coss was arguing “that his current sentence [for the 1990 conviction] was adversely affected by the 1986 convictions because the sentencing judge considered these allegedly unconstitutional convictions in computing Goss’s present sentence.” App. to Pet. for Cert. 105a-106a. Finding that “the sentencing judge... did make reference to the 1986 convictions in sentencing Coss,” id., at 107a, the court held that it could properly exercise jurisdiction under §2264, id., at 108a; see also Record Doc. No. 87, p. 3, n. 2. After an evidentiary hearing, the court denied the petition, holding that Coss’ 1986 trial counsel had been ineffective, but that Coss had not been prejudiced by the ineffectiveness. App. to Pet. for Cert. 113a, 116a, 120a.
The Court of Appeals for the Third Circuit, sitting en bane, agreed that “the sentencing court for the 1990 conviction took into consideration [Coss’ 1986] eonviction[s],” and therefore that the District Court had jurisdiction over Coss’ § 2254 petition. 204 F. 3d, at 459. Citing Circuit precedent and our decisions in Maleng v. Cook, 490 U.S. 488 (1989) (per curiam), and United States v. Tucker, 404 U.S. 443 (1972), the court concluded that §2254 provided a remedy for “an allegedly unconstitutional conviction, even if [the § 2254 petitioner] has served in entirety the sentence resulting from the conviction, if that conviction had an effect on a present sentence.” 204 F. 3d, at 459-460.
The court then found that Coss had received ineffective assistance during his 1986 trial, and that there was “a reasonable probability” that but for the ineffective assistance, Coss “would not have been found guilty of assau[lt].” Id., at 462. The court remanded the case to the District Court, ordering that the Commonwealth be allowed either to retry Coss for the 1986 assault or to resentence him for the 1990 assault without consideration of the 1986 conviction. Id., at 467.
We granted certiorari to consider the threshold question that the District Court and Court of Appeals both resolved in Coss’ favor: whether §2254 provides a remedy where a current sentence was enhanced on the basis of an allegedly unconstitutional prior conviction for which the sentence has fully expired. 531 U. S. 923 (2000).
HH t — (
A
The first showing a § 2254 petitioner must make is that he is “in custody pursuant to the judgment of a State court.” 28 U. S. C. § 2254(a). In Maleng v. Cook, supra, we considered a situation quite similar to the one presented here. In that case, the respondent had filed a § 2254 petition listing as the “‘conviction under attack’” a 1958 state conviction for which he had already served the entirety of his sentence. 490 U. S., at 489-490. He also alleged that the 1958 conviction had been “used illegally to enhance his 1978 state sentences” which he had not yet begun to serve because he was at that time in federal custody on an unrelated matter. Ibid. We determined that the respondent was “in custody” on his 1978 sentences because the State had lodged a detainer against him with the federal authorities. Id., at 493.
We held that the respondent was not “in custody” on his 1958 conviction merely because that conviction had been used to enhance a subsequent sentence. Id., at 492. We acknowledged, however, that because his §2254 petition “[could] be read as asserting a challenge to the 1978 sentences, as enhanced by the allegedly invalid prior conviction, ... respondent... satisfied the ‘in custody' requirement for federal habeas jurisdiction.” Id., at 493-494.
Similarly, Coss is no longer serving the sentences imposed pursuant to his 1986 convictions, and therefore cannot bring a federal habeas petition directed solely at those convictions. Coss is, however, currently serving the sentence for his 1990 conviction. Like the respondent in Maleng, Coss’ §2254 petition can be (and has been) construed as “asserting a challenge to the [1990] sentence], as enhanced by the allegedly invalid prior [1986] conviction.” Id., at 493. See also supra, at 399-400. Accordingly, Goss satisfies §2254’s “in custody” requirement. Cf. Daniels, ante, at 383, 384, n. 2 (stating that the text of §2255, which also contains an “in custody” requirement, is broad enough to cover a claim that a current sentence enhanced by an allegedly unconstitutional prior conviction violates due process).
B
More important for our purposes here is the question we explicitly left unanswered in Maleng: “the extent to which the [prior expired] conviction itself may be subject to challenge in the attack upon the [current] sentence] which it was used to enhance.” 490 U. S., at 494. We encountered this same question in the §2255 context in Daniels v. United States, ante, p. 374. We held there that “[i]f ... a prior conviction used to enhance a federal sentence is no longer open to direct or collateral attack in its own right because the defendant failed to pursue those remedies while they were available (or because the defendant did so unsuccessfully), then that defendant... may not collaterally attack his prior conviction through a motion under §2255.” Ante, at 382. We now extend this holding to cover §2254 petitions directed at enhanced state sentences.
We grounded our holding in Daniels on considerations relating to the need for finality of convictions and ease of administration. Those concerns are equally present in the §2254 context. The first and most compelling interest is in the finality of convictions. Once a judgment of conviction is entered in state court, it is subject to review in multiple forums. Specifically, each State has created mechanisms for both direct appeal and state posteonvietion review, see L. Yackle, Posteonvietion Remedies §§1, 13 (1981 and Supp. 2000), even though there is no constitutional mandate that they do so, see Pennsylvania v. Finley, 481 U.S. 551, 557 (1987) (no constitutional right to state posteonvietion review); Abney v. United States, 431 U.S. 651, 656 (1977) (no constitutional right to direct appeal). Moreover, §2254 makes federal courts available to review state criminal proceedings for compliance with federal constitutional mandates.
As we said in Daniels, “[t]hese vehicles for review... are not available indefinitely and without limitation.” Ante, at 381. A defendant may choose not to seek review of his conviction within the prescribed time. Or he may seek review and not prevail, either because he did not comply with procedural rules or because he failed to prove a constitutional violation. In each of these situations, the defendant’s conviction becomes final and the State that secured the conviction obtains a strong interest in preserving the integrity of the judgment. See ante, at 379-380. Other jurisdictions acquire an interest as well, as they may then use that conviction for their own recidivist sentencing purposes, relying on “the ‘presumption of regularity' that attaches to final judgments.” Parke v. Raley, 506 U.S. 20, 29 (1992); see also Daniels, ante, at 380.
An additional concern is ease of administration of challenges to expired state convictions. Federal courts sitting in habeas jurisdiction must consult state court records and transcripts to ensure that challenged convictions were obtained in a manner consistent with constitutional demands. As time passes, and certainly once a state sentence has been served to completion, the likelihood that trial records will be retained by the local courts and will be accessible for review diminishes substantially. See Daniels, ante, at 379.
Accordingly, as in Daniels, we hold that once a state conviction is no longer open to direct or collateral attack in its own right because the defendant failed to pursue those remedies while they were available (or because the defendant did so unsuccessfully), the conviction may be regarded as conclusively valid. See Daniels, ante, at 382. If that conviction is later used to enhance a criminal sentence, the defendant generally may not challenge the enhanced sentence through a petition under §2254 on the ground that the prior conviction was unconstitutionally obtained.
H-i HH
A
As in Daniels, we recognize an exception to the general rule for §2254 petitions that challenge an enhanced sentence on the basis that the prior conviction used to enhance the sentence was obtained where there was a failure to appoint counsel in violation of the Sixth Amendment, as set forth in Gideon v. Wainwright, 372 U.S. 335 (1963). The special status of Gideon claims in this context is well established in our case law. See, e. g., Custis v. United States, 511 U.S. 485, 496-497 (1994); United States v. Tucker, 404 U.S., at 449; Burgett v. Texas, 389 U.S. 109, 115 (1967). Cf. Daniels, ante, at 382.
As we recognized in Custis, the “failure to appoint counsel for an indigent [is] a unique constitutional defect... ris[ing] to the level of a jurisdictional defect,” which therefore warrants special treatment among alleged constitutional violations. See 511 XJ. S., at 496. Moreover, allowing an exception for Gideon challenges does not implicate our concern about administrative ease, as the “failure to appoint counsel . . . will generally appear from the judgment roll itself, or from an accompanying minute order.” 511 U.S., at 496.
As with any §2254 petition, the petitioner must satisfy the procedural prerequisites for relief including, for example, exhaustion of remedies. See 28 U. S. C. § 2254(b) (1994 ed., Supp. V). When an otherwise qualified § 2254 petitioner can demonstrate that his current sentence was enhanced on the basis of a prior conviction that was obtained where there was a failure to appoint counsel in violation of the Sixth Amendment, the current sentence cannot stand and habeas relief is appropriate. Cf. United States v. Tucker, supra, at 449 (affirming vacatur of sentence that was based in part on prior uneounseled state convictions).
B
We stated in Daniels that another exception to the general rule precluding habeas relief might be available, although the circumstances of that case did not require us to resolve the issue. See ante, at 383-384. We note a similar situation here.
The general rule we have adopted here and in Daniels reflects the notion that a defendant properly bears the consequences of either forgoing otherwise available review of a conviction or failing to successfully demonstrate constitutional error. See supra, at 403-404; Daniels, ante, at 381-383. It is not always the ease, however, that a defendant can be faulted for failing to obtain timely review of a constitutional claim. For example, a state court may, without justification, refuse to rule on a constitutional claim that has been properly presented to it. Cf. 28 U. S. C. § 2244(d)(1)(B) (1994 ed., Supp. V) (tolling 1-year limitations period while petitioner is prevented from filing application by an “impediment ... created by State action in violation of the Constitution or laws of the United States”). Alternatively, after the time for direct or collateral review has expired, a defendant may obtain compelling evidence that he is actually innocent of the crime for which he was convicted, and which he could not have uncovered in a timely maimer. Cf. Brady v. Maryland, 373 U.S. 83 (1963); 28 U. S. C. § 2244(b)(2)(B) (1994 ed., Supp. V) (allowing a second or successive habeas corpus application if “the factual predicate for the claim could not have been discovered previously through the exercise of due diligence; and . . . the facts underlying the claim, if proven and viewed in light of the evidence as a whole, would be sufficient to establish by clear and convincing evidence that, but for constitutional error, no reasonable factfinder would have found the applicant guilty of the underlying offense”).
In such situations, a habeas petition directed at the enhanced sentence may effectively be the first and only forum available for review of the prior conviction. As in Daniels, this case does not require us to determine whether, or under what precise circumstances, a petitioner might be able to use a §2254 petition in this manner.
Whatever such a petitioner must show to be eligible for review, the challenged prior conviction must have adversely affected the sentence that is the subject of the habeas petition. This question was adequately raised and considered below. As the District Court stated, Coss contended “that his current sentence [for the 1990 conviction] was adversely affected by the 1986 convictions because the sentencing judge considered these allegedly unconstitutional convictions in computing Coss’s present sentence.” App. to Pet. for Cert. 105a-106a (emphasis added). The District Court and majority of the Court of Appeals agreed with Coss on this point. See id., at 107a; 204 F. 3d, at 459. Judge Nygaard, joined by Judge Roth, dissented to dispute the conclusion that the 1986 convictions had any effect whatsoever on Coss’ sentence for the 1990 conviction. Id., at 467-469.
C
After a careful examination of the record here, we are satisfied that the findings of the lower courts on this threshold factual point are clearly erroneous. Cf. Neil v. Biggers, 409 U.S. 188, 193, n. 3 (1972). We therefore conclude that respondent Coss does not qualify to have his §2254 petition reviewed, even assuming the existence of a limited exception to the general rule barring review of an expired prior conviction. Specifically, it is clear that any “consideration” the trial court may have given to Coss’ 1986 convictions in reimposing sentence for his 1990 conviction did not actually affect that sentence.
As we explain above, see supra, at 398-399, when Coss was resentenced on his 1990 conviction, he objected to the presentence report’s calculation of his prior record score. The court sustained that objection and, in effect, eliminated Coss’ 1986 convictions from the prior record seore entirely. Because the prior record score is one of two determinants of the applicable sentencing range, see 42 Pa. Cons. Stat. §9721 (1998) (reproducing 204 Pa. Code § 303.9(a) (1998)), it is clear that Coss’ 1986 convictions had no role in determining the range of sentences to which Coss was exposed.
In choosing a sentence for Coss within that range, the trial court considered several factors, including “the seriousness and nature of the crime involved here, the well being and protection of the people who live in our community, your criminal disposition, your prior criminal record, the possibility of your rehabilitation, and the testimony that I’ve heard.” Record Doc. No. 101 (PI. Exh. 3, at 26). Coss’ 1986 convictions are, of course, a portion of his criminal record. Thus, it is technically correct to say that the court “considered” those, convictions before sentencing Coss. Cf. 204 F. 3d, at 459.
But it is a different thing entirely to say that the 1986 convictions actually increased the length of the sentence the court ultimately imposed. As the sentencing court told Coss, “I think that it’s indicative that from your actions that you will continue to break the law unless given a period of incarceration.” Record Doc. No. 101 (PI. Exh. 3, at 26). The “actions” to which the judge referred were obviously not limited to Coss’ criminal conduct in 1986, but Coss’ extensive and violent criminal record as a whole. We conclude, as Judge Nygaard did below, that the 1986 convictions are “such a minor component of [Coss’] record that there is no question that the sentencing court, given its concerns, would have imposed exactly the same sentence” had those convictions been omitted from Coss’ record. 204 F. 3d, at 468 (dissenting opinion).
We note that the record does not explain why Coss’ ineffective assistance claim did not receive a timely adjudication in the Pennsylvania courts. While the reason might have been that Goss’ petition "slipped through the cracks,” due to no fault of his own, Tr. of Oral Arg. 4, it might also have been that Coss was responsible for “request[ing] that the matter be brought up for a hearing,” id., at 5. But even if Coss cannot be faulted for that lapse, he would not qualify to have his current §2254 petition reviewed because the 1990 sentence he is challenging was not actually affected by the 1986 convictions.
IV
The judgment of the United States Court of Appeals for the Third Circuit is therefore reversed, and the ease is remanded for further proceedings consistent with this opinion.
It is so ordered.
JXJSTiCE ScALXA joins all but Parts III-B and III-C of this opinion. Justice Thomas joins all but Part III-B.