I dissent.
Petitioner Pamela C. Martinez pleaded guilty to the crime of petty theft (Pen. Code, §§ 485, 488).1 Because of her prior convictions, the offense was treated as a felony (see § 666), and she was sentenced to state prison. After spending more than six and a half years in custody for this petty theft, petitioner was released from prison to begin rebuilding her life. Because the majority concludes that she has not served enough time, presumably petitioner will now be taken into custody and returned to prison.
The issue before this court is the correct interpretation and application of certain provisions of the California Penal Code governing credits that a detainee or inmate may earn for good behavior and participation in qualifying work programs (collectively referred to as conduct credits) while in custody. These credits are applied against a penal sentence to shorten its length. The Penal Code sets several different rates at which these conduct credits may be earned, depending on the inmate’s crime, criminal record, and sentence and also, of particular importance here, on whether the custody time during which the credits were earned occurred before or after the pronouncement of sentence. Briefly stated, the majority concludes that time spent in prison before pronouncement of a sentence should be treated, in the eyes of the law, as having occurred after that sentence. I disagree. In this instance, as in most instances, the simple and obvious answer is the correct one: Presentence means before the sentence, and postsentence means after the sentence. Therefore, in my view, the time petitioner spent in prison before pronouncement of sentence is presentence time, not postsentence time, for purposes of computing conduct credits.
Only a few facts need be stated. In February 1995, petitioner was arrested. In July 1996, after a jury trial that resulted in a conviction for petty theft, petitioner was sentenced to prison and immediately began to serve that sentence. Petitioner challenged the validity of her conviction by petitioning for a writ of habeas corpus, and, in July 1999, the Court of Appeal set aside petitioner’s conviction and ordered a new trial. On August 19, 1999, petitioner pleaded guilty to petty theft with a prior conviction, and the court sentenced her to state prison for a term of nine years.
An issue then arose about petitioner’s entitlement to conduct credits for the three years she spent in prison from July 1996 and July 1999 under the invalid judgment. Petitioner’s entitlement to some credit for this period was beyond dispute. Section 2900.1 declares that time spent serving a sentence under a judgment later declared invalid “shall be credited upon any subsequent sentence [the defendant] may receive upon a new commitment for the *39same criminal act or acts.” Likewise, it was not disputed that she had earned conduct credits by her behavior in prison. Rather, the issue was the rate at which the conduct credits accrued. The superior court concluded that the credits should accrue at the postsentence rate of 20 percent under sections 667, subdivision (c)(5), and 1170.12, subdivision (a)(5). The Court of Appeal disagreed, concluding instead that the credits accrued at the presentence rate of 50 percent under sections 2900.5 and 4019.
The majority agrees with the superior court that the three years petitioner spent in prison before July 1999 is postsentence time for purpose of calculating conduct credits against her August 1999 sentence. How does the majority arrive at a conclusion so implausible on its face?
The majority begins with a 1952 decision of this court in a habeas corpus proceeding setting aside a first degree murder conviction: In re James (1952) 38 Cal.2d 302 [240 P.2d 596], At the end of the opinion in James, after determining that the petitioner’s conviction was invalid, this court noted that the petitioner was “still subject to trial,” and that if he was convicted after a new trial “his confinement based upon the invalid 1944 judgment, together with any time credits for good conduct earned thereon (Pen. Code, § 2920), would be credited upon the new sentence for the same criminal act. (Pen. Code, § 2900.1.)” (In re James, supra, at p. 314.)
Although conceding that James “did not expressly analyze the question” and therefore does not control here, the majority professes to find significance in this court’s reference, in the passage quoted above, to former section 2920, which the majority triumphantly states is “the postsentence credit statute.” (Maj. opn., ante, at p. 33, italics added.) What the majority does not point out is that in 1952, when this court decided James, there was no presentence conduct credit statute in existence. The Legislature enacted the first presentence credit statute in 1971 (Stats. 1971, ch. 1732, § 2, p. 3686), but even then the Penal Code made no provision for presentence conduct credits for persons convicted of felonies. Such credits were first authorized by this court’s decision in People v. Sage (1980) 26 Cal.3d 498 [165 Cal.Rptr. 280, 611 P.2d 874], later codified in section 4019, subdivision (a)(4). Thus, unlike this case, James was not a situation in which this court was required to choose between presentence and postsentence conduct credit statutes. Rather, in referring to section 2920, this court was citing the only conduct credit statute then in existence for persons convicted of felonies and sentenced to state prison. For this reason, In re James, supra, 38 Cal.2d 302, is no help in making the choice this court faces today between presentence and postsentence conduct credit statutes to determine the rate at *40which petitioner’s conduct credits accrued for the time she spent in prison before the valid conviction and sentence.
The majority next asserts that “the literal terms of the relevant statutes appear in accord with the result in James.” (Maj. opn., ante, at p. 33.) The majority explains its reasoning this way: “Section 4019, subdivision (a)(4), which petitioner contends should apply, applies to someone ‘confined in a county jail . . . following arrest and prior to the imposition of sentence for a felony conviction.’ By contrast, section 2933, subdivision (a), applies to ‘persons convicted of a crime and sentenced to state prison.’ [The time in question here] occurred after petitioner was convicted of a crime, and that confinement was served in state prison, not a local jail.” (Maj. opn., ante, at pp. 33-34.) I do not agree. The terms of the presentence credit statutes, as construed by the courts of this state, do indeed authorize credit for the prison custody time at issue here.
As relevant here, section 2900.5, subdivision (a), states: “In all felony . . . convictions . . . when the defendant has been in custody, including, but not limited to, any time spent in a jail, camp, work furlough facility, halfway house, rehabilitation facility, hospital, prison, juvenile detention facility, or similar residential institution, all days of custody of the defendant, including days served as a condition of probation in compliance with a court order, and including days credited to the period of confinement pursuant to Section 4019, shall be credited upon his or her term of imprisonment. . . .” (Italics added.) Presentence credits are awarded under section 2900.5 “regardless of the particular locale, institution, facility or environment of [the defendant’s] incarceration.” (In re Watson (1977) 19 Cal.3d 646, 651-652 [139 Cal.Rptr. 609, 566 P.2d 243].) Under section 2900.5, in August 1999, when petitioner received a nine-year prison sentence for petty theft, she was entitled to credit, including conduct credit under section 4019, for all previous custody time attributable to the same act of petty theft, including the time in state prison under the earlier invalid judgment.
Section 4019, subdivision (a)(4), authorizes presentence conduct credit at the 50 percent rate for time spent “confined in a county jail, industrial farm, or road camp, or a city jail, industrial farm, or road camp following arrest and prior to the imposition of sentence for a felony conviction.” Although section 4019 does not mention state prisons, it is settled that presentence credit may be awarded under section 4019 for time spent in state facilities, including prisons, before pronouncement of sentence for a felony conviction. (See People v. Buckhalter (2001) 26 Cal.4th 20, 30, fn. 6 [108 Cal.Rptr.2d 625, 25 P.3d 1103]; In re Anderson (1982) 136 Cal.App.3d 472, 476 [186 *41Cal.Rptr. 269].) Thus, the wording of the presentence credit statutes, sections 2900.5 and 4019, provides the majority no basis to treat petitioner’s time in state prison before she was validly convicted and sentenced as anything other than presentence time.
The majority argues that petitioner’s state prison time must be characterized as postsentence time because “ ‘prison inmates are conclusively guilty and presumptively in need of rehabilitation.’ ” (Maj. opn., ante, at p. 36, quoting People v. Caddick (1984) 160 Cal.App.3d 46, 53 [206 Cal.Rptr. 454].) This is a fair statement as applied to prison inmates who have been validly convicted, but an invalid conviction does not conclusively determine guilt nor does it establish a presumptive need of rehabilitation. Until a valid conviction is obtained, all persons accused of crime are equally entitled to a presumption of innocence and thus similarly situated for purposes of credit statutes.
The majority suggests that characterizing petitioner’s presentence state prison time as presentence time for purposes of computing conduct credits “would arguably create an equal protection problem” because she would have more presentence time, and thus more conduct credits, than a defendant whose initial conviction and sentence for the very same offense were not invalid. (Maj. opn., ante, at p. 36.) Yet, as the majority elsewhere acknowledges (id. at p. 35), these sorts of “incongruities” are inevitable and have not been thought sufficient to invalidate the entire credit scheme. (In re Joyner (1989) 48 Cal.3d 487, 495 [256 Cal.Rptr. 785, 769 P.2d 967].) Defendants convicted of the very same crime may have presentence custody times of widely differing length. One defendant may promptly plead guilty and have very little presentence time. Another may be validly convicted after jury trial and have significantly more presentence time. A third may be validly convicted only after two or three trials because the earlier trials terminated by the granting of a motion for mistrial, or because the trial court granted a motion for a new trial, or because the initial conviction was reversed on appeal. A fourth defendant may be validly convicted after one or more jury trials, be granted probation on conditions including substantial jail time, and later have probation revoked and a state prison sentence imposed. So long as the law sets different rates for accrual of presentence and postsentence custody credits, these defendants, all guilty of the same crime and sentenced to the same term, but with widely varying periods of pretrial custody, will have significantly different overall times of actual confinement.
I agree with the Court of Appeal here that in calculating conduct credits against petitioner’s nine-year state prison sentence pronounced in August *421999 for the crime of petty theft, all earlier periods of custody attributable to that petty theft, including the three years petitioner spent in state prison under an invalid conviction for the same crime, is presentence time. Accordingly, I would affirm the Court of Appeal’s judgment.
Werdegar, J., concurred.
Petitioner’s petition for a rehearing was denied June 18, 2003, and on June 20, 2003, the opinion was modified to read as printed above. Kennard, J., and Werdegar, J., were of the opinion that the petition should be granted.
Further statutory references are to the Penal Code.