
278 A.2d 132 (1971)
Charles H. CHASE
v.
William F. KEARNS, Jr., Commissioner, Department of Mental Health and Corrections.
Supreme Judicial Court of Maine.
June 2, 1971.
Caroline Glassman, Portland, for plaintiff.
*133 Courtland D. Perry, Asst. Atty. Gen., Augusta, for defendant.
Before DUFRESNE, C. J., and WEBBER, WEATHERBEE, POMEROY and WERNICK, JJ.
WEATHERBEE, Justice.
This petition for the common law writ of habeas corpus presents us with a clear challenge to the constitutionality of our statutory provision for immediate commitment to the custody of the Commissioner of Mental Health and Corrections of persons who have been charged with criminal acts and who have been found not guilty by reason of mental disease or defect. We find no constitutional deprivation in the case before us.
Petitioner was indicted on a charge that on or about July 19, 1968 he made an oral communication threatening to injure the person of another. The offense charged was a felony. After hearing on his motion Petitioner was found to be competent to stand trial. He then entered a plea of not guilty and not guilty by reason of mental disease and mental defect. On September 25, 1968, after trial, the jury returned its verdict finding Petitioner not guilty because he was not responsible for the act charged, the act having been the product of mental disease or mental defect. The Presiding Justice ordered Petitioner committed to the custody of the Commissioner of Mental Health and Corrections to be placed in an appropriate institution for the mentally ill or the mentally retarded for care, custody and treatment as was and is required by 15 M.R.S.A. § 103.
On September 26, 1968 the Petitioner, on the Commissioner's order, was received at the Bangor State Hospital and later at the Augusta State Hospital. Both are institutions for the mentally ill and Petitioner has been confined in one institution or the other since the Commissioner's order. His petition, presented by court appointed counsel, alleges that this restraint is illegal, and a Justice in the Superior Court has ordered the issue it offers sent to us on report.
The precise issue submitted to us is whether the Petitioner has been and is illegally and unconstitutionally restrained without due process of law and in denial of equal protection of the law in that he was involuntarily committed to an institution for the mentally ill without hearing and determination as to an existing need for his commitment.
The underlying basis of Petitioner's complaint is that while the jury determined after trial that he suffered from a mental illness or mental defect on July 19, 1968 which resulted in his doing an otherwise-criminal act, there was no determination that he suffered from any dangerous mental condition on September 25, 1968 when he was ordered committed to the custody of the Commissioner.
Section 103 reads:
"When a respondent is acquitted, by reason of mental disease or mental defect excluding responsibility, the verdict and judgment shall so state. In such case the court shall order such person committed to the custody of the Commissioner of Mental Health and Corrections to be placed in an appropriate institution for the mentally ill or the mentally retarded for care and treatment. Upon placement in such appropriate institution and in the event of transfer from one such institution to another of persons committed under this section, notice thereof shall be given by the commissioner to the committing court."
Section 103 must meet the strictures of both the due process clause of the Fourteenth Amendment to the Federal Constitution and of Article I, §§ 6 and 6A of our own constitution and the guarantees of equal protection announced in both constitutions.


*134 Due Process.

Fundamental in the guarantees of due process are the right to notice and hearing. Williams v. New York, 337 U.S. 241, 69 S.Ct. 1079, 93 L.Ed. 1337 (1949); Michaud v. City of Bangor, 159 Me. 491, 196 A.2d 106 (1963). While hearing and opportunity to present a defense must normally precede an incarceration, the Justices of this Court have recognized that a situation of emergency may require the immediate commitment of a person upon proper certification as to his dangerous condition if the commitment is followed by notice and a prompt, orderly hearing at which a defense may be presented. Opinion of the Justices, 157 Me. 187, 170 A.2d 660 (1961). The availability of the prompt hearing, the Justices concluded, satisfied the demands of due process.
The Justices were then considering proposed Legislation which included provision for emergency civil commitment where it had been certified that the individual was likely to injure himself and others unless immediately restrained.
The Justices' opinion represented a reasonable and judicious weighing of the public's right to be protected from dangerous mentally ill persons against the individual's right to be protected against unjustified confinement and their conclusion that in such cases the individual must yield his usual expectation of hearing before commitment appears to us to be a proper one in view of the prompt availability of hearing following commitment.
We consider that at least equally important policy considerations rationally justify the immediate commitment under § 103 of a person who has been found not guilty by reason of mental disease or mental defect and who has already thus demonstrated his capacity for prohibited conduct brought about by his mental condition.
The factors which underlie the rationality of the legislative structure are:
1. Under Maine law the issue of the exclusion of responsibility for an otherwise-criminal act by reason of mental disease or mental defect can be raised only by the Defendant, by an affirmative special plea which avoids the objectionable possibility (stressed by Lynch v. Overholser, 369 U.S. 705, 82 S.Ct. 1063, 8 L.Ed.2d 211 (1962)) that an acquittal by reason of mental disease or mental defect can be forced upon him against his will.
2. Our statute requires that there be a determination by the jury, upon proof beyond a reasonable doubt, that a defendant has perpetrated upon society conduct which the State has classified as being of a type which causes a harm to the public interest justifying both criminal punishment and effort on the part of the State to prevent recurrence of such conduct. (This determination is implicit in a finding of not guilty by reason of mental disease or mental defect.) State v. Hathaway, 161 Me. 255, 211 A.2d 558 (1965).
3. There must have been an affirmative finding, by a fair preponderance of the evidence, that the otherwise-criminal conduct was the result of mental disease or mental defect. This finding places the defendant in an exceptional class. (State v. Shackford, Jr., Me., 262 A.2d 359 (1970).)
4. Because of the potentialities of people in this exceptional class for further conduct injurious to themselves or others, society acquires a special interest in such persons justifying the careful determination whether such persons require custody and treatment to avoid danger to themselves or others due to mental disease or mental defect.
5. It is unavoidable that between the verdict and the determination as to defendant's then existing mental condition a time lapse must occur. The reliability of such a determination must rest on the ability of competent medical experts to have reasonable opportunity for examination and observation of the defendant. The Legislature *135 was required to make a policy judgment
"whether during that time lapse the defendant should be at large and unattended or whether he should be in a hospital where the observation, examination and medical findings can be completed in the shortest possible time." Ragsdale v. Overholser, 108 U.S.App.D.C. 308, 281 F.2d 943, 948 (1960).
The Legislature has reasonably concluded that the security of the community and the welfare of the individual can best be served if the defendant is confined to an institution for the mentally ill during this necessary period of observation (and, if required, of treatment).
Some other jurisdictions have recognized the necessity of commitment pending determination as to present mental condition and have based the reasonableness of their statutes on a presumption that mental illness which has been found to have existed at the time of the crime continues until the presumption has been satisfactorily removed.
The Delaware Court said, in Mills v. State, Del., 256 A.2d 752 (1969):
"We hold that in adjusting the delicate balance between a society's right to be protected from potentially mental ill and dangerous individuals, on the one hand, and the individual's right to be protected from improvident confinement on the other, it was not a denial of due process to commit the appellant under § 4702(a) by virtue of the presumption of continuing mental illness and the jury's verdict, without a separate hearing and determination as to present mental condition."
Although our Court has spoken with approval of the presumption of continuing insanity in a civil action against the State based on negligence of the Superintendent of the State Hospital in releasing a patient who had earlier been found to have been insane (Austin W. Jones Company v. State of Maine, 122 Me. 214, 119 A. 577 (1923)), we consider that no judicial presumption need be resorted to in order to justify such immediate commitment. Once a defendant has been found "not guilty by reason of mental disease or mental defect", special factors and policy considerations rationally justify immediate commitment inasmuch as such a defendant might or could be incapable of controlling his behavior, might or could be an instrumentality of harm to himself or others, might or could be in need of study, observation and treatment for the accomplishment of which, in the shortest possible time, hospital confinement is reasonable.
The strong policy considerations justifying immediate detention cannot dispense with the necessity of an adequate release remedy providing opportunity for reasonably prompt hearing as to justification for his detention. That opportunity isand was at the time of Petitioner's commitment offered by § 104 which presents a threepart statutory design for hearings on release which we find to be adequate. Section 104 was amended at Special Session in 1970 by Chap. 555 which added provision for a partial release program and new language on the standard for readiness for release (to be discussed later) but in the respects now under consideration it is unchanged since 1967.
Sec. 104 now reads, in pertinent part:
"The superintendent of the hospital in which a person is hospitalized under section 103, shall, annually, forward to the Commissioner of Mental Health and Corrections a report containing the opinion of the superintendent or hospital staff psychiatrist, as to the condition of any such person and his readiness for release or discharge, which opinion in the case of a person found not guilty of crime by reason of mental disease shall indicate whether such person is, or is not, restored sufficiently to permit release or discharge without likelihood of his causing injury to himself or others, due to mental disease, and in the case of *136 a person found not guilty of crime by reason of mental defect shall indicate whether such person is, or is not, adjusted, socially and otherwise, so as to permit release or discharge without likelihood of his causing injury to himself or others, due to mental defect. The commissioner shall forthwith file such report with the court in the county in which the person is hospitalized. The court shall review the report and if it is made to appear by the report that any such person may be ready for release or discharge, the court shall set a date for, and hold a hearing on the question of such person's readiness for release or discharge, and shall receive the testimony of at least one psychiatrist who has observed or treated such person and any other relevant testimony. If, after hearing, the court finds that such person may be released or discharged without likelihood of his causing injury to himself or others, due to mental disease or mental defect, the court shall order:
1. Release.
* * * * * *
2. Discharge. * * *
Whenever, in the opinion of the superintendent or staff psychiatrist of the hospital in which a person is hospitalized under section 103, such person may be released or discharged without likelihood of his causing injury to himself or others, due to mental disease or mental defect, the superintendent shall report such opinion and the reasons therefor, to the Commissioner of Mental Health and Corrections. The commissioner shall forthwith forward the report to the court and the court shall hold a hearing and dispose of the matter as provided in the first paragraph of this section.
A person committed under section 103, or his spouse or any next of kin, may petition the court in the county in which the person is hospitalized for a hearing under this section. Upon receiving such petition the court shall request and receive a report from the Commissioner of Mental Health and Corrections, containing the opinion of the superintendent or staff psychiatrist of the hospital in which such person is hospitalized, relative to the readiness of such person for release or discharge, and whether if released or discharged, the patient would be likely to cause injury to himself or others, due to mental disease or mental defect. The hearing and release or discharge, if ordered, shall be as provided in the first paragraph of this section. If release or discharge is not ordered, a petition shall not again be filed for the release or discharge of such person for one year.
* * * * * *
Thus, three situations may initiate a hearing on release:
1) The Court shall set the hearing if its study of the Superintendent's annual report indicates that any patient may be ready for release or discharge;
2) The Superintendent or staff psychiatrist may recommend such discharge to the Court in which case the Court shall hold a hearing; and
3) The patient, himself, or his spouse or next of kin, may petition for such a hearing.
We must particularly construe the next to the last line of the last quoted paragraph:
"The hearing and release or discharge, if ordered, shall be as provided in the first paragraph of this section."
We note that while the first paragraph outlines the proceedings for such a hearing on release it is preceded by the words "if it is made to appear by the report that any such person shall be ready for release or discharge," referring to the hearing which may result from the Court's study of the Superintendent's annual report.
We view the Legislature's use of the words "as provided in the first paragraph" as used to avoid needless repetition of the *137 details of the hearing and not as intended to limit the patient's right to hearing on petition to cases where the superintendent's report appears favorable to his release. The purpose of the statute is to provide the patient with an opportunity for a prompt hearing on release.
While the statutory provisions permit prompt examination into justification as to the Petitioner's detention following his commitment, Petitioner questions the adequacy of the procedure which he says requires him to prove his readiness for release beyond a reasonable doubt.
In State v. Shackford, Jr., supra, we said that
"We think it reasonable to require that reasonable medical doubts and reasonable judicial doubts be resolved in favor of the public."
At that time we were construing the language of 15 M.R.S.A. § 104 as amended by P.L.1967, Chap. 402, § 2 which permitted a Justice to discharge or release such an inmate from custody only if the Justice "finds" that he "may be released without danger to the public within the foreseeable future due to mental disease or * * * mental defect".
The opinion in Shackford was filed February 19, 1970. On January 30, 1970 the Legislature had enacted as an emergency measure chap. 555 which repealed sec. 104 and replaced it with a new section which the Emergency Preamble recited was necessary to make better use of a partial release program for patients not yet ready for actual separation from the mental hospital. In addition, however, the new legislation abandoned the language which permitted the Court to release the patient only if it is found that he "may be released without danger to the public within the foreseeable future due to mental disease or mental defect". It substituted therefor the test that the Court must find that the person may be released or discharged "without likelihood of his causing injury to himself or others, due to mental disease or mental defect". (Emphasis added.)
Does this change in language effect a less stringent standard of proof as to a patient's readiness for release?
We think not.
The emergency enactment took place before the filing of the opinion in Shackford and, of course, could not be viewed as intended to change the standard of proof endorsed by Shackford. Nothing in the Emergency Preamble suggests that the purpose of the amendment was to make the standard of readiness for release or discharge less cautious.
The statute still requiresas it did at the time of Shackfordthat the Court find the readiness for release.
We pointed out in Shackford that the statute did not then define the standard of proof which controlled the Court's finding. We based our conclusion that reasonable medical doubts must be resolved in favor of the public not on particular language of the statute but on the paramount necessity of protecting the special interest which the public has acquired in the confinement and release of such a patient. Ragsdale v. Overholser, supra.
We understand that generally, at least, certainty in testimony as to the expected conduct of a released mental patient cannot be expected from expert witnesses. It would appear that the Legislature realized that in a hearing on readiness for release or discharge, the Court will seldom hear more than a description of the patient's progress and status, his observed conduct and the psychiatrist's opinion as to the likelihood of his causing future injury.
While the medical experts may express their opinions as to the likelihood of the patient's causing future injury, the Court in assembling and evaluating the evidence still must, as we said in Shackford, "reasonable medical doubts and reasonable judicial doubts be resolved in favor of the *138 public." The evidence presented must satisfy him beyond a reasonable doubt that there is no likelihood of his causing injury to himself or others. We find no denial of due process in either the automatic commitment or in requiring this heavier standard of proof. As the opinion in Ragsdale reasonedconvincingly, to usthere is no relationship between the issue of release and the presumption of innocence because neither guilt nor innocence is involved.

Equal Protection.
It is true that a distinction exists in the provisions for release of persons committed under sec. 103 and those in the institutions as a result of involuntary civil commitments who seek judicial release. The latter, whether committed on certification by two physicians (34 M.R.S.A. § 2332) or on emergency commitment (34 M.R.S.A. § 2333) are entitled to be released within ten days of their request for release unless the head of the hospital certifies that such release would be unsafe, in which event a judicial determination of the issue results. 34 M.R.S.A. § 2376. The significant distinction is that in the case of the civil commitment the judge shall release the patient if satisfied by a fair preponderance of the evidence as to the patient's readiness for release.
Both the federal constitution and our own guarantee the equal protection of the laws. The United States Supreme Court has said:
"Equal protection does not require that all persons be dealt with identically, but it does require that a distinction made have some relevance to the purpose for which the classification is made." Baxstrom v. Herold, 383 U.S. 107, 86 S. Ct. 760, 15 L.Ed.2d 620 (1966).
The Court there found an absence of equal protection in the application to the Petitioner of one of two different methods of civil commitment.
The Wisconsin Court, in holding that there was no constitutional denial in an automatic commitment provision similar to our own sec. 103, said of Baxstrom:
"The denial of equal protection arose as a result of providing two different methods of civil commitment and with no reasonable basis for it.
In the instant case, the difference in procedure is not between persons civilly committed but rather the difference arises between civil commitment and criminal commitment after a verdict of not guilty by reason of insanity. Thus, on this basis, Baxstrom can be distinguished from the instant situation." State ex rel. Schopf v. Schubert, 45 Wis.2d 644, 173 N.W.2d 673 (1970).
In our opinion the distinction our Legislature has seen fit to employ in the procedures for civil and criminal commitment and release is neither irrational nor arbitrary. It has a relevance to a proper legislative purpose which the distinction was intended to serve.
As we found in Shackford the finding by the jury that a defendant, because of his mental disease or defect, shall be held blameless for an act otherwise subject to criminal sanctions puts such a defendant into an exceptional class. The special interest which the public has acquired in the confinement and release of people in this exceptional class results from the fact that there has been a judicial determination that they have already endangered the public safety and their own as a result of their mental conditions as distinguished from people civilly committed because of only potential danger.
We hold that the distinction in commitment and release applying to Petitioner, as a member of this exceptional class, is a reasonable requirement for the protection of the Petitioner and of the public interest.

Right to payment for counsel's services.
The Single Justice who reported this matter found that the petition was not frivolous, that it had merit and was filed *139 in good faith and that the Petitioner was indigent.
The petition is not a criminal proceeding and there is no statutory provision for appointment of and compensation for counsel for indigent petitioners who have been committed under the provisions of sec. 103. Nevertheless, it is our conclusion that as the issue is one of right to liberty of a person committed on an order of Court which our statute makes mandatory upon one of the alternative consequences of a verdict in a criminal trial, the preservation of equality of treatment between rich and poor requires the State to provide counsel for this Petitioner at public expense.
Petition denied. Writ denied. Remanded to the Superior Court for Order for counsel fees for Petitioner's attorney.
MARDEN, J., sat at argument but retired before the adoption of this opinion.
