Justice Ginsburg
delivered the opinion of the Court.
To petition a federal court for habeas corpus relief from a state-court conviction, the applicant must be “in custody in violation of the Constitution or laws or treaties of the United States.” 28 U. S. C. § 2254(a); see also 28 U. S. C. § 2241(c)(3). In Peyton v. Rowe, 391 U. S. 54 (1968), we held that the governing federal prescription permits prisoners incarcerated under consecutive state-court sentences to apply for federal habeas relief from sentences they had not yet begun to serve. We said in Peyton that, for purposes of habeas relief, consecutive sentences should be treated as a continuous series; a prisoner is “in custody in violation of the Constitution,” we explained, “if any consecutive sentence [the prisoner is] scheduled to serve was imposed as the result of a deprivation of constitutional rights.” Id., at 64-65.
The case before us is appropriately described as Peyton’s complement, or Peyton in reverse. Like the habeas petitioners in Peyton, petitioner Harvey Garlotte is incarcerated under consecutive sentences. Unlike the Peyton petitioners, however, Garlotte does not challenge a conviction underlying a sentence yet to be served. Instead, Garlotte seeks to attack a conviction underlying the sentence that ran first in a consecutive seríes, a sentence already served, but one that nonetheless persists to postpone Garlotte’s eligibility for parole. Following Peyton, we do not disaggregate Gar-lotte’s sentences, but comprehend them as composing a continuous stream. We therefore hold that Garlotte remains “in custody” under all of his sentences until all are served, and now may attack the conviction underlying the sentence scheduled to run first in the series.
I
On September 16,1985, at a plea hearing held m a Mississippi trial court, Harvey Garlotte entered simultaneous guilty pleas to one count of possession with intent to distribute marijuana and two counts of murder. Pursuant to a plea agreement, the State recommended that Garlotte be sentenced to a prison term of three years on the marijuana count, to run consecutively with two concurrent life sentences on the murder counts. App. 43. State law required Garlotte to serve at least ten months on the marijuana count, Miss. Code Ann. § 47—7—3(1)(c)(ii) (Supp. 1994), and at least ten years on the concurrent life sentences. § 47-7-3(1).
At the plea hearing, the trial judge inquired whether the State wanted Garlotte to serve the life sentences before the three-year sentence: “[A] three year sentence [on the marijuana possession count] to run consecutive to th[e] two life sentences?” the judge asked. The prosecutor expressed indifference about the order in which the sentences would run: “Either that way, your Honor or allow the three years to run first. In other words, we’re just talking, about a total of three years and then life or life and then three years.” App. 43. The judge next asked Garlotte’s counsel about his understanding of the State’s recommendation. Defense counsel replied, without elaboration: “[I]t’s my understanding that the possession case is to run first and then the two life sentences.” Id., at 44. The court saw “no reason not to go along with the recommendation of the State.” Id., at 50. Without further explanation, the court imposed the sentences in this order: the three-year sentence first, then, consecutively, the concurrent life sentences. Ibid.
Garlotte wrote to the trial court seven months after the September 16, 1985 hearing, asking for permission to withdraw his guilty plea on the marijuana count. The court’s reply notified Garlotte of the Mississippi statute under which he could pursue postconviction collateral relief. Id., at 51. Garlotte unsuccessfully moved for such relief. Nearly two years after the denial of Garlotte’s motion, the Mississippi Supreme Court rejected his appeal. Garlotte v. State, 530 So. 2d 693 (1988). On January 18, 1989, the Mississippi Supreme Court denied further postconviction motions filed by Garlotte. By this time, Garlotte had completed the period of incarceration set for the marijuana offense, and had commenced serving the life sentences.
On October 6,1989, Garlotte filed a habeas corpus petition in the United States District Court for the Southern District of Mississippi, naming as respondent Kirk Fordice, the Governor of Mississippi. Adopting the recommendation of a Federal Magistrate Judge, the District Court denied Gar-lotte’s petition on the merits. App. 18.
Before the United States Court of Appeals for the Fifth Circuit, the State argued for the first time that the District Court lacked jurisdiction over Garlotte’s petition. 29 F. 3d 216, 217 (1994). The State asserted that Garlotte, prior to the District Court filing, had already served out the prison time imposed for the marijuana conviction; therefore, the State maintained, Garlotte was no longer “in custody” under that conviction within the meaning of the federal habeas statute. Ibid. Garlotte countered that he remained “in custody” until all sentences were served, emphasizing that the marijuana conviction continued to postpone the date on which he would be eligible for parole. Id., at 218.
Adopting the State’s position, the Fifth Circuit dismissed Garlotte’s habeas petition for want of jurisdiction. Ibid. The Courts of Appeals have divided over the question whether a person incarcerated under consecutive sentences remains “in custody” under a sentence that (1) has been completed in terms of prison time served, but (2) continues to postpone the prisoner’s date of potential release. We granted certiorari to resolve this conflict, 513 U. S. 1123 (1995), and now reverse.
II
The federal habeas statute authorizes United States district courts to entertain petitions for habeas relief from state-court judgments only when the petitioner is “in custody in violation of the Constitution or laws or treaties of the United States.” 28 U. S. C. § 2254(a); see also 28 U. S. C. § 2241(c)(3). In Peyton v. Rowe, 391 U. S. 54 (1968), we held that the statute authorized the exercise of habeas jurisdiction over the petitions of two State of Virginia prisoners, Robert Rowe and Clyde Thacker. Rowe and Thacker were incarcerated under consecutive sentences; both sought to challenge sentences slated to run in the future. Virginia, relying on McNally v. Hill, 293 U. S. 131 (1934), argued that the habeas petitions were premature. Overruling McNally, we explained:
“[I]n common understanding ‘custody’ comprehends respondents’ status for the entire duration of their imprisonment. Practically speaking, Rowe is in custody for 50 years, or for the aggregate of his 30- and 20-year sentences. For purposes of parole eligibility, under Virginia law he is incarcerated for 50 years. Nothing on the face of §2241 militates against an interpretation which views Rowe and Thacker as being ‘in custody’ under the aggregate of the consecutive sentences imposed on them. Under that interpretation, they are ‘in custody in violation of the Constitution’ if any consecutive sentence they are scheduled to serve was imposed as the result of a deprivation of constitutional rights.” 391 U. S., at 64-65 (citations omitted).
The habeas petitioners in Peyton sought to present challenges that, if successful, would advance their release dates. That was enough, we concluded, to permit them to invoke the Great Writ. Id., at 66-67.
Had the Mississippi trial court ordered that Garlotte’s life sentences run before his marijuana sentence — an option about which the prosecutor expressed indifference — Peyton unquestionably would have instructed the District Court to entertain Garlotte’s present habeas petition. Because the marijuana term came first, and Garlotte filed his habeas petition (following state-court proceedings) after prison time had run on the marijuana sentence, Mississippi urges that Ma-leng v. Cook, 490 U. S. 488 (1989) (per curiam), rather than Peyton, controls.
The question presented in Maleng was “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.” 490 U. S., at 492. We held that the potential use of a conviction to enhance a sentence for subsequent offenses did not suffice to render a person “in custody” within the meaning of the habeas statute. Ibid.
Maleng recognized that we had “very liberally construed the ‘in custody’ requirement for purposes of federal habeas,” but stressed that the Court had “never extended it to the situation where a habeas petitioner suffers no present restraint from a conviction.” Ibid. “[A]lmost all States have habitual offender statutes, and many States provide ... for specific enhancement of subsequent sentences on the basis of prior convictions,” ibid.; hence, the construction of “in custody” urged by the habeas petitioner in Maleng would have left nearly all convictions perpetually open to collateral attack. The Maleng petitioner’s interpretation, we therefore commented, “would read the ‘in custody’ requirement out of the statute.” Ibid.
Unlike the habeas petitioner in Maleng, Garlotte is serving consecutive sentences. In Peyton, we held that “a prisoner serving consecutive sentences is ‘in custody’ under any one of them” for purposes of the habeas statute. 391 U. S., at 67. Having construed the statutory term “in custody” to require that consecutive sentences be viewed in the aggregate, we will not now adopt a different construction simply because the sentence imposed under the challenged conviction lies in the past rather than in the future.
Mississippi urges, as a prime reason for its construction of the “in custody” requirement, that allowing a habeas attack on a sentence nominally completed would “encourage and reward delay in the assertion of habeas challenges.” Brief for Respondent 28. As Mississippi observes, in Peyton we rejected the prematurity rule of McNally in part because of “the harshness of a rule which may delay determination of federal claims for decades.” Peyton, 391 U. S., at 61. Mississippi argues that Garlotte’s reading of the words “in custody” would undermine the expeditious adjudication rationale of Peyton. Brief for Respondent 6-7, 27-28.
Our holding today, however, is unlikely to encourage delay. A prisoner naturally prefers release sooner to release later. Further, because the habeas petitioner generally bears the burden of proof, delay is apt to disadvantage the petitioner more than the State. Nothing in this record, we note, suggests that Garlotte has been dilatory in challenging his marijuana conviction. Finally, under Habeas Corpus Rule 9(a), a district court may dismiss a habeas petition if the State “has been prejudiced in its ability to respond to the petition by [inexcusable] delay in its filing.”
* * *
Under Peyton, we view consecutive sentences in the aggregate, not as discrete segments. Invalidation of Gar-lotte’s marijuana conviction would advance the date of his eligibility for release from present incarceration. Garlotte’s challenge, which will shorten his term of incarceration if he proves unconstitutionality, implicates the core purpose of habeas review. We therefore hold that Garlotte was “in custody” under his marijuana conviction when he filed his federal habeas petition. Accordingly, the judgment of the Court of Appeals for the Fifth Circuit is reversed, and the case is remanded for proceedings consistent with this opinion.
It is so ordered.
Garlotte asserted that he was entitled to relief because his guilty plea was not knowing, intelligent, and voluntary, he did not receive effective assistance of trial counsel, he was subjected to double jeopardy, and his sentence was unusual and disproportionate. App. 6.
Compare Fawcett v. Bablitch, 962 F. 2d 617, 618 (CA7 1992) (“in custody”); Bernard v. Garraghty, 934 F. 2d 62, 65 (CA4 1991) (same); and Fox v. Kelso, 911 F. 2d 563, 568 (CA11 1990) (same), with Allen v. Dowd, 964 F. 2d 745, 746 (CA8) (not “in custody”), cert. denied, 506 U. S. 920 (1992).
Garlotte, who proceeded pro se in the courts below, filed along with his petition for certiorari a motion for appointment of counsel. After we granted certiorari, we appointed Brian D. Boyle, of Washington, D. C., to represent Garlotte. 513 U. S. 1125 (1996).
We left open the possibility, however, that the conviction underlying the expired sentence might be subject to challenge in a collateral attack upon the subsequent sentence that the expired sentence was used to enhance. Maleng, 490 U. S., at 494.
That Mississippi itself views consecutive sentences in the aggregate for various penological purposes reveals the difficulties courts and prisoners would face trying to determine when one sentence ends and a consecutive sentence begins. For example, Mississippi aggregates consecutive sentences for the purpose of determining parole eligibility, see Miss. Code Ann. § 47-7-3(1) (Supp. 1994) (“Every prisoner ... who has served not less than one-fourth (1/4) of the total of such term or terms for which such prisoner was sentenced ... may be released on parole as hereinafter provided . . . ”) (emphasis added), and for the purpose of determining commutation of sentences for meritorious earned-time credit. See Miss. Code Ann. §47-5-139(3) (1981) (“An offender under two (2) or more consecutive sentences shall be allowed commutation based upon the total term of the sentences.”) (emphasis added).
attorney general of the United States, or his office specified state board or department of education city, town, township, village, or borough government or governmental unit state commission, board, committee, or authority county government or county governmental unit, except school district court or judicial district state department or agency governmental employee or job applicant female governmental employee or job applicant minority governmental employee or job applicant minority female governmental employee or job applicant not listed among agencies in the first Administrative Action variable retired or former governmental employee U.S. House of Representatives interstate compact judge state legislature, house, or committee local governmental unit other than a county, city, town, township, village, or borough governmental official, or an official of an agency established under an interstate compact state or U.S. supreme court local school district or board of education U.S. Senate U.S. senator foreign nation or instrumentality state or local governmental taxpayer, or executor of the estate of state college or university United States State person accused, indicted, or suspected of crime advertising business or agency agent, fiduciary, trustee, or executor airplane manufacturer, or manufacturer of parts of airplanes airline distributor, importer, or exporter of alcoholic beverages alien, person subject to a denaturalization proceeding, or one whose citizenship is revoked American Medical Association National Railroad Passenger Corp. amusement establishment, or recreational facility arrested person, or pretrial detainee attorney, or person acting as such;includes bar applicant or law student, or law firm or bar association author, copyright holder bank, savings and loan, credit union, investment company bankrupt person or business, or business in reorganization establishment serving liquor by the glass, or package liquor store water transportation, stevedore bookstore, newsstand, printer, bindery, purveyor or distributor of books or magazines brewery, distillery broker, stock exchange, investment or securities firm construction industry bus or motorized passenger transportation vehicle business, corporation buyer, purchaser cable TV car dealer person convicted of crime tangible property, other than real estate, including contraband chemical company child, children, including adopted or illegitimate religious organization, institution, or person private club or facility coal company or coal mine operator computer business or manufacturer, hardware or software consumer, consumer organization creditor, including institution appearing as such; e.g., a finance company person allegedly criminally insane or mentally incompetent to stand trial defendant debtor real estate developer disabled person or disability benefit claimant distributor person subject to selective service, including conscientious objector drug manufacturer druggist, pharmacist, pharmacy employee, or job applicant, including beneficiaries of employer-employee trust agreement, employee health and welfare fund, or multi-employer pension plan electric equipment manufacturer electric or hydroelectric power utility, power cooperative, or gas and electric company eleemosynary institution or person environmental organization employer. If employer's relations with employees are governed by the nature of the employer's business (e.g., railroad, boat), rather than labor law generally, the more specific designation is used in place of Employer. farmer, farm worker, or farm organization father female employee or job applicant female movie, play, pictorial representation, theatrical production, actor, or exhibitor or distributor of fisherman or fishing company food, meat packing, or processing company, stockyard foreign (non-American) nongovernmental entity franchiser franchisee lesbian, gay, bisexual, transexual person or organization person who guarantees another's obligations handicapped individual, or organization of devoted to health organization or person, nursing home, medical clinic or laboratory, chiropractor heir, or beneficiary, or person so claiming to be hospital, medical center husband, or ex-husband involuntarily committed mental patient Indian, including Indian tribe or nation insurance company, or surety inventor, patent assigner, trademark owner or holder investor injured person or legal entity, nonphysically and non-employment related juvenile government contractor holder of a license or permit, or applicant therefor magazine male medical or Medicaid claimant medical supply or manufacturing co. racial or ethnic minority employee or job applicant minority female employee or job applicant manufacturer management, executive officer, or director, of business entity military personnel, or dependent of, including reservist mining company or miner, excluding coal, oil, or pipeline company mother auto manufacturer newspaper, newsletter, journal of opinion, news service radio and television network, except cable tv nonprofit organization or business nonresident nuclear power plant or facility owner, landlord, or claimant to ownership, fee interest, or possession of land as well as chattels shareholders to whom a tender offer is made tender offer oil company, or natural gas producer elderly person, or organization dedicated to the elderly out of state noncriminal defendant political action committee parent or parents parking lot or service patient of a health professional telephone, telecommunications, or telegraph company physician, MD or DO, dentist, or medical society public interest organization physically injured person, including wrongful death, who is not an employee pipe line company package, luggage, container political candidate, activist, committee, party, party member, organization, or elected official indigent, needy, welfare recipient indigent defendant private person prisoner, inmate of penal institution professional organization, business, or person probationer, or parolee protester, demonstrator, picketer or pamphleteer (non-employment related), or non-indigent loiterer public utility publisher, publishing company radio station racial or ethnic minority person or organization protesting racial or ethnic segregation or discrimination racial or ethnic minority student or applicant for admission to an educational institution realtor journalist, columnist, member of the news media resident restaurant, food vendor retarded person, or mental incompetent retired or former employee railroad private school, college, or university seller or vendor shipper, including importer and exporter shopping center, mall spouse, or former spouse stockholder, shareholder, or bondholder retail business or outlet student, or applicant for admission to an educational institution taxpayer or executor of taxpayer's estate, federal only tenant or lessee theater, studio forest products, lumber, or logging company person traveling or wishing to travel abroad, or overseas travel agent trucking company, or motor carrier television station union member unemployed person or unemployment compensation applicant or claimant union, labor organization, or official of veteran voter, prospective voter, elector, or a nonelective official seeking reapportionment or redistricting of legislative districts (POL) wholesale trade wife, or ex-wife witness, or person under subpoena network slave slave-owner bank of the united states timber company u.s. job applicants or employees Army and Air Force Exchange Service Atomic Energy Commission Secretary or administrative unit or personnel of the U.S. Air Force Department or Secretary of Agriculture Alien Property Custodian Secretary or administrative unit or personnel of the U.S. Army Board of Immigration Appeals Bureau of Indian Affairs Bonneville Power Administration Benefits Review Board Civil Aeronautics Board Bureau of the Census Central Intelligence Agency Commodity Futures Trading Commission Department or Secretary of Commerce Comptroller of Currency Consumer Product Safety Commission Civil Rights Commission Civil Service Commission, U.S. Customs Service or Commissioner of Customs Defense Base Closure and REalignment Commission Drug Enforcement Agency Department or Secretary of Defense (and Department or Secretary of War) Department or Secretary of Energy Department or Secretary of the Interior Department of Justice or Attorney General Department or Secretary of State Department or Secretary of Transportation Department or Secretary of Education U.S. Employees' Compensation Commission, or Commissioner Equal Employment Opportunity Commission Environmental Protection Agency or Administrator Federal Aviation Agency or Administration Federal Bureau of Investigation or Director Federal Bureau of Prisons Farm Credit Administration Federal Communications Commission (including a predecessor, Federal Radio Commission) Federal Credit Union Administration Food and Drug Administration Federal Deposit Insurance Corporation Federal Energy Administration Federal Election Commission Federal Energy Regulatory Commission Federal Housing Administration Federal Home Loan Bank Board Federal Labor Relations Authority Federal Maritime Board Federal Maritime Commission Farmers Home Administration Federal Parole Board Federal Power Commission Federal Railroad Administration Federal Reserve Board of Governors Federal Reserve System Federal Savings and Loan Insurance Corporation Federal Trade Commission Federal Works Administration, or Administrator General Accounting Office Comptroller General General Services Administration Department or Secretary of Health, Education and Welfare Department or Secretary of Health and Human Services Department or Secretary of Housing and Urban Development Interstate Commerce Commission Indian Claims Commission Immigration and Naturalization Service, or Director of, or District Director of, or Immigration and Naturalization Enforcement Internal Revenue Service, Collector, Commissioner, or District Director of Information Security Oversight Office Department or Secretary of Labor Loyalty Review Board Legal Services Corporation Merit Systems Protection Board Multistate Tax Commission National Aeronautics and Space Administration Secretary or administrative unit of the U.S. Navy National Credit Union Administration National Endowment for the Arts National Enforcement Commission National Highway Traffic Safety Administration National Labor Relations Board, or regional office or officer National Mediation Board National Railroad Adjustment Board Nuclear Regulatory Commission National Security Agency Office of Economic Opportunity Office of Management and Budget Office of Price Administration, or Price Administrator Office of Personnel Management Occupational Safety and Health Administration Occupational Safety and Health Review Commission Office of Workers' Compensation Programs Patent Office, or Commissioner of, or Board of Appeals of Pay Board (established under the Economic Stabilization Act of 1970) Pension Benefit Guaranty Corporation U.S. Public Health Service Postal Rate Commission Provider Reimbursement Review Board Renegotiation Board Railroad Adjustment Board Railroad Retirement Board Subversive Activities Control Board Small Business Administration Securities and Exchange Commission Social Security Administration or Commissioner Selective Service System Department or Secretary of the Treasury Tennessee Valley Authority United States Forest Service United States Parole Commission Postal Service and Post Office, or Postmaster General, or Postmaster United States Sentencing Commission Veterans' Administration War Production Board Wage Stabilization Board General Land Office of Commissioners Transportation Security Administration Surface Transportation Board U.S. Shipping Board Emergency Fleet Corp. Reconstruction Finance Corp. Department or Secretary of Homeland Security Unidentifiable International Entity