delivered the opinion of the court:
On September 6, 1963, a petition was filed under the Sexually Dangerous Persons Act, (Ill. Rev. Stat. 1961, chap. 38, par. 820.01 — 825e, now Ill. Rev. Stat. 1963, chap. 38, pars. 105 — 1.01 to 105 — 12,) to have defendant declared a sexually dangerous person. The court appointed two qualified psychiatrists to personally examine defendant as provided by the act and ordered defendant to appear before them individually for examination. The defendant appeared before the psychiatrists and informed each of them that he felt the compulsory examination was a violation of his constitutional rights. No examination was conducted and the *303court held defendant in contempt of court. Defendant appeals directly to this court on the ground that the contempt order violates his privilege against self-incrimination.
The defendant and the People have briefed the case as though the pivotal question is whether the proceeding under the Sexually Dangerous Persons Act is criminal or civil. Defendant’s apparent contention is that the proceeding under the act resembles a criminal prosecution, and therefore the psychiatric examination would amount to compelling him in a criminal case to give evidence against himself. The People, on the other hand, argue that the proceeding is civil in nature and the privilege against self-incrimination is not applicable.
As we view the case the issues that must be considered are: (1) whether defendant is protected by the privilege against self-incrimination or by due process from submitting to the mental examination because the information he gives to the psychiatrists will be used in the commitment proceedings under the act; (2) whether he is privileged because the compelled information could be used in a subsequent criminal proceeding; and (3) if the defendant is privileged from submitting to the examination because it may tend to incriminate him, can this privilege be removed by a judicial grant of immunity.
It is well established that the privilege against self-incrimination protects against disclosure of facts involving criminal liability and not against civil liability. (8 Wigmore, Evidence (McNaughton, rev’d 1961) §§ 2253, 2254.) This raises the question, therefore, of the nature of the consequences imposed by the act upon a person found to be sexually dangerous.
The status of mental illness cannot be made a criminal offense for which the offender can be prosecuted and imprisoned. (See Robinson v. California, 370 U.S. 660, 8 L. ed 2d 758) 82 S. Ct. 1417.) A State may, however, in a civil proceeding adjudicate the status of mental illness and *304require involuntary confinement of the mentally ill person for treatment and for the protection of society. (See Robinson v. California, 370 U.S. 660, 8 L. ed. 2d 758, 82 S. Ct. 1417; Lynch v. Overholser, 369 U.S. 705, 8 L. ed. 2d 211, 82 S. Ct. 1063.) Specifically, the Supreme Court has upheld a Minnesota statute providing for the involuntary commitment of a sexual psycopath in a civil proceeding. (See Minnesota ex rel. Pearson v. Probate Court, 309 U.S. 270, 84 L. ed. 744, 60 S. Ct. 523.) Section 3.01 of the Sexually Dangerous Persons Act (par. 105 — 3.01) provides that the proceeding is civil in nature and this court has so construed it. People v. Sims, 382 Ill. 472; People v. Redlich, 402 Ill. 270; People v. Capoldi, 10 Ill.2d 261.
Defendant relies heavily, nevertheless, on the statement in People v. Nastasio, 19 Ill.2d 524, 529, that the proceedceedings under the act “closely resemble criminal prosecutions in many critical respects.” That case held that procedural due process requires that a defendant be given the opportunity to confront the witnesses as in a criminal prosecution.
The fundamental procedural safeguards of the criminal law are explained by history, not by logic. Basic in most of these safeguards is the fear of abuses to the individual’s liberty. Since the Sexually Dangerous Persons Act provides for involuntary confinement, although it be for the treatment of the defendant rather than punishment for a crime, it is natural that some of the same safeguards which are applicable in a criminal prosecution be applied to the proceedings under the act. This does not mean, however, that the commitment proceeding is a criminal, prosecution or that criminal procedure as a whole must be followed in the proceeding. This is the thrust of the statement in the Nastasio case.
The Supreme Court in upholding the Minnesota statute stated, “We fully recognize the danger of a deprivation of due process in proceedings dealing with persons charged *305with insanity or, as here, with a psychopathic personality as defined in the statute, and the special importance of maintaining the basic interests of liberty in a class of cases where the law though ‘fair on its face and impartial in appearance’ may be open to serious abuses in administration and courts may be imposed upon if the substantial rights of the persons charged are not adequately safeguarded at every stage of the proceedings.” (Minnesota ex rel. Pearson v. Probate Court, 309 U.S. 270, 276-77, 84 L. ed. 744, 751, 60 S. Ct. 523, 527.) Indeed, it was this “special importance of maintaining the basic interests of liberty” in this type of case which led this court to hold in People v. Capoldi, 10 Ill.2d 261, that the admission in evidence of a confession of crime, without preliminary proof of its voluntary character.
While the nature of the proceeding under the act is such that due process requires a preliminary hearing to determine the voluntariness of an allegedly coerced confession and the confrontation of witnesses in order to protect defendant from the abuses at which these safeguards are aimed, the same is not true with regard to compelling a psychiatric examination to determine his status as a sexually dangerous person. Since.no criminal liability is attached to the status of a sexually dangerous person, the evil at which the privilege is aimed is not present when the compelled examination shows no more than the existence or nonexistence of this status. The same conclusion has been reached in other jurisdictions as to sanity proceedings, in general (8 Wigmore, Evidence, (McNaughton, rev’d 1961) § 2257), sanity proceedings in connection with a criminal case, in particular, (Annotation, 32 A.L.R. 2d 437, 444,) and specifically as to proceedings under statutes similar to ours. Annotation, 24 A.L.R. 2d 350, 362.
This holding does not, however, dispose of the self-incrimination issue. It is possible that during the course of the psychiatric examination, the defendant would be called upon to make disclosures which will not only show his *306mental- condition but may also disclose criminal conduct. If a disclosure which tends to show noncriminal status cannot be made without at the same time exposing defendant to criminal liability, the privilege will protect defendant from making the disclosure at all. 8 Wigmore, Evidence (McNaughton, rev’d 1961) § 2257.
No incriminating statement to the psychiatrist could be excluded from a subsequent criminal prosecution on the theory that it constituted a coerced confession. (3 Wigmore, Evidence (3rd ed.) § 850.) Nor does the act grant defendant immunity from the use of incriminating statements he may make to the psychiatrist as does section 104 — 2 of the Code of Criminal Procedure, (Ill. Rev. Stat. 1963, chap. 38, par. 104 — 2,) which deals with the mental competency of a criminal defendant. Section 104 — 2 provides that, “No statement made by the accused in the course of any examination into his competency provided for by this section, whether the examination shall be with or without the consent of the accused, shall be admitted in evidence against the accused on the issue of guilt in any criminal proceeding.” By removing the incriminating nature of any statement made by the accused, the legislature has effectively removed the privilege in a hearing to determine his competency. See Halpin v. Scotti, 415 Ill. 104.
Section 5.1 of the Evidence Act (Ill. Rev. Stat. 1963, chap. 51, par. 5.1,) with certain exceptions provides that no physician or surgeon shall be permitted to disclose any information he may have acquired in attending any patient in a professional character, necessary to enable him professionally to serve such patient. While a psychiatrist is a physician, the privilege created by this statute is not applicable where the examination is by a court appointed physician because such examination does not constitute consultation with the physician in his professional character. (See 8 Wigmore, Evidence (McNaughton, rev’d, 1961) § 2382.) Section 5.2 of the Evidence Act, (Ill. Rev. Stat. *3071963, chap. 51, par. 5.2,) with certain exceptions, provides specifically that that communication relating to diagnosis or treatment of the patient’s mental condition between patient and psychiatrist is privileged from disclosure in civil and criminal cases and in proceedings preliminary thereto. Since the section goes on to define “patient” as “a person who for the purpose of securing diagnosis or treatment of his mental condition consults a psychiatrist,” the privilege granted by the section would not apply where the court orders the psychiatric examination.
Subparagraph (b) of section 5.2 recognizes that there is no privilege where the court has ordered the examination, but the subparagraph does limit the admissibility of disclosures of statements made by the patient to the psychiatrist to issues involving the patient’s mental condition. It is possible thát the limit on admissibilty under section 5.2(b) could be construed to be a grant of immunity sufficient to remove the privilege against self-incrimination. We believe, however, that if the legislature had intended to grant an immunity from use of statements made to the psychiatrist during an examination made under the Sexually Dangerous Persons Act, which would be coextensive with the privilege against self-incrimination, it would have done so in the act as it did in section 104 — 2 of the Code of Criminal Procedure and in language similar to that used in that section.
We hold that the privilege against self-incrimination protects defendant from making any statements to the psychiatrists which may tend to incriminate him.
This does not mean, however, that defendant is privileged from submitting to any examination. In People v. Greer, 28 Ill.2d 107, and People v. Munziato, 24 Ill.2d 432, we held that the privilege protects only against testimonial compulsion. Thus, defendant can be compelled to submit those parts of the examination which do not call upon his testimonial capacity, even though some of the information *308obtained may be incriminating; and he can, of course, be compelled to make replies as long as the questions do not require an answer which may tend to incriminate him.
A different approach was taken in State v. Myers, 220 S.C. 309, 67 S.E.2d 506, 508, where the court after holding that a compulsory mental examination of a criminal defendant did not violate his privilege against self-incrimination, stated, “* * * the authorities of that institution [the State hospital] will not be permitted, over the protest of the accused, to reveal any confession made by him in the course of such examination, or any declarations implicating him in the crime charged.” The People in oral argument suggested that we follow a similar course, that is, remove the privilege by removing the possibility that the statements be used in a criminal prosecution. This, of course, would amount to a judicial grant of immunity.
Aside from the Myers case, every jurisdiction which has ruled upon the question, except Texas, has held that the privilege can be removed and the witness compelled to testify only by virtue of statutory authority. (8 Wigmore, Evidence, (McNaughton, rev’d 1961) § 2280 and 2281.) This court for example, in People v. Rockola, 339 Ill. 474, squarely held that a trial court’s order of immunity without statutory authority was not effective to remove the witness’s privilege. A court will, of course, enforce a promise not to prosecute by the State’s attorney, (People v. Bogolowski, 326 Ill. 253; People v. Johnson, 372 Ill. 18; People v. Bryant, 409 Ill. 467,) and will not permit in a criminal case the use of self-incriminating statements made by a witness over objection, (Adams v. Maryland, 347 U.S. 179, 181, 98 L. ed. 610, 74 S. Ct. 442, 445), but these are situations where the incriminating statements have already been made, the privilege was not removed and the court affords the person the only protection it can. We believe that the removal of the privilege by a grant of immunity must be, left to the legislature.
*309With these principles in mind, we now consider the facts disclosed by this record. The defendant appeared at the office of Milton C. Bauman, M.D., who specializes in psychiatry, as ordered by the court. The doctor testified that defendant told him he thought the examination would violate his constitutional rights, the doctor said, “It is perfectly agreeable with me,” and the defendant then left.
The defendant also appeared at the office of Albert P. Ludin, M.D., who specializes in psychiatry and neurology, as directed by the court. The doctor testified that defendant told him his name, address, and marital status and said he felt the compulsory examination violated his constitutional rights. The doctor asked him to be seated and answer a few questions, the defendant gave the same answer and the doctor then told him there was no point in staying any longer.
As we have shown, it was proper for the court to require defendant to submit to a psychiatric examination provided he was not required to answer any questions which might incriminate him. Apparently neither the defendant nor the doctors understood this. While the doctors were ready, willing and able to conduct the ■ examination, they made no attempt to do so; and while defendant would have been privileged to refuse to answer incriminating questions by the doctors, no questions were asked.
Under the circumstances shown by this record, the wilful contempt order must be reversed. If the defendant is again ordered to submit to a psychiatric examination, the parties to the examination will know their respective rights and duties and should conduct themselves accordingly.
Defendant has also argued that the trial court does not have jurisdiction of this proceeding because the criminal offense with which he is charged was not committed more than one year prior to the filing of the petition under the act. This argument is based on an erroneous interpretation of the provision in section 1.01 that the mental disorder must have existed for a period of not less than one year prior to *310filing the petition and the provision in section 2 that a person must be charged with a criminal offense before a petition can be filed under the act. These two provisions do not mean that the crime charged must have occurred more than one year before the filing of the petition. It is only the mental disorder which must have existed for a period of more than one year before the filing of the petition.
The judgment of the circuit court of Sangamon County is reversed. T , ,