In 1958, respondent was convicted of robbery in Washington state court and sentenced to 20 years of imprisonment; this sentence expired by its terms in 1978. In 1976, while on parole from that sentence, he was convicted of two counts of assault and one count of aiding a prisoner to escape; in 1978, the State sentenced him to two life terms and one 10-year term on those convictions. These sentences were maximum terms under Washington’s then-indeterminate sentencing scheme, with the minimum term to be set by the Board of Prison Terms and Paroles. Under Washington law, the 1958 conviction will increase by several years the mandatory minimum term which respondent will have to serve on his 1978 sentences.
In 1976 respondent was also convicted of bank robbery and conspiracy in federal court and sentenced to 30 years of imprisonment. He is currently serving his federal sentence in a federal penitentiary in California, but the State of Washington has lodged a detainer against him with federal prison authorities. Respondent is scheduled to begin serving the sentences imposed upon him by the Washington courts in 1978 at the expiration of his federal term.
In 1985, while in federal prison, respondent filed a
pro se
petition for habeas corpus relief in the United States District Court for the Western District of Washington. Respond
*490
ent’s petition listed the 1958 Washington conviction as the “conviction under attack,” alleging that it was invalid because respondent had not been given a competency hearing, even though there was reasonable doubt as to his competency to stand trial. Respondent also alleged that the 1958 conviction had been used illegally to enhance his 1978 state sentences, which he had not yet begun to serve.
*
The District Court dismissed the petition for lack of subject-matter jurisdiction, holding that respondent was not “in custody” for the purposes of a habeas attack on the 1958 conviction because the sentence imposed for that conviction had already expired. The Court of Appeals for the Ninth Circuit reversed.
The federal habeas statute gives the United States district courts jurisdiction to entertain petitions for habeas relief only from persons who are
“in custody
in violation of the Constitution or laws or treaties of the United States.” 28 U. S. C. § 2241(c)(3) (emphasis added); see also 28 U. S. C. § 2254(a). We have interpreted the statutory language as requiring that the habeas petitioner be “in custody” under the conviction or sentence under attack at the time his peti
*491
tion is filed. See
Carafas
v.
LaVallee,
Our interpretation of the “in custody” language has not required that a prisoner be physically confined in order to challenge his sentence on habeas corpus. In
Jones
v.
Cunningham,
We have never held, however, that a habeas petitioner may be “in custody” under a conviction when the sentence imposed for that conviction has fully expired at the time his petition is filed. Indeed, our decision in Carafas v. LaVallee, supra, strongly implies the contrary. In Carafas, the petitioner filed his habeas application while he was actually incarcerated under the sentence he sought to attack, but his sentence expired and he was unconditionally discharged from custody while his appeal from the denial of habeas relief below was pending before this Court. The State argued that the unconditional discharge rendered the case moot. We rejected this argument, holding that the “collateral consequences” of the petitioner’s conviction — his inability to vote, engage in certain businesses, hold public office, or serve as a *492 juror — prevented the case from being moot. Id., at 237-238. We went on to say, however, that the unconditional release raised a “substantial issue” as to the statutory “in custody” requirement. Id., at 238. While we ultimately found that requirement satisfied as well, we rested that holding not on the collateral consequences of the conviction, but on the fact that the petitioner had been in physical custody under the challenged conviction at the time the petition was filed. Ibid. The negative implication of this holding is, of course, that once the sentence imposed for a conviction has completely expired, the collateral consequences of that conviction are not themselves sufficient to render an individual “in custody” for the purposes of a habeas attack upon it.
The question presented by this case is whether a habeas petitioner remains “in custody” under a conviction after the sentence imposed for it has fully expired, merely because of the possibility that the prior conviction will be used to enhance the sentences imposed for any subsequent crimes of which he is convicted. We hold that he does not. While we have very liberally construed the “in custody” requirement for purposes of federal habeas, we have never extended it to the situation where a habeas petitioner suffers no present restraint from a conviction. Since almost all States have habitual offender statutes, and many States provide as Washington does for specific enhancement of subsequent sentences on the basis of prior convictions, a contrary ruling would mean that a petitioner whose sentence has completely expired could nonetheless challenge the conviction for which it was imposed at any time on federal habeas. This would read the “in custody” requirement out of the statute and be contrary to the clear implication of the opinion in Carafas v. LaVallee, supra.
In this case, of course, the possibility of a sentence upon a subsequent conviction being enhanced because of the prior conviction actually materialized, but we do not think that requires any different conclusion. When the second sentence *493 is imposed, it is pursuant to the second conviction that the petitioner is incarcerated and is therefore “in custody.”
We do think, however, that respondent may challenge the sentences imposed upon him by the State of Washington in 1978, even though he is not presently serving them. In
Mc-Nally
v.
Hill,
While in this case respondent is serving a federal sentence, rather than another sentence imposed by the State of Washington, we do not think this factual difference from
Peyton
v.
Rowe
requires a different result. The State of Washington has placed a detainer with the federal authorities to ensure that at the conclusion of respondent’s federal sentence, he will be returned to the state authorities to begin serving his 1978 state sentences. In
Braden
v.
30th Judicial Circuit Court of Ky., supra,
we held that a prisoner serving a sentence in Alabama, who was subject to a detainer filed with his Alabama jailers by Kentucky officials, was “in custody” for the purpose of a habeas attack on the outstanding Kentucky charge upon which the detainer rested. We think that
Braden
and
Peyton
together require the conclusion that respondent in this case was “in custody” under his 1978 state sentences at the time he filed. Since we think respondent’s habeas petition, construed with the deference to which
pro se
litigants are entitled,
Haines
v.
Kerner,
Our holding is limited to the narrow issue of “custody” for subject-matter jurisdiction of the habeas court. We express no view on the extent to which the 1958 conviction itself may be subject to challenge in the attack upon the 1978 sentences which it was used to enhance. See 28 U. S. C. §2254 Rule 9(a).
The judgment of the Court of Appeals is
Affirmed.
Notes
Respondent also alleged that the 1958 conviction had been used to enhance the federal sentence which he was serving at the time of the filing. The courts below did not address that contention, however, and respondent has not pressed it before this Court. Accordingly, we do not consider it here.
