The opinion of the court was delivered by
GAULKIN, J.A.D.Defendant pleaded guilty to escape from official detention at Marlboro Psychiatric Hospital in violation of N.J.S.A. 2C:29-5(a). With the approval of the court and the consent of the prosecutor, defendant reserved the right to appeal the denial of his earlier motion to dismiss the indictment. See R. 3:9-3(f). On this appeal defendant urges, as he did in the trial court, that, as a civil committee acquitted of a crime pursuant to N.J.S.A. 2A:163-2, he may not be prosecuted for escape under N.J.S.A. 2C:29-5(a).
In 1976 defendant was convicted by a jury of murder while armed in violation of N.J.S.A. 2A: 113-1 and N.J.S.A. 2A: 151-5. On his later application for post-conviction relief, R. 3:22, the conviction was vacated upon findings of the hearing judge that “bona fide doubt as to the competence of defendant during trial was presented,” that “no adequate competency hearing was conducted” and that the failure to conduct such a hearing “constituted a violation of the Constitutional right of the defendant to due process.” Defendant was then retried in 1980 without a jury and found not guilty by reason of insanity. *441After a further hearing, the judge entered an Order of Commitment reciting that “defendant would constitute a danger to himself and/or others were he to be released to the community” and committing him “to Trenton Psychiatric Hospital, or such other ... facility which is deemed appropriate [by] the Commissioner of Human Services.” That commitment was periodically reviewed and continued by subsequent orders which designated the place of commitment as Marlboro Psychiatric Hospital. On July 17, 1982, defendant left the hospital without permission. On or about September 8, 1982 he surrendered to law enforcement authorities in Eureka, California, whence he was extradited to New Jersey.
N.J.S.A. 2C:29-5(a) defines escape as removal “from official detention” without lawful authority. “Official detention,” in turn, is defined to include “committed pursuant to chapter 4 of this Title.... ” Defendant urges that since his commitment followed upon his acquittal of a Title 2A offense, he cannot be convicted of escape under Title 2C because N.J.S.A. 2C:l-l(b) makes Title 2C inapplicable “to offenses committed prior to its effective date.”
The argument is without merit. To be sure, the substantive provisions of Title 2A were applicable in the 1980 trial of the 1976 charges. But the ensuing commitment proceeding was a procedural step in a “case pending on or initiated after” the effective date of Title 2C, N.J.S.A. 2C:1 1(c), and was governed by N.J.S.A. 2C:4 7 and 8. See N.J.S.A. 20:11(c)(1); State v. Khan, 175 N.J.Super. 72, 79, 84 (App.Div.1980). Since defendant was thus “committed pursuant to chapter 4 of [Title 2C]” his 1982 departure from official detention without lawful authority was in violation of N.J.S.A. 2C:29-5(a).
Relying upon State v. Krol, 68 N.J. 236 (1975), and State v. Fields, 77 N.J. 282 (1978), defendant also urges that the statute so construed “is violative of equal protection rights” because a civil committee not acquitted by reason of insanity is *442not subject to any criminal sanction for an unauthorized departure from his place of commitment. As summarized in Fields, Krol held that “the fact that a mentally ill person has committed an act which would expose a mentally competent person to criminal sanction is a constitutionally unacceptable justification for granting him less procedural and substantive protection against involuntary commitment than that generally afforded all other members of society.” Fields, 11 N.J. at 294. But defendant has not been differentially treated with respect to the standards of his involuntary commitment. Rather, he has simply been made subject to a criminal statute which “might have gone farther than it did or might have included some persons or classes of persons who were excluded.” State v. Smith, 58 N.J. 202, 206 (1971). That does not equate to a denial of protection. Ibid.
Indeed, in Krol itself the court found that equal protection principles “do not require that all persons be treated identically,” that a defendant’s “past conduct is important evidence as to his probable future conduct” and that in commitment proceedings it is accordingly “appropriate for the court to give substantial weight to the nature and seriousness of the crime committed by defendant and its relationship to his present mental condition.” Krol, 68 N.J. at 253, 261. In Fields those considerations led the court to acknowledge that “a legally cognizable distinction between the two groups [of committees] does exist.” Fields, 11 N.J. at 308. The court there cited with approval this language from People ex rel. Henig v. Commissioner of Mental Hygiene, 43 N.Y.2d 334, 338, 372 N.E.2d 304, 306, 401 N.Y.S.2d 462, 465 (1977):
An individual who has committed an act of violence, and has thus demonstrated his dangerousness, and who has successfully asserted an insanity defense, may quite properly be treated somewhat differently from other individuals who, although they may in fact be potentially equally dangerous as a result of mental problems, have not yet so vehemently demonstrated their dangerousness by violent antisocial behavior. [Fields, 77 N.J. at 309.]
*443The United States Supreme Court recently expressed a similar view in Jones v. United States,- U.S.-,-, 103 S.Ct. 3043, 3051, 77 L.Ed.2d 694, 707 (1983). Speaking through Justice Powell, the Court held that there are “important differences between the class of potential civil-commitment candidates and the class of insanity acquittees” which justify some differential treatment. While the predictive value of prior dangerous acts is uncertain,
The lesson we have drawn is not that government may not act in the face of this uncertainty, but rather that courts should pay particular deference to reasonable legislative judgments, [id.-U.S. at-, 103 S.Ct. at 3050 n. 13, 77 L.Ed.2d at 705 n. 13.]
These authorities, we find, compel the conclusion that it is constitutionally permissible for the legislature to focus its penal enactment on the danger inherent in an escape by a person with a history of dangerous conduct. Accordingly we reject defendant’s challenge to the constitutionality of N.J.S.A. 2C:29-5(a) as applied to him.
Although we thus affirm the conviction, we must vacate the sentence. The judgment commits defendant “to the Commissioner of Human Services, Vroom Building, Trenton, New Jersey.” As the State points out, the sentence is illegal because it fails to fix a term of between three and five years for this third-degree offense. N.J.S.A. 2C:43-6(a)(3). Moreover, as the State urges, the “commitment” can only be to the custody of the Commissioner of the Department of Corrections. N.J.S.A. 2C:43-10(a). Defendant’s contention that the sentence represents a “civil commitment” and that it must include “a provision for periodic review” is without merit: defendant has pleaded guilty to a crime and a criminal sanction is mandated.
The sentence is accordingly vacated; in all other respects the judgment of conviction is affirmed. The matter is remanded to the Law Division for resentencing in accordance with this opinion. We do not retain jurisdiction.