During the period from June 30, 1972, to November 2, 1972, the plaintiff was confined in the Community Correctional Center, New Haven, pursuant to writs of mittimus on charges which culminated in sentences of confinement. The -writs of mittimus had issued because the plaintiff, an indigent, was unable to deposit bail. Because thе plaintiff committed two separate infractions of jail regulations, the commissioner of correction ordered that a total of sixty days of presentence confinement credit, commonly referred to as “jail *541 time,” be deducted from the prisoner’s accоunt. The plaintiff thereupon filed a petition for a writ of habeas corpus, claiming that he had been deprived of his rights guaranteed by the fourteenth amendment to the United States constitution. The court dismissed his petition for a writ of habeas corpus, and the plaintiff has appealed therefrom.
This court in
Holmquist
v.
Manson,
I
The plaintiff claims that the proviso in §§ 18-97 and 18-98 of the General Statutes that jail time may be credited toward sentence only if the prisoner conforms to the rules of the institution violates the equal protection clause of the fourteenth amendment to the United States constitution. Equal protection analysis must commence with a determination of whether a legislative classification is invidious, or “inherently suspect,” or whether the legislation impinges upon a fundamental right. Where the legislation impinges upon a fundamental right or creates a suspect classification, then it must be struck down unless justified by a compelling state interest.
Dunn
v.
Blumstein,
The plaintiff claims that General Statutes 18-97 and 18-98 discriminate against indigents by permitting the commissioner to refuse to credit a detainee with time served if the detainee fаils to obey the rules of the institution, that indigency is a suspect classification, and that legislation based on that classification must be stricken unless it is based upon a compelling state interest. 2 The plaintiff had been sentenced to a term for certain *544 crimes. Had he been possessed of sufficient means, he would have commencеd serving that sentence when confined upon termination of his bail after sentencing. Instead, the plaintiff, an indigent, by force of a court order was confined prior to sentencing. There is no question that his sentence could not be lengthened by the commissioner of correсtion after sentencing. However, by vesting the commissioner with authority to refuse to credit to a detainee time served prior to sentencing, the statutes operate to clothe the.indigent with a vulnerability to longer confinement which his wealthier counterpart is not obliged to wear. 3
The refusal to credit the plaintiff with jail time affects the period of his confinement and directly impinges on his fundamental right of liberty.
In re Winship,
II
The statutes under consideration do not meet the tests required by the equal protection clause enumerated above for several reasons. They are underinclusive; Vaccarella v. Fusari, 365 F. Sup. 1164, 1170 (D. Conn.); see note, “Developments in the Law — Equal Protection,” 82 Harv. L. Rev. 1065, 1082-87; in thаt they do not reach all prisoners who do not conform to the rules of the institution, but only detainees. Secondly, they create irrational classifications: e.g., persons who are convicted and who, on appeal, secure a remand are placed in a better position than those awaiting trial; infractors of the institution’s rules who are eventually acquitted are not reached by the statutes; convicted prisoners who have been sentenced receive more favorable treatment than detainees.
A prisoner whose appeal is sustained and who is again convicted upon remand is no different from a prisoner awaiting initial trial and sentencing, because both are incarcerated awaiting sentencing and a proper disposition of their cases. It is constitutionally mandated that the “one time loser” receive credit for time served without permitting discretion by sentencing authorities.
Pruett
v.
Texas,
Further, detainees awaiting trial must be considered innocent. Confinement is not to be punitive in nature; its purpose is only to preserve order and discipline and to guaranteе that detainees will be available for trial.
Seale
v.
Manson,
326 F. Sup. 1375, 1379 (D. Conn.);
Butler
v.
Crumlish,
229 F. Sup. 565, 567, 568 (E.D. Pa.), injunction denied on other grounds, 237 F. Sup. 58 (E.D. Pa.); see
Jones
v.
Wittenberg,
323 F. Sup. 93, 100 (N.D. Ohio), aff’d sub nom.
Jones
v.
Metzger,
The statute also creates two classes of confined prisoners awaiting trial. It allows the commissioner to punish for infraction of prison regulations those who eventually are convicted but cаnnot reach those who are eventually acquitted, even if both are guilty of the identical infraction of prison regulations. In the first case, the prisoner’s sentence may thereby be administratively extended, and for acts which may not constitute violations of the General Stаtutes. The prisoner who is acquitted, however, cannot be punished for offenses committed in prison, unless they were also in violation of the
*547
General Statutes, and only after resort to judicial process, with, the entire range of constitutional safeguards inherent thereto. “Yеt it would be absurd to hold that a pre-trial detainee has less constitutional protection . . . than one who has been convicted.”
Johnson
v.
Glick,
Ill
It is true that the maintenance of discipline in a prison constitutes a compelling state interest. However, the method chosen must be ratiоnally connected to the end sought and must be within the constitutionally prescribed limitations with respect to the presentenced detainee. See
Stapf
v.
United States,
Therefore, that condition of §§ 18-97 and 18-98 that a person will receive credit for time served prior to sentencing only if he obeys the rules of the institution is not constitutionally valid, and the commissioner must credit such a person with аll time served prior to sentencing.
Ham
v.
North Carolina,
There is error, the judgment is set aside and the case is remanded with direction to render judgment in accordance with this opinion.
In this opinion the other judges concurred.
Notes
“[General Statutes] Sec. 18-97. credit towards fine or sentеnce EOK A PERIOD SPENT IN CUSTODY UNDER MITTIMUS. Any person receiving a fine or a sentence to a correctional institution or a community correctional center shall receive eredit towards any portion of such fine as is not remitted or any portion of such sentence as to which execution is not suspended for any days spent in custody under a mittimus as a result of any court proceeding for the offense or acts for which such fine or sentence is imposed, provided he shall conform to the rules of the institution. Upon notification from the commissioner of correction, the elerk of the court shall enter suсh credit upon the order in the case of a fine, and upon the mittimus in the case of a sentence and it shall be the duty of the ageney or person that held such person under such mittimus to inform the clerk of the court of the proper amount of such credit. In the case *542 оf a flue each credit day shall be computed at the rate of three dollars. Ia no event shall credit be allowed in excess of the fine or sentence actually imposed.” (Emphasis added.)
“[General Statutes] Sec. 18-98. commutation of sentence for PERIOD DURING WHICH BAIL WAS DENIED OR UNAVAILABLE. Any persоn who has been denied bail or who has been unable to obtain bail and who is subsequently imprisoned is entitled to commutation of his sentence by the number of days which he spent in a community correctional center from the time he was denied or was unable to obtain bail to the timе he was so imprisoned. The commissioner of correction shall, if such person has conformed to the rules of the institution, credit such person with the number of days to which the supervising officer of the correctional center where such person was confined while awаiting trial certifies such person was confined between the denial of bail to him or his inability to obtain bail and his imprisonment.” (Emphasis added.)
Courts have struck down classifications based upon wealth as constitutionally invidious discrimination.
Tate
v.
Short,
The statutеs violate the due process clause of the fourteenth amendment to the United States constitution where they operate to lengthen the time a prisoner must serve in confinement beyond the maximum authorized by. statute.
Williams
v.
Illinois,
