
245 Minn. 241 (1955)
STATE EX REL. DeWAYNE A. GUREN
v.
B.P. GRIMES.[1]
No. 36,665.
Supreme Court of Minnesota.
July 8, 1955.
*242 Hilligan & Powell, for relator.
Miles W. Lord, Attorney General, and Dale MacIver, Assistant Attorney General, for respondent.
KNUTSON, JUSTICE.
Appeal from an order of the district court discharging a writ of habeas corpus.
The facts are not in dispute. Relator was convicted, on his plea of guilty, of the crime of assault with intent to commit rape and was sentenced to an indeterminate term of imprisonment in the state reformatory at St. Cloud on July 1, 1948. On August 2, 1948, he was brought before the probate court of Sherburne county upon a petition signed by Dr. L.A. Veranth, resident physician at the Minnesota state reformatory, alleging that he was mentally ill and unsuited for reformatory care and that he should be committed to an institution for the criminally insane. After a hearing, relator was found by the probate court to be mentally ill and was committed by that court jointly to the state mental hospital at St. Peter and the Veterans Hospital at St. Cloud. Pursuant to a warrant of commitment, he was transferred to the hospital at St. Peter, where he has since remained.
Contending that he was entitled to a discharge from the mental hospital upon the expiration of his sentence to the state reformatory, relator obtained a writ of habeas corpus from the district court. After a hearing thereon, the district court discharged the writ upon two grounds: (1) That relator's sentence had not expired; and (2) in essence, upon the ground that he is not entitled to be discharged from the mental hospital until he is legally restored to capacity. The case is here de novo upon the record made in the trial court upon the stipulation of the parties.
1. Respondent now concedes that relator's sentence to the state reformatory has expired. Since the trial court based its decision *243 in part on a determination that relator's sentence had not expired, we deem it important to dispose of this question so that there can be no further doubt about it.
An examination of the record of conviction discloses that relator, after being arrested, requested permission to plead guilty to the crime of assault with intent to commit rape. The court's order directs the filing of an information charging the commission of the crime of assault with intent to commit rape. The information charges relator with the commission of the crime of assault with intent to commit rape. The plea of guilty is to the crime charged in the information. The sentence is to an indeterminate term for the crime of assault. However, we find in the record of the trial court the following remarks just prior to the pronouncement of sentence:
"The Court: The punishment for rape, where rape is actually committed, is imprisonment in the state prison for not less than seven years 
"The Defendant: This was 
"The Court: Just a moment. I'm doing the talking now.  not less than seven years nor more than thirty years. The punishment for an attempt to commit that crime is punishable by one-half of the punishment in case the act is committed; so the punishment for this offense is not less than three and a half nor more than fifteen years. Any sentence I impose must be an indeterminate one. I cannot fix the exact period of your confinement 
"The Defendant: The second sentence would be not less than three and a half nor more than how much?
"The Court: Fifteen. If your conduct is good, and if you are obedient to the rules of the institution to which you will be sentenced, you have a right to hope and expect you will be released in even a less time than the minimum."
M.S.A. 619.38, as far as here material, reads:
"Every person who, under circumstances not amounting to assault in the first degree:

* * * * *
*244 "(5) Shall assault another with intent to commit a felony, * * *
"Shall be guilty of an assault in the second degree, and be punished by imprisonment in the state prison for not more than five years, or by a fine of not more than $1,000, or by both."
Section 610.27 as it existed at the imposition of the sentence here provided:
"An act done with intent to commit a crime and tending, but failing, to accomplish it, is an attempt to commit that crime; and every person who attempts to commit a crime, unless otherwise prescribed by statute, shall be punished as follows:

* * * * *
"(2) In every other case he shall be punished by imprisonment in the state prison for not more than half of the longest term, * * *."
Under § 617.01, rape is punishable by imprisonment in the state prison for not less than 7 nor more than 30 years. The odd result of attempting to apply these statutes is that, under § 610.27, an attempt to commit rape carried a maximum punishment of 15 years in prison, while under § 619.38 an assault with intent to commit rape carries a maximum of 5 years.
A somewhat similar question arose in our early case of O'Connell v. State, 6 Minn. 190 (279). The question there was whether Pub. Stat. 1849-1858, c. 89, § 40,[2] or § 44[3] of the same chapter governed. We there held that § 40 governed. In so doing, we said (6 Minn. 193 [286]):
"* * * we think it would be entirely inconsistent with the meaning of the chapter in which the sections above recited occur, to hold *245 that a section which is expressly directed to the punishment of a particular offense, should be rendered null by mere implication, because a subsequent section, which is general in its character, and intended to cover or provide against omissions, happens to mention the same offense in general terms. Besides, this subsequent section expressly excepts those assaults, the punishment for which has been therein [in said chapter] prescribed; and we have seen that section 40 prescribes the punishment for an assault with intent to commit a rape. We hold that the section which refers alone to the punishment of this particular crime is the one that should govern, * * *."
The crime of assault with intent to commit the specific crime of rape was carried along in our statutes until the adoption of our penal code in 1885.[4] During all this time the offense of attempting to commit a crime has remained as part of our statute.[5] It was retained in the penal code (§ 31)[6] and remains in our present statute in almost identical language. M.S.A. 610.27.
When our penal code was adopted, the crime of assault with intent to commit the specific crime of rape was dropped and a general statute encompassing all felonies adopted in its place.[7] The language of M.S.A. 619.38(5) is identical with § 187(5) of the penal code. It seems clear therefore that the crime of assault with intent to commit the specific crime of rape, as it existed prior to the adoption of the penal code, is now included in the crime of assault with intent to commit a felony.
*246 Whether the crime of attempting to commit rape can ever be accomplished without an assault we need not now determine.[8] Nor need we determine whether the state may choose, when an assault is involved, whether to charge a defendant, under § 610.27, with the crime of attempting to commit a rape or, under § 619.38, with assault with intent to commit a rape.[9] If that can be done, it must be on the theory that an information or indictment charging an attempt to commit a rape when assault is not mentioned charges the defendant with the commission of a separate and distinct crime from an information or indictment in which assault is specified. It is enough to hold here that, where the information or indictment charges a defendant with the crime of assault and he pleads to that charge, he cannot be held to have been convicted of another and entirely different offense carrying a greater punishment. Where an assault is charged followed by the words "with intent to commit a felony" or "with intent to commit a rape" or some other words descriptive of the felony, the charge still is that of an assault, and the words following are descriptive only of the kind and degree of assault with which he is charged.
Defendant here having been charged with and convicted of the crime of assault in the second degree, his punishment could not exceed that prescribed by statute for that offense regardless of what the trial court may have thought the offense was. A mistaken belief on the part of the trial court could neither change the crime of which defendant was convicted nor enlarge the statutory punishment for that offense. We therefore hold that defendant was convicted of the crime of assault in the second degree, for which the maximum punishment prescribed by law is five years' imprisonment. Having been convicted on July 1, 1948, the maximum sentence which could be imposed under the law expired on July 1, 1953. Consequently, *247 he can no longer be held under the commitment for commission of a crime.
2. The next and more important question is whether relator is entitled to a discharge from the state mental hospital upon expiration of his sentence to a state penal institution.
M.S.A. 253.21 reads as follows:
"When any person confined in the state prison or the state reformatory is alleged to be insane, the warden or other person in charge shall forthwith notify the commissioner of public welfare, who shall cause the prisoner to be examined by the probate court of the county where he is confined, as in the case of other insane persons. In case he is found to be insane, he shall be transferred by the order of the court to the state asylum for the dangerous insane or to a state hospital for the insane in the discretion of the court, there to be kept and maintained as in the case of other insane persons. If, in the judgment of the superintendent, his sanity is restored before the period of his commitment to the penal institution has expired, he shall be removed by the commissioner, upon the certificate of the superintendent, to the institution whence he came, and there complete the period of his sentence." (Italics supplied.)
Relator contends that, inasmuch as the statute uses the word "transferred" instead of "committed" in case the person involved is found to be insane, it was the intention of the legislature that his place of confinement simply be changed from a penal institution to a mental hospital for the duration of his sentence and that he was not "committed" to the mental hospital as that word technically might denote. We do not believe that the statute can be so construed. It requires the same type of hearing and examination by a probate court as in the case of any other insane person. It expressly provides that, if he is found to be insane, he is to be "kept and maintained as in the case of other insane persons." The word "transferred," it seems to us, directs the probate court to have the insane person transported from the penal institution to either the state asylum for the dangerous insane or to some other state hospital for the insane in the discretion of the court. The proceeding nonetheless *248 requires a commitment by the probate court, and, once he is committed, he can be released only in the manner provided by law the same as if he were committed under § 525.751.
It is to be noted that § 253.21 provides what shall be done with a committed person in case his sanity is restored prior to the expiration of his penal sentence. It is required by statute that, when he is committed under § 253.21, the original warrant of his commitment to the penal institution must go with him and be returned to the penal institution upon his return thereto or his discharge. § 253.23. Obviously, the reason for that is that, even though his sanity is restored prior to the expiration of his sentence to a penal institution, he must be returned to the penal institution and cannot be discharged if his sentence has not expired. The statute (§ 253.21) does not provide what should be done with him if his sanity is not restored before his criminal sentence expires. However, it does provide that, once he is committed, he is to be kept and maintained in the hospital for the insane the same as in the case of any other insane person. Other sections of our statute provide how such insane persons may be released, and we believe that these statutes are equally applicable to a commitment under § 253.21[10] when his sanity is not restored prior to the expiration of his sentence.
The trial court having been correct on the determination of the second question, relator is not entitled to his discharge under a writ of habeas corpus.
Affirmed.
NOTES
[1]  Reported in 71 N.W. (2d) 885.
[2]  "If any person shall assault any female, with intent to commit the crime of rape, he shall be punished by imprisonment in the territorial prison, not more than ten years, nor less than one year."
[3]  "If any person shall assault another, with intent to commit any burglary, robbery, rape, manslaughter, mayhem, or any felony, the punishment of which assault is not herein prescribed, shall be punished by imprisonment in the territorial prison, not more than three years, nor less than six months, or by fine not exceeding one thousand dollars, nor less than one hundred dollars."
[4]  See, G.S. 1866, c. 94, § 41; G.S. 1878, c. 94, § 51.
[5]  See Pub. Stat. 1849-1858, c. 98, § 16, which reads:

"Every person who shall attempt to commit an offense prohibited by law, and in such attempt shall do any act towards the commission of such offense, but shall fail in the perpetration thereof, or shall be prevented or intercepted in executing the same, upon conviction thereof shall, in cases where no provision is made by law for the punishment of such attempt, be punished as follows: [thereafter follows prescribed punishment for various offenses]." See, also, G.S. 1866, c. 91, § 7; G.S. 1878, c. 91, § 7.
[6]  "An act, done with intent to commit a crime, and tending but failing to effect its commission, is an attempt to commit that crime."
[7]  Section 187 of the penal code.
[8]  See, State v. Christofferson, 149 Minn. 134, 182 N.W. 961; State v. McLeavey, 157 Minn. 408, 196 N.W. 645; State v. Johnson, 243 Minn. 296, 67 N.W. (2d) 639; 21 Minn. L. Rev. 213.
[9]  See, for instance, State v. Macbeth, 133 Minn. 425, 158 N.W. 793; State v. McLeavey, 157 Minn. 408, 196 N.W. 645.
[10]  The attorney general apparently has been of that opinion for a long period of time. In an opinion written June 15, 1933, the attorney general ruled that, during the period of the sentence to a penal institution, the state is liable for the support of one who is committed to a state hospital for the insane but that, upon the expiration of his penal sentence, the insane person will become subject to the same provisions with respect to support as persons committed under other sections of our statute. Opinion Attorney General, No. 248-B-1, June 15, 1933.
