
5 Cal.3d 313 (1971)
486 P.2d 1213
96 Cal. Rptr. 13
THE PEOPLE, Plaintiff and Respondent,
v.
HARRY COLEY SMITH, Defendant and Appellant.
Docket No. Crim. 15161.
Supreme Court of California. In Bank.
July 7, 1971.
*315 COUNSEL
William C. Kuhs, under appointment by the Supreme Court, for Defendant and Appellant.
Thomas C. Lynch and Evelle J. Younger, Attorneys General, Doris H. Maier, Assistant Attorney General, Edward A. Hinz, Jr., and Arnold O. Overoye, Deputy Attorneys General, for Plaintiff and Respondent.
OPINION
WRIGHT, C.J.
Defendant appeals from an order of the superior court directing that his commitment to the California Youth Authority be extended for a period of five years, pursuant to Welfare and Institutions Code sections 1800-1803,[1] on the ground that he is dangerous to the public because of mental or physical deficiency, disorder, or abnormality.
In In re Gary W., ante, page 296 [96 Cal. Rptr. 1, 486 P.2d 1201], also decided today, we considered and decided adversely to appellant his contentions that commitment pursuant to sections 1800-1803 constitutes cruel and unusual punishment for status, that application of those sections to Youth Authority wards denies equal protection, and we also decided that the burden of proof in such commitment proceedings should be that of other civil commitments. We also held that persons subject to commitment under sections 1800-1803 are entitled, upon request, to a jury trial and a three-fourths verdict on the question whether they meet the statutory criteria for continued control.
Respondent seeks to distinguish the order here involved on the ground that no denial of equal protection occurred in refusing appellant a jury trial since it was entered before the effective date of the Lanterman-Petris-Short Act (Stats. 1967, ch. 1667; Welf. & Inst. Code, §§ 5000-5401) which extended jury trial rights to other persons subject to involuntary commitment procedures. A further question not before us in In re Gary W. also arises here in appellant's contention that the provision of section 1802 which permits the court to extend control over a ward committed after conviction of a criminal offense for a period of five years, while permitting continued control over a ward received from the juvenile court for only two years, irrationally and unreasonably discriminates between the two classes of Youth Authority wards subject to extended control pursuant to sections 1800-1803 and thus violates the equal protection clause *316 of the Fourteenth Amendment of the United States Constitution and article I, sections 11 and 21 of the California Constitution.
We have concluded that appellant is entitled to a jury trial and that, if upon rehearing he is again committed, the period of extended control may not exceed two years.
Appellant Harry Coley Smith was convicted in 1964, upon a plea of guilty, of forcible rape (Pen. Code, § 261 subd. 3). He was committed to the California Youth Authority by the superior court for the term prescribed by law. (§ 1771.) He was paroled in 1966, but his parole was revoked the next year for "overall poor adjustment to parole conditions."
The Youth Authority petitioned the superior court for a five-year period of continued control over appellant, alleging in the statutory language that he was a physical danger to society. (§§ 1800-1803.) Counsel and two psychiatrists were appointed for appellant. Prior to the date for hearing, defense counsel filed a motion to dismiss the petition for want of jurisdiction on the ground that sections 1800-1803 are unconstitutional. The motion was denied. After hearing, the court found appellant to be a person described in section 1800 and on April 24, 1969, ordered his commitment extended for a period of five years. He appeals from this order.
(1) We found in In re Gary W., supra, ante, at page 307, that the rights afforded persons subject to commitment under section 1800 are substantially different from those guaranteed in other, similar commitment procedures, and that no rational basis exists for the distinctions drawn with respect to the right to a jury trial. Respondent contends, however, that the principal statute on which appellant's equal protection claim is based, the Lanterman-Petris-Short Act, did not become effective until July 1, 1969, more than a month after his commitment was extended. Thus, respondent argues, at the time of commitment there was no violation of appellant's right to equal protection. Respondent also points out that section 5007 prevents the application of Lanterman-Petris-Short Act provisions "retroactively to terminate court commitments of mentally ill persons or inebriates under preexisting law." This of couse ignores the fact that appellant is neither a mentally ill person nor an inebriate within the meaning of section 5007. Moreover, our holding in In re Gary W. was not based solely upon comparison with rights granted others under the Lanterman-Petris-Short Act but also considered similar commitment provisions applicable to mentally disordered sex offenders (§§ 6318, 6321) and present and potential narcotics addicts (§§ 3050, 3051, 3108). (In re Gary W., supra, ante, at p. 305.) The respective provisions governing those proceedings *317 were in effect at the time appellant's continued detention was ordered. Furthermore, our holding in In re Gary W. was based not only on the denial of equal protection, but also on the denial of due process inherent in depriving a person of his liberty without affording him a right to a jury trial.
Appellant is entitled to a jury trial on the question whether he is dangerous to the public because of mental or physical deficiency, disorder, or abnormality.
(2) Appellant was ordered to remain under Youth Authority control for five years. He contends that section 1802, which provides for a longer period of continued control for persons, like himself, who are committed to the Youth Authority after a conviction in a criminal proceeding than for persons committed by a juvenile court, violates the equal protection clause of the United States Constitution and the comparable provisions of the California Constitution.
The Welfare and Institutions Code provides for commitment of three classes of persons to the Youth Authority. Commitments by the juvenile court (§ 1769) are for a two-year period, or until the ward becomes 21, whichever occurs later. Persons under the age of 21 who are convicted of a misdemeanor may be committed to the Youth Authority for two years or until their 23d birthday, whichever occurs later. (§ 1770.) Finally, persons under the age of 21 who are convicted of a felony may be committed to the Youth Authority for five years or until they become 25, whichever occurs later. (§ 1771.)
Appellant does not dispute the rational basis of those statutory distinctions. It seems clear that their purpose is to assure some minimum period of control which will enhance the opportunity for rehabilitation. Differences do exist between persons sent to the Youth Authority by the juvenile, municipal, and superior courts. The distinctions between felons and misdemeanants is obvious. It is also reasonable to treat minors committed to the Youth Authority by a juvenile court differently from persons who have undergone criminal convictions. Minors who are by reason of a violation of any criminal law found to be persons described in section 602, if they were 16 years of age or older at the time of the offense and are not amenable to the care, treatment, and training program available through the juvenile court, may be found by the juvenile court not to be fit and proper subjects and may thereafter be prosecuted under the applicable criminal statute. (§ 707.) The factors upon which an unsuitability finding is based are generally those which indicate a relatively poor prognosis for rehabilitation  the maturity of the individual, numerous prior contacts with the courts, the seriousness of the offense alleged or proved, the *318 youth's attitude toward treatment, and his general behavior pattern as revealed by the probation officer's report. (See Jimmy H. v. Superior Court (1970) 3 Cal.3d 709, 713-715 [91 Cal. Rptr. 600, 478 P.2d 32].)
Thus, there is substantial support for the generalization implicit in the statutory framework that the origin of the commitment bears some rational relationship to the length of commitment that may be necessary to achieve the rehabilitative goal.
It is another question entirely whether the disparate periods of continued control prescribed by section 1802 may be similarly justified. That section provides that "When an order for continued detention is made as provided in Section 1801, the control of the authority over the person shall continue ... [for a period of two years] in the case of persons committed by the juvenile court, or ... five years ... in the case of persons committed after conviction in criminal proceedings...." The differences that may be presumed to exist among various classes of Youth Authority wards for purposes of establishing the maximum period of confinement under their original commitment to the Youth Authority are in no way relevant to the later determination required by section 1800. The basis of the section 1800 adjudication and the purpose of the extended detention is the present dangerous status of the ward and his need for treatment of the mental or physical deficiency, disorder, or abnormality. (In re Gary W., supra, ante, at p. 302; In re Valenzuela (1969) 275 Cal. App.2d 483, 486, 487 [79 Cal. Rptr. 760]; In re J.F. (1969) 268 Cal. App.2d 761, 769 [74 Cal. Rptr. 464]; In re Cavanaugh (1965) 234 Cal. App.2d 316, 322 [44 Cal. Rptr. 422].) No rational distinctions can be drawn among the various classes of persons committed to the Youth Authority with respect to their dangerousness or the anticipated duration of necessary treatment by reference to the nature of their original commitment. Their age, the seriousness of the act which originally occasioned their commitment, their past history of delinquency or criminal involvement, and the number of years they have been confined in the Youth Authority while possibly relevant are not dispositive of the issue of whether by reason of present mental or physical deficiency, disorder, or abnormality they are physically dangerous to the public.
It is the generally prevailing view that a state need only show a rational connection between distinctions drawn by a statute and the legitimate purpose thereof to uphold its constitutionality. (See In re Gary W., supra, ante, at p. 306.) As we pointed out in In re Gary W., however, closer scrutiny is afforded a statute which affects a fundamental interest. The state's power to order the involuntary commitment of a person suspected of being a danger to the public is a proper case in which to impose upon *319 the state the more onerous burden of demonstrating that there exists a compelling interest and that the distinction is necessary to further that purpose. (See In re Gary W., supra, ante, at p. 306.)
Respondent suggests that the increased age of those subject to section 1800 after an adult court commitment (compare §§ 1770, 1771 with § 1769) provides a rational basis for distinctions in the periods of continued control because presumably those who are older are more entrenched in the behavior pattern which gives rise to their deficiency, disorder or abnormality. No showing, however, has been made that increased age is an exacerbating factor in a person's dangerousness. Moreover, because the section 1800 procedure contemplates possible periodic redeterminations of dangerousness throughout a subject's life, his age at the time of the first such determination is hardly a rational basis on which to premise lifelong disparities between himself and other persons similarly situated. That the ages of different classes of Youth Authority wards differ at the initial section 1800 proceedings results solely from the origins of the underlying commitments, which origins bear little relationship to the wholly different determinations that section 1800 requires.[2]
The conclusion is therefore compelled that the arbitrary distinctions drawn by section 1802 are wholly unjustifiable. There is no reason to distinguish between persons subject to commitment under section 1800 on the basis of the origin of their commitment for the purpose of determining their present danger to the public.
Accordingly, whatever the result of the proceedings below with respect to the issue of appellant's dangerousness, in no event may his commitment be extended for a period of time longer than that which could properly be imposed on a ward of the Youth Authority who was originally committed by a juvenile court.
Because we reverse the order appealed from, it is not necessary to consider appellant's assertion that the evidence was insufficient to support the court's findings.
*320 The order appealed from is reversed and the matter is remanded to the superior court for proceedings not inconsistent with this opinion.
McComb, J., Peters, J., Tobriner, J., Mosk, J., Burke, J., and Sullivan, J., concurred.
NOTES
[1]  Unless otherwise indicated, all references are to the Welfare and Institutions Code.
[2]  Respondent also suggests that because section 1766 permits parole or discharge of a Youth Authority ward at any time there is in fact no disparity between those whose commitments are extended in five-year periods and those subject to rereview every two years (see also §§ 1762-1765). The substantial rights to a full hearing, jury trial and appeal afforded by sections 1800-1803 should not be so lightly regarded. It is not improbable that one subject to commitment pursuant to section 1800 has his best chance of release at the periodic hearing, section 1766 notwithstanding.
