
83 Wn.2d 342 (1974)
517 P.2d 949
In the Matter of the Application for a Writ of Habeas Corpus of CLIFFORD A. REANIER, Petitioner,
v.
SIDNEY E. SMITH, Respondent. In the Matter of the Application for a Writ of Habeas Corpus of FREDERICK G. RINEHART, Petitioner,
v.
SIDNEY E. SMITH, Respondent. In the Matter of the Application for a Writ of Habeas Corpus of CHESTER R. WOODS, Petitioner,
v.
SIDNEY E. SMITH, Respondent. In the Matter of the Application for a Writ of Habeas Corpus of MICHAEL A. OLDS, Petitioner,
v.
SIDNEY E. SMITH, Respondent.
Nos. 42666, 42667, 42668, 42736.
The Supreme Court of Washington, En Banc.
January 10, 1974.
Lar Halpern and Gerald R. Tarutis of Legal Services Center (Seattle), for petitioners.
*343 Slade Gorton, Attorney General, and Thomas A. Prediletto, Assistant, for respondent.
HAMILTON, J.
The four petitioners in these consolidated applications for writs of habeas corpus are incarcerated in the penitentiary. They seek credit against their maximum and mandatory minimum terms for pretrial detention served because of their inability to post bail. They do not seek such credit against minimum terms as such may be fixed by the Board of Prison Terms and Paroles within its discretionary power.
After several prior convictions for which he served time and was variously paroled, petitioner Reanier was arrested on March 21, 1966, for second-degree assault in Kitsap County, Washington. He was confined in the county jail until April 19, 1966, when he was transferred by court order to Western State Hospital. He remained in detention there until he was returned to the county jail on May 31, 1966. He then entered a plea of guilty to the second-degree assault charge and was again transferred to Western State Hospital and retained in confinement there until February 14, 1968, when he was remanded to the county jail. On February 26, 1968, judgment and sentence on his plea of guilty was entered, by the terms of which he received a maximum term of 10 years. It is not disputed that he spent some 23 months in the county jail and Western State Hospital prior to judgment and sentence for which he did not receive credit upon the duration of the maximum term imposed.
Petitioner Rinehart was arrested and taken into custody on December 8, 1969, on a charge of second-degree burglary. Bail was fixed at $3,000, a sum he was unable to post. He remained in jail until trial and entry of judgment and sentence on March 31, 1970, at which time he received a maximum sentence of 15 years. A mandatory minimum of 7 1/2 years was subsequently diminished by the parole board pursuant to RCW 9.95.040. He was not credited on his maximum *344 or mandatory minimum term with approximately 4 months served in the county jail prior to trial.
On October 1, 1969, petitioner Woods was arrested and placed in jail on a narcotics charge. Bail was set at $3,000. He was unable to post that amount and remained incarcerated. He was convicted on March 23, 1970, and sentenced to a maximum term of 20 years with a 5-year mandatory minimum term. The mandatory minimum was later modified by the parole board. He likewise did not receive credit against his maximum or mandatory minimum sentence for the 5 1/2 months of pretrial detention.
Petitioner Olds was arrested and placed in custody on April 4, 1961, charged with first-degree murder and robbery. Because of the nature of the charge, bail was not set, and he remained in jail until his conviction and sentence on January 2, 1962. He received a sentence of life imprisonment. He must serve a mandatory minimum term of 20 years, which mandatory minimum cannot be waived by the parole board. He was not credited on his mandatory minimum term with the 9 months in jail prior to trial, conviction and sentence.
Generally speaking, under the prevailing statutory scheme of indeterminate sentences in the state of Washington, a sentencing court which sentences a convicted felon to state penal servitude must impose the maximum term for the offense where that term is fixed by statute. RCW 9.95.010.[1] Except where a mandatory minimum term is *345 fixed by statute, the Board of Prison Terms and Paroles is empowered, in the exercise of its discretion, to fix a minimum term of confinement and, in some instances, may modify through the parole process some mandatory minimum terms. RCW 9.95.040.[2]
*346 [1] Pursuant to RCW 9.95.060,[3] a sentence, absent designated circumstances, ordinarily commences to run from the entry of judgment and sentence.
Petitioners contend that failure to provide for and credit their statutory maximum and mandatory minimum terms with time served in detention prior to trial, conviction and sentencing violates their rights, under the fifth and fourteenth amendments to the United States Constitution, to due process of law, equal protection under the law, and freedom from multiple punishment. We agree.
Fundamental fairness and the avoidance of discrimination and possible multiple punishment dictate that an accused person, unable to or precluded from posting bail or otherwise procuring his release from confinement prior to trial should, upon conviction and commitment to a state penal facility, be credited as against a maximum and a mandatory minimum term with all time served in detention prior to trial and sentence. Otherwise, such a person's total time in custody would exceed that of a defendant likewise sentenced but who had been able to obtain pretrial release. Thus, two sets of maximum and mandatory minimum terms would be erected, one for those unable to procure pretrial release from confinement and another for *347 those fortunate enough to obtain such release. Aside from the potential implications of double jeopardy in such a situation,[4] it is clear that the principles of due process and equal protection of the law are breached without rational reason.
In the federal system of criminal justice, credit for pretrial detention has been provided. Prior to 1960, section 3568, Title 18, of the United States Code provided that the sentence of a federal prisoner did not begin to run until he was received at the place of confinement. No statutory provision existed for pretrial detention credit. An amendment was added in 1960 which provided only that credit for detention prior to trial for want of bail would be given where imposition of a mandatory minimum was required. In Stapf v. United States, 367 F.2d 326 (D.C. Cir.1966), the constitutionality of the statutory limitation of the amendment to mandatory minimum sentences was challenged by a federal prisoner who had been sentenced to a statutory maximum term of 5 years. He did not receive credit for 5 months' detention prior to trial arising from his inability to post bail. The Stapf court held that despite the absence of legislative authority for the administrative allowance of such credit, it was incumbent upon the sentencing court to exercise its sentencing authority consistently with constitutional requirements of due process and equal protection. Accordingly, the cause was remanded for the appropriate allowance of pretrial detention credit.
The rationale of Stapf has been acknowledged and followed in a number of federal circuits. Holt v. United States, 422 F.2d 822 (7th Cir.1970); Davis v. Willingham, 415 F.2d 344 (10th Cir.1969); United States v. Whitfield, 411 F.2d 545 (8th Cir.1969); Sobell v. United States, 407 F.2d 180 (2d Cir.1969); Lee v. United States, 400 F.2d 185 (9th Cir.1968); United States v. Jones, 393 F.2d 728 (6th *348 Cir.1968); Bryans v. Blackwell, 387 F.2d 764 (5th Cir.1967); United States v. Smith, 379 F.2d 628 (7th Cir.1967), cert. denied, 389 U.S. 993, 19 L.Ed.2d 486, 88 S.Ct. 491 (1967); Dunn v. United States, 376 F.2d 191 (4th Cir.1967).
In Sobell v. United States, supra, that court took an additional step. It held the Stapf rationale to be applicable to statutory maximum sentences imposed prior to the 1960 amendment of section 3568, Title 18, of the United States Code, and this despite a provision in the amendment that it was not to be given retroactive effect.
Furthermore, with respect to the federal system, it is notable that Congress again amended section 3568, Title 18, of the United States Code in 1966, so that it now provides for the administrative crediting of pretrial detention time in all instances involving commitment to a penal facility. This congressional step is in line with recommendations of the American Law Institute and the American Bar Association contained respectively in the Model Penal Code § 7.09 (Proposed Final Draft No. 1, 1961)[5] and Minimum Standards for Criminal Justice, Standards Relating to Sentencing Alternatives and Procedures § 3.6 (Approved Draft, 1968).[6]
Bearing more directly upon the obligation of a state in the area of pretrial detention credit is the case of Culp v. *349 Bounds, 325 F. Supp. 416 (W.D.N.C. 1971). There the state of North Carolina refused to credit the petitioner, Culp, with pretrial detention time on two consecutive statutory maximum sentences of 10 years. In granting relief, the court referred to and quoted from North Carolina v. Pearce, 395 U.S. 711, 23 L.Ed.2d 656, 89 S.Ct. 2072 (1969), wherein it was held that credit must be given for time spent in detention during a review process which resulted in a new trial, a second conviction and a resentencing. The Culp court said at page 419:
The Pearce rationale, applied to include the facts of this particular case, suggests that Culp should be given credit for time spent in custody prior to commitment where he has been given a maximum sentence. Pre-trial detention is nothing less than punishment. An unconvicted accused who is not allowed or cannot raise bail is deprived of his liberty. His incarceration is indistinguishable in effect from that of one, such as Pearce, who is retried after obtaining post-conviction relief. In both instances, the power of the state has been utilized to punish the complainant. Fundamental notions of fair play as well as the double jeopardy clause require that Culp receive credit for pre-commitment incarceration. See also, Wright v. Maryland Penitentiary, 429 F.2d 1101 (4th Cir., 1970) and Wilson v. North Carolina, 438 F.2d 284 (4th Cir., 1971).
Alternatively, the state's refusal to give Culp credit for pre-trial detention is an unconstitutional discrimination on the basis of wealth prohibited by the Fourteenth Amendment. As outlined above, wealthy defendants (except where no bail is allowed) are able to remain out of prison until conviction and sentencing; the poor stay behind bars. While such a situation may often be compelled by the present (especially state) bail procedures, it should not be compounded by refusal to credit prisoners in Culp's situation with time incarcerated prior to trial and commitment. Such a distinction, which, in effect, provides for differing treatment on the basis of wealth, is unconstitutional absent some "compelling governmental interest." See, McDonald v. Board of Election Commissioners of Chicago, 394 U.S. 802, 89 S.Ct. 1404, 22 L.Ed.2d 739 (1969).
*350 We deem the reasoning of the Culp decision to be sound and persuasive.
Apropos, also, to the issues at bench, are the decisions of the United States Supreme Court in the cases of Williams v. Illinois, 399 U.S. 235, 26 L.Ed.2d 586, 90 S.Ct. 2018 (1970), Morris v. Schoonfield, 399 U.S. 508, 26 L.Ed.2d 773, 90 S.Ct. 2232 (1970), and Tate v. Short, 401 U.S. 395, 28 L.Ed.2d 130, 91 S.Ct. 668 (1971). In this trilogy the United States Supreme Court, in essence, determined that it was constitutionally impermissible, on equal protection grounds with overtones of due process implications,[7] to imprison a person because of his financial inability to pay a fine, i.e., "work-off" time.
In Williams v. Illinois, supra, the defendant was sentenced to a statutory maximum term of 1 year in jail and a $500 fine plus $5 costs. The judgment also provided that, if the defendant defaulted in the payment of the fine and costs, he should remain in jail following conclusion of his 1-year sentence and thereby "work off" the monetary obligation at $5 per day. The defendant was unable to pay and, facing an additional 101 days of imprisonment, challenged the constitutionality of the "work-off" scheme. In striking down the statute authorizing the tacking on of the additional time, the court noted on pages 242 and 244 respectively:
Since only a convicted person with access to funds can avoid the increased imprisonment, the Illinois statute in operative effect exposes only indigents to the risk of imprisonment beyond the statutory maximum. By making the maximum confinement contingent upon one's ability to pay, the State has visited different consequences on two categories of persons since the result is to make incarceration in excess of the statutory maximum applicable only to those without the requisite resources to satisfy the money portion of the judgment.
and
We hold only that the Equal Protection Clause of the *351 Fourteenth Amendment requires that the statutory ceiling placed on imprisonment for any substantive offense be the same for all defendants irrespective of their economic status.
Thus, we have the United States Supreme Court in North Carolina v. Pearce, supra, mandating on double jeopardy grounds the granting of credit upon a resentencing for penal time spent under a vacated sentence and, in Williams v. Illinois, supra, precluding on equal protection grounds the tacking on of fine "work-off" time to a maximum sentence thereby extending that term. Furthermore, our statutes, RCW 9.95.062[8] and RCW 9.95.063,[9] provide for detention credit pending the appeal of a conviction as well as credit for time served prior to a resentencing where a new trial has been granted.
We can see no practical, realistic or substantive difference between time spent in pretrial detention for want of bail and time spent in detention pending an appeal of a conviction or time spent under a subsequently vacated and reinstated sentence. It is all time spent in confinement and, if not credited against a maximum or mandatory minimum sentence, has the ultimate effect of enlarging the time of potential confinement dictated by the maximum or mandatory minimum sentence.
The respondent, in contesting petitioners' applications for relief, relies heavily upon McGinnis v. Royster, 410 U.S. 263, 35 L.Ed.2d 282, 93 S.Ct. 1055 (1973). We find it *352 distinguishable. In that case, the inmates seeking relief had been afforded credit on their sentences for pretrial jail time. In addition thereto, they were seeking allowance of "good time" credits against such jail time. Noting the distinction between pretrial detention in a county jail and confinement in a state penal facility after sentence from the standpoint of a state's rehabilitative program and parole scheme, the court found no constitutional inhibition to disallowing good time credits during presentence jail time. We do not conceive that this decision stands as authority for denial of presentence, jail time credit.
Respondent also cites State v. Wills, 68 Wn.2d 903, 416 P.2d 124 (1966) and Cook v. Rhay, 1 Wn. App. 931, 465 P.2d 201 (1970), as standing for the proposition that in the absence of express legislative authority for crediting pretrial detention time on either maximum or mandatory minimums, the courts may not order such. We do not read these cases as so holding. State v. Wills, supra, was concerned with jail time served as a condition to probation which was subsequently revoked. We noted that this fact or factor could be considered and evaluated subject to the discretion of the Board of Prison Terms and Paroles in fixing the minimum sentence. In Cook v. Rhay, supra, the jail time involved was that served under a suspension of parole pending trial on new charges. The court allowed such time to be credited against the sentence on the new charges following a nunc pro tunc reinstatement of the original parole. While some states have taken the position advocated by respondent, the trend appears to be moving in the direction we have taken. Cf. Thompson v. State, 496 P.2d 651 (Alas. 1972); People v. Jones, 489 P.2d 596 (Colo. 1971); and Schornhorst, Presentence Confinement and the Constitution: The Burial of Dead Time, 23 Hast. L.J. 1041 (1972).
We conclude that considerations of due process, equal protection and the prohibition against multiple punishments dictate that presentence jail time be credited against maximum and mandatory minimum terms where applicable. *353 Accordingly, pretrial detention time should be administratively credited against the maximum sentences of petitioners Reanier, Rinehart, and Woods, and against the mandatory minimum sentence of petitioner Olds.
HALE, C.J., and FINLEY, ROSELLINI, HUNTER, STAFFORD, WRIGHT, UTTER, and BRACHTENBACH, JJ., concur.
NOTES
[1]  "When a person is convicted of any felony, except treason, murder in the first degree, or carnal knowledge of a child under ten years, and a new trial is not granted, the court shall sentence such person to the penitentiary, or, if the law allows and the court sees fit to exercise such discretion, to the reformatory, and shall fix the maximum term of such person's sentence only.

"The maximum term to be fixed by the court shall be the maximum provided by law for the crime of which such person was convicted, if the law provides for a maximum term. If the law does not provide a maximum term for the crime of which such person was convicted the court shall fix such maximum term, which may be for any number of years up to and including life imprisonment but in any case where the maximum term is fixed by the court it shall be fixed at not less than twenty years." RCW 9.95.010.
[2]  "Within six months after the admission of a convicted person to the penitentiary, reformatory, or such other state penal institution as may hereafter be established, the board of prison terms and paroles shall fix the duration of his confinement. The term of imprisonment so fixed shall not exceed the maximum provided by law for the offense of which he was convicted or the maximum fixed by the court where the law does not provide for a maximum term.

"The following limitations are placed on the board of prison terms and paroles with regard to fixing the duration of confinement in certain cases, notwithstanding any provisions of law specifying a lesser sentence, to wit:
"(1) For a person not previously convicted of a felony but armed with a deadly weapon at the time of the commission of his offense, the duration of confinement shall not be fixed at less than five years.
"(2) For a person previously convicted of a felony either in this state or elsewhere and who was armed with a deadly weapon at the time of the commission of his offense, the duration of confinement shall not be fixed at less than seven and one-half years.
"The words `deadly weapon,' as used in this section include, but are not limited to, any instrument known as a blackjack, sling shot, billy, sand club, sandbag, metal knuckles, any dirk, dagger, pistol, revolver, or any other firearm, any knife having a blade longer than three inches, any razor with an unguarded blade, and any metal pipe or bar used or intended to be used as a club, any explosive, and any weapon containing poisonous or injurious gas.
"(3) For a person convicted of being an habitual criminal within the meaning of the statute which provides for mandatory life imprisonment for such habitual criminals, the duration of confinement shall not be fixed at less than fifteen years. The board shall retain jurisdiction over such convicted person throughout his natural life unless the governor by appropriate executive action orders otherwise.
"(4) Any person convicted of embezzling funds from any institution of public deposit of which he was an officer or stockholder, the duration of confinement shall be fixed at not less than five years.
"Except when an inmate of the reformatory, penitentiary or such other penal institution as may hereafter be established, has been convicted of murder in the first or second degree, the board may parole an inmate prior to the expiration of a mandatory minimum term, provided such inmate has demonstrated a meritorious effort in rehabilitation and at least four board members concur in such action: Provided, That any inmate who has a mandatory minimum term and is paroled prior to the expiration of such term according to the provisions of this chapter shall not receive a conditional release from supervision while on parole until after the mandatory minimum term has expired." RCW 9.95.040.
[3]  "When a convicted person appeals from his conviction and is at liberty on bond pending the determination of the appeal by the supreme court or the court of appeals, credit on his sentence will begin from the date such convicted person is returned to custody. The date of return to custody shall be certified to the department of institutions, the Washington state board of prison terms and paroles, and the prosecuting attorney of the county in which such convicted person was convicted and sentenced, by the sheriff of such county. If such convicted person does not appeal from his conviction, but is at liberty for a period of time subsequent to the signing of the judgment and sentence, or becomes a fugitive, credit on his sentence will begin from the date such convicted person is returned to custody. The date of return to custody shall be certified as provided in this section. In all other cases, credit on a sentence will begin from the date the judgment and sentence is signed by the court." RCW 9.95.060.
[4]  This refers to the aspect of double jeopardy prohibiting multiple punishments and arises from the possibility of serving more actual time in confinement on a maximum or mandatory minimum sentence than provided by law.
[5]  "Section 7.09. Credit for Time of Detention Prior to Sentence; ...

"(1) When a defendant who is sentenced to imprisonment has previously been detained in any state or local correctional or other institution following his ... [arrest for] the crime for which such sentence is imposed, such period of detention following his ... [arrest] shall be deducted from the maximum term, and from the minimum, if any, of such sentence."
[6]  "3.6 Credit.

"(a) Credit against the maximum term and any minimum term should be given to a defendant for all time spent in custody as a result of the criminal charge for which a prison sentence is imposed or as a result of the conduct on which such a charge is based. This should specifically include credit for time spent in custody prior to trial, during trial, pending sentence, pending the resolution of an appeal, and prior to arrival at the institution to which the defendant has been committed."
[7]  See Justice Harlan's concurrence in Williams v. Illinois, 399 U.S. 235, 26 L.Ed.2d 586, 90 S.Ct. 2018 (1970).
[8]  "An appeal by a defendant in a criminal action shall stay the execution of the judgment of conviction.

"In case the defendant has been convicted of a felony, and has been unable to furnish a bail bond pending the appeal, the time he has been imprisoned pending the appeal shall be deducted from the term for which he was theretofore sentenced to the penitentiary, if the judgment against him be affirmed." RCW 9.95.062.
[9]  "If a defendant who has been imprisoned during the pendency of any post-trial proceeding in any state or federal court shall be again convicted upon a new trial resulting from any such proceeding, the period of his former imprisonment shall be deducted by the superior court from the period of imprisonment to be fixed on the last verdict of conviction." RCW 9.95.063.
