
119 N.H. 214 (1979)
ROBERT GRINDLE
v.
GARY MILLER, SUPERINTENDENT NEW HAMPSHIRE HOSPITAL.
No. 78-199.
Supreme Court of New Hampshire.
April 6, 1979.
*215 Cathy J. Green, of Manchester, by brief and orally, for the plaintiff.
Thomas D. Rath, attorney general (Richard B. Michaud, assistant attorney general, orally), for the State.
PER CURIAM.
This case involves the constitutionality of RSA ch. 173-A, as amended (Supp. 1977), the Dangerous Sexual Offenders Act. On March 11, 1976, the plaintiff pleaded guilty to five indictments charging him with aggravated felonious sexual assault. In accordance with RSA 173-A:3 (Supp. 1977), he was evaluated at the New Hampshire Hospital, and on June 4, 1976, was adjudicated by the superior court to be a dangerous sexual offender (hereinafter DSO) and "committed to the director of mental health" for an indefinite term. RSA 173-A:5. Two years later the plaintiff filed a petition for a writ of habeas corpus challenging certain procedural aspects of RSA ch. 173-A. The case was transferred without ruling by Flynn, J.
A DSO is defined in RSA 173-A:2 as
any person suffering from such conditions of emotional instability or impulsiveness of behavior, or lack of customary standards of good judgment, or failure to appreciate the consequences of his acts, or a combination of any such conditions, as to render such person irresponsible with respect to sexual matters and thereby dangerous to himself, or to other persons.
For certain crimes the convicting court must, and for other crimes may, order a psychiatric examination of the convicted person "prior to sentencing." RSA 173-A:3 (Supp. 1977). If the examining psychiatrist *216 determines that a convicted defendant may be a DSO, the court holds a hearing to determine whether the defendant is a DSO. At this hearing, the defendant is entitled to be represented by counsel, to have counsel appointed if he is indigent, to have subpoenas issued out of the court to compel the attendance of witnesses in his behalf. RSA 173-A:4 I. If the trial judge concludes that the defendant is a DSO, the defendant will be "committed to the director of mental health to be confined to New Hampshire Hospital." RSA 173-A:5. The defendant may be transferred to the State prison if "the director determines that [he] is not amenable to psychiatric treatment or that he has received maximum benefit from treatment and remains a dangerous sexual offender." RSA 173-A:6 II. The director may recommend the defendant's release to the committing court, and the defendant may petition the superior court for his release. RSA 173-A:9 I, II. If the court determines after hearing that the defendant is not a DSO, the court will impose sentence. RSA 173-A:10.
The plaintiff contends that the provisions of RSA ch. 173-A violate due process and equal protection. Under New Hampshire law, procedures for involuntary commitments are established by three statutes. Persons may be committed civilly pursuant to RSA 135-B:26-38, committed as criminally insane pursuant to RSA 651:9 (Supp. 1977), and committed as dangerous sexual offenders pursuant to RSA ch. 173-A. Members of the first two groups are provided with a renewal hearing after they have been committed for two years. RSA 135-B:38; RSA 651:11-a (Supp. 1977); see Gibbs v. Helgemoe, 116 N.H. 825, 367 A.2d 1041 (1976). Persons committed under RSA ch. 173-A are not granted biennial renewal hearings, and must instead either petition for release or have their release recommended to the committing court by the director of mental health. RSA 173-A:9, I, II. If the committed person petitions for release, the petition must be accompanied by a statement under oath by a qualified psychiatrist stating that the DSO has recovered or that his condition has improved to the extent that he is no longer dangerous. RSA 173-A:9 II. The plaintiff contends that these more stringent release procedures violate equal protection because there is no rational basis for distinguishing between a DSO and other individuals involuntarily committed to the New Hampshire Hospital.
The plaintiff relies upon Baxstrom v. Herold, 383 U.S. 107 (1966), and Humphrey v. Cady, 405 U.S. 504 (1972), to support his contention that the procedures violate equal protection. In Baxstrom, the Court held that a State prisoner, who became insane while confined in prison and was committed at the end of his sentence without the procedural *217 safeguards afforded other persons civilly committed, was denied equal protection. In Humphrey, the petitioner was convicted under a sex crimes statute and was committed for a potentially indefinite period of time in lieu of sentence. The petitioner argued that his commitment violated equal protection because it was similar to a mental health act commitment, which contained a statutory right to a jury determination of the issue, but the sex crimes commitment occurred without a jury determination. Id. at 508. The case was remanded for an evidentiary hearing on the petitioner's constitutional claims. Id. at 506. These cases are not dispositive of the plaintiff's claim. "Neither Baxstrom nor Humphrey resolved the question of similarity between psychopathy and insanity commitment proceedings; neither case mandated identical procedures for the two types of proceedings." Note, Commitment of Sexual Psychopaths and the Requirements of Procedural Due Process, 44 FORDHAM L. REV. 923, 936 (1976) [hereinafter Commitment of Sexual Psychopaths].
[1] RSA ch. 173-A may be construed as permitting separate civil commitment proceedings. See Commitment of Sexual Psychopaths at 926 n.21. This construction, however, raises serious constitutional questions. Although Baxstrom and Humphrey do not resolve the plaintiff's equal protection claim, it is clear that permitting different procedures for the commitment and release of DSO's from those provided for commitment of persons acquitted by reason of insanity or civil commitments generally would violate equal protection under N.H. Const. pt. 1, art. 1. A different construction of the statute is preferable; "[i]t is a basic principle of statutory construction that a legislative enactment will be construed to avoid conflict with constitutional rights wherever reasonably possible." State v. Smagula, 117 N.H. 663, 666, 377 A.2d 608, 610 (1977).
[2] Unlike the statute which preceded it, RSA ch. 173-A does not speak in terms of civil commitment. See RSA ch. 173 (Laws 1949, ch. 314), repealed Laws 1969 ch. 443:2. See also Hudson v. Miller, 119 N.H. 142, 399 A.2d 612 (1979). Thus the statute may be construed as permitting sentence to an institution as an alternative to prison sentence. This alternative sentence does not violate the plaintiff's constitutional rights so long as the time served does not extend beyond the maximum sentence for the underlying crime. United States ex rel. Demeter v. Yeager, 418 F.2d 612 (3d Cir. 1969), cert. denied, 398 U.S. 942 (1970).
[3] RSA 173-A:3 I (Supp. 1977) provides that the convicting court order psychiatric examination "prior to sentencing." Presently, the court imposes sentence only if it determines that the person is not a *218 DSO. We now require that, regardless of the result of the psychiatric report, trial courts impose an appropriate sentence for the crime of which the person was convicted. This new requirement will insure that all convicted criminals who are declared DSO's will have a criminal sentence imposed. See RSA 651:2; cf. State v. Smagula, 117 N.H. 663, 377 A.2d 608 (1977) (judicial construction added guidelines to cure otherwise unconstitutionally vague statutory provision).
[4-7] Under this construction, when the defendant has served his sentence, he must be released unless the State has him civilly committed under RSA ch. 135-B. See Baxstrom v. Herold, 383 U.S. 107 (1966). During his sentence, a defendant may be transferred between institutions as his condition warrants. RSA 623:1 (Supp. 1977). All time served, both pretrial and post-sentence, regardless of location, shall be credited against any sentence imposed. RSA 651:55-c (Supp. 1977). Because a finite sentence will be served by a convicted DSO, the two-year hearings mandated by Gibbs v. Helgemoe, 116 N.H. 825, 367 A.2d 1041 (1976) and State v. Gregoire, 118 N.H. 140, 384 A.2d 132 (1978), are not required. The hearing provided by RSA 173-A:4 merely determines the institution to which a convicted person will be committed. The court's determination of whether the convicted person is a DSO does not require proof beyond a reasonable doubt. Because the DSO will serve the same sentence regardless of the institution in which he is incarcerated, the discharge procedures of RSA ch. 651, which governs sentencing, will apply. These provisions supersede those set forth in RSA 173-A:9.
Accordingly, the case is remanded so that sentence may be imposed with full credit given for all prior periods of confinement. Those persons who have been adjudicated to be dangerous sexual offenders and are presently incarcerated in the State prison or the New Hampshire Hospital may petition the convicting courts for discharge or for imposition of sentence. The State may petition for imposition of sentence, for discharge, or for civil commitment under RSA ch. 135-b.
Remanded.
