
515 So.2d 738 (1987)
David TAL-MASON, Petitioner,
v.
STATE of Florida, Respondent.
No. 69508.
Supreme Court of Florida.
November 12, 1987.
Richard A. Belz and Jeffrey M. Leukel of Florida Institutional Legal Services, Inc., Gainesville, for petitioner.
Robert A. Butterworth, Atty. Gen. and Georgina Jimenez-Orosa, Asst. Atty. Gen., West Palm Beach, for respondent.
BARKETT, Justice.
We have for review State v. Tal-Mason, 492 So.2d 1179 (Fla. 4th DCA 1986), which expressly declared valid section 921.161(1), Florida Statutes (1985).[*] We have jurisdiction. Art. V., § 3(b)(3), Fla. Const. We quash the order of the district court and remand for further proceedings.
David Tal-Mason, petitioner, was arrested June 30, 1977, for first-degree murder and two counts of grand larceny, and indicted on July 26, 1977. On December 9, 1977, the trial court ordered him committed to the Department of Health and Rehabilitative Services ("HRS") for evaluation of his competence to stand trial.
Tal-Mason was transferred to the forensic unit of the South Florida State Hospital and in January 1978 was found mentally incompetent to stand trial. Between 1979 and 1981, he was returned to court on three separate occasions. Each time, he again was found incompetent to stand trial. In April 1982 he was transferred to the North Florida Evaluation and Treatment Center in Gainesville.
After spending five years and twenty-seven days in custody at state mental hospitals, Tal-Mason was found competent to stand trial on March 29, 1983. On August 8, 1983, he pled guilty to a charge of second-degree murder and was given a life sentence by the court.
On January 22, 1985, Tal-Mason filed a 3.850 motion on two grounds: (1) that he had spent one year and thirteen days in a county jail prior to trial, but had received credit only for one year; and (2) that the five years and twenty-seven days he spent *739 in state mental institutions should be credited against his sentence. The court granted Tal-Mason credit for the additional thirteen days of jail time, but denied credit for time in state institutions.
Tal-Mason filed a motion for rehearing, which was granted. Oral arguments were held July 10, 1985. At that time, the trial court reversed its prior decision and held section 921.161(1), Florida Statutes, unconstitutional as applied to Tal-Mason. The court then granted Tal-Mason credit for the five years and twenty-seven days spent in the state mental institution. The trial court reasoned that the statute violated Tal-Mason's equal protection and due process rights. State v. Tal-Mason, 11 Fla. Supp.2d 173, 176 (Fla. 17th Cir.Ct. 1985).
The state appealed to the Fourth District, which reversed the trial court. 492 So.2d at 1179. The Fourth District based its decision on this Court's opinion in Pennington v. State, 398 So.2d 815, 817 (Fla. 1981), which upheld the constitutionality of the statute in question and announced that
[h]alfway houses, rehabilitative centers, and state hospitals are not jails. Their purpose is structured rehabilitation and treatment, not incarceration.... Our statute, section 921.161(1), states: "[T]he court imposing a sentence shall allow a defendant credit for all of the time he spent in the county jail before sentence." ... We decline to extend the statute's plain language to require that credit be given in other circumstances.
(Emphasis in original.)
In Pennington, the petitioner had violated the conditions of her probation and subsequently was sentenced to five years in state prison on her original conviction. She appealed to this Court when the Fourth District refused to reverse a trial court order denying her credit for time spent in a live-in drug rehabilitation program, a condition of her probation. 398 So.2d at 816. We approved the district court's decision. Id. Accord Calhoun v. State, 403 So.2d 1082 (Fla. 1st DCA 1981); Turner v. State, 395 So.2d 1242 (Fla. 1st DCA 1981).
Turning now to the facts of this case, we find that commitment for incompetence, unlike probationary rehabilitation, infringes upon significant liberty interests in a particularly coercive manner. Probationary conditions are more in the nature of a contract between the probationer and the state. The defendant clearly has a choice to reject those conditions, albeit at the risk of continued detention in jail or prison. Thus, rather than restricting liberty, probationary rehabilitation usually serves to increase it by allowing the probationer an escape from involuntary confinement already lawfully imposed, in favor of a freer environment such as a community-based halfway house. For this reason, participation in such a rehabilitation program does not constitute a coercive deprivation of liberty, and a probationer is not entitled to credit for time spent there after a court finds that he has violated the terms of his probation.
Tal-Mason, on the other hand, clearly had no choice when he was confined in a state mental institution. He entered into no agreement with the state to obtain an early release from confinement or from any other punishment less restrictive than jail time. Rather than increasing his liberty, Tal-Mason's confinement was in the strictest sense a complete deprivation of liberty. He was in the total custody and control of the state at all times. And while his confinement involved psychological treatment, the primary purpose of both the treatment and the detention was to hold Tal-Mason until such time as he became competent to stand trial, if ever. Thus, his coercive commitment to a state institution was indistinguishable from pretrial detention in a "jail," as that term is understood in common and legal usage.
Black's Law Dictionary at 748 (5th ed. 1979) defines a "jail" as
[a] place of confinement that is more than a police station lockup and less than a prison. It is usually used to hold persons either convicted of misdemeanors (minor crimes) or persons awaiting trial.
With this definition in mind, we agree with Judge Anstead's statement in his concurring opinion below that there is "no meaningful *740 distinction ... between incarceration before trial in a county jail, and state enforced confinement in a mental hospital in preparation for trial." 492 So.2d at 1182. As our sister court in Kansas aptly noted,
The physical place of confinement is not important as the appellant technically continued to be in jail while held in custody at the hospitals. He was not free on bail, had no control over his place of custody and was never free to leave the hospitals. For all practical intents and purposes, he was still in jail. The court takes judicial notice that the state mental hospitals have the facilities to enforce confinement of their patients, which brings them within the dictionary definition of a "jail."
State v. Mackley, 220 Kan. 518, 519, 552 P.2d 628, 629 (1976). We similarly take judicial notice of the facilities for enforced confinement that exist in Florida's mental institutions.
For these reasons, we decline to read section 921.161(1), Florida Statutes, as a statement that jail-time credit may only be granted for time spent in an institution formally designated as a "county jail." Such a reading would elevate form over substance to the detriment of a significant liberty interest protected both by the Florida and federal constitutions, resulting in an arbitrary denial of rights for some preconviction detainees but not others. Our clear obligation is to interpret statutes in a manner consistent with constitutional rights wherever possible. Miami Dolphins, Ltd. v. Metropolitan Dade County, 394 So.2d 981, 988 (Fla. 1981); State v. Keaton, 371 So.2d 86, 89 (Fla. 1979); Sarasota County v. Barg, 302 So.2d 737, 741 (Fla. 1974). We believe that such a constitutional interpretation is available to us here.
Our courts already have tacitly recognized that a detainee must be granted credit for time served prior to conviction in any institution serving as the functional equivalent of a county jail. For instance, detainees who suffer physical injuries routinely spend time either in the prison wards of hospitals or in other health-related facilities, and routinely are granted jail-time credit for these periods. This is true even though the hospitals in question have not been formally designated as "county jails." Indeed, if a detainee's injuries are serious enough, he will remain in the hospital ward for treatment and his trial will be postponed accordingly.
Nor can we accept the state's argument that it is justified in discriminating against mentally ill detainees in this manner simply because Tal-Mason's detention involved "treatment." By necessary implication, this line of argument leads to the specious conclusion that the treatment of a physical injury somehow does not constitute "treatment." Medical treatment is not any more nor less "treatment" because it is aimed at serious emotional illnesses and not physical injury or disease, nor is there any legally significant difference between the two.
Indeed, the mere fact that treatment of any kind occurs during preconviction coercive detention is irrelevant if, as here, the criminal charges remain pending against the detainee and the detention will culminate, if at all, in a trial or a sentencing. The treatment in such circumstances is merely incidental to the detention, necessitated by the fact that the state has coercively assumed custody of the detainee.
For these reasons, we hold that there is no legitimate basis for granting jail-time credit for preconviction detention in a hospital for treatment of physical injuries, but not for preconviction detention in a mental institution for incompetence to stand trial. Both of these forms of detention constitute a coercive deprivation of liberty and implicate significant constitutional rights. When a defendant is committed for incompetence, the state has assumed total, if constructive, custody of that defendant as though he were in the county jail. To grant no jail-time credit for this kind of detention while allowing it for others constitutes a violation of equal protection and a denial of due process. We therefore hold that jail-time credit under section 921.161(1) must be awarded for Tal-Mason's preconviction coercive detention.
For these reasons, we quash the order of the district court below and remand for *741 further proceedings consistent with this opinion.
It is so ordered.
OVERTON, EHRLICH, SHAW, GRIMES and KOGAN, JJ., concur.
McDONALD, C.J., dissents with an opinion.
McDONALD, Chief Justice, dissenting.
While the majority opinion may be a desirable result, to reach that conclusion I feel we are impermissibly rewriting section 921.161(1), Florida Statutes (1985).
NOTES
[*]  Section 921.161(1) states:

A sentence of imprisonment shall not begin to run before the date it is imposed, but the court imposing a sentence shall allow a defendant credit for all of the time he spent in the county jail before sentence. The credit must be for a specified period of time and shall be provided for in the sentence.
