
114 N.W.2d 881 (1962)
Ann DAVIS, Petitioner,
v.
Irvin RIEDMAN, Warden of the State Penitentiary, and the State of North Dakota, Respondents.
Cr. 301.
Supreme Court of North Dakota.
May 9, 1962.
*882 William R. Mills, Bismarck, for petitioner.
Leslie R. Burgum, Atty. Gen., Gerald W. VandeWalle, Sp. Asst. Atty. Gen., Bismarck, and LeRoy A. Loder, Ward County State's Atty., Minot, for respondents.
TEIGEN, Judge.
Ann Davis petitioned this court for a writ of habeas corpus and alleged she is unlawfully imprisoned and detained in the State penitentiary under the authority of a judgment of the district court of Ward County entered on the 9th day of May, 1961, sentencing the petitioner to be confined in the State penitentiary for a term of one year.
The substance of the petitioner's complaint is that she was convicted in a jury trial of the crime of assignation as charged in the amended information. The amended information, omitting the formal part, charged that "Ann Davis did permit a building to wit: the Flame Cafe, located in Ward County, North Dakota, owned by her, or under her control, to be used for the purpose of prostitution or assignation, with knowledge or reasonable cause to know that the same is, or is to be, used for such purpose, in violation of Subsection 2 of Section 12-22-14 of the North Dakota Century Code"; that the crime of assignation is a misdemeanor, not a felony, and is not punishable by imprisonment in the State penitentiary and that she is illegally confined in the State penitentiary.
Section 12-22-17, NDCC, provides the penalty and reads as follows
"Any person who shall be convicted of any of the offenses set forth in section 12-22-14 shall be subject to imprisonment for not more than one year. Any person who shall be convicted twice in any one year period of a violation of any of the provisions of section 12-22-14 shall be subject upon the second conviction to imprisonment for not less than one year nor more than three years."
The conviction was a first conviction under the provisions of the penalty statute set forth and she was, therefore, subject to imprisonment for not more than one year.
Where relief is sought from a criminal judgment through habeas corpus, the scope of inquiry is limited to questions of jurisdiction and we inquire into the correctness of the acts of the trial court only to the extent of determining whether it acted within its jurisdiction. Simpson v. Nygaard, 79 N.D. 391, 56 N.W.2d 685; Mazakahomni v. State, 75 N.D. 73, 25 N. W.2d 772; State ex rel. Johnson v. Broderick, 75 N.D. 340, 27 N.W.2d 849; Davidson v. Nygaard, 78 N.D. 141, 48 N.W.2d 578; 39 C.J.S. Habeas Corpus § 26a(3), P. 486.
The statutes have been examined and we find that they do not classify the crime of assignation as a misdemeanor or a felony and do not specify the place of imprisonment. The statute providing for the punishment provides for greater punishment attaching to a second or successive offense within a one year period. However, a crime shall not be considered a felony by reason of the greater punishment. Section 12-06-22, NDCC.
*883 Crimes or public offenses are either felonies or misdemeanors.
"* * * A felony is a crime which is or may be punishable with death or imprisonment in the penitentiary. Every other crime is a misdemeanor. * * *" Section 12-01-07, NDCC; State ex rel. Olson v. Langer, 65 N.D. 68, 256 N.W. 377.
Section 12-22-17, supra, prescribes only the duration of the permissible punishment.
Tracing the history of the statutes involved, we find they were first enacted as Chapter 190 of the Session Laws of 1919. By that chapter, the crime was divided into two degrees. A person found to have committed two or more violations within a period of one year was deemed guilty in the first degree and a person found to have committed a single violation was deemed guilty in the second degree. A person found guilty in the first degree was subject to imprisonment in, or commitment to, "any penal or reformatory institution in this state for not less than One nor more than Three Years; * * *." A person found guilty in the second degree was subject to imprisonment "for not more than One Year; * * *." The original statute does not classify the crime as a misdemeanor or a felony. No change was made in the adoption of the Supplement to the Compiled Laws of North Dakota in 1925. In the North Dakota Revised Code of 1943, some changes were made. The crime was still divided into degrees. Section 12-2217, N.D.R.C. of 1943, provided that a person found guilty in the first degree "shall be subject to imprisonment in the penitentiary, or commitment to the state training school, for not less than one year nor more than three years." It provided that a person found guilty in the second degree "shall be subject to imprisonment for not more than one year."
The 1951 Legislative Session (Chapter 115, Session Laws 1951) amended the Act and repealed Section 12-2216, N.D.R.C. of 1943, providing degrees of the crime. It also amended Section 12-2217 prescribing the punishment. It states that any person convicted shall be subject to imprisonment for not more than one year, but that any person convicted twice in any one year period shall be subject upon the second conviction to imprisonment for not less than one year nor more than three years. It does not provide the place of imprisonment. The 1951 amendment was carried into the North Dakota Century Code without modification. During the entire history of the statute, the crime, as a first offense (or second degree), has not been classified as a felony or a misdemeanor by the legislature, nor has the place of imprisonment been designated. This was also true as to a second offense (or first degree), except for a period following the adoption of the North Dakota Revised Code of 1943, and until 1951 when it was made punishable by imprisonment in the penitentiary. The 1951 legislature, however, amended the statute and repealed the provision providing for imprisonment in the penitentiary.
Generally where the statute does not state a crime is a felony or a misdemeanor, or classify it by fixing the place of imprisonment, and doubt exists whether it shall be punished by imprisonment in the State penitentiary or the county jail, the defendant will be given the benefit of the doubt and the offense will be deemed a misdemeanor, punishable by confinement in the county jail. This has been held in a number of cases. State v. DiPaglia, 247 Iowa 79, 71 N.W.2d 601, 49 A.L.R.2d 1223; People v. O'Connor, 4 Ill.2d 403, 122 N.E.2d 806; People v. Hightower, 414 Ill. 537, 112 N.E.2d 126, cert. den. 346 U.S. 875, 74 S.Ct. 128, 98 L.Ed. 383, App. Den. 346 U.S. 882, 74 S.Ct. 135, 98 L.Ed. 388; Bustamante v. People, 133 Colo. 497, 297 P.2d 538; State v. Masteller, 232 Minn. 196, 45 N.W.2d 109; State v. Brandvold, 232 Minn. 202, 45 N.W. 2d 111; State v. Toy, 65 Mont. 230, 211 P. 303; 24B C.J.S. Criminal Law § 2000b (1) and (3).
There are various distinctions between the two grades of offenses. The general *884 penalty statutes provide: (1) Except in cases where a different punishment is prescribed by law, every offense declared to be a felony is punishable by a fine of not more than $1,000 or by imprisonment in the penitentiary for not less than one nor more than five years, or both such fine and imprisonment. Section 12-06-10. (2) Except in cases where a different punishment is prescribed by law, every offense declared to be a misdemeanor is punishable by imprisonment in the county jail for not more than one year and/or a fine of not more than $500. Section 12-06-14. There are also other distinctions. For example, a felon's civil rights are suspended. Section 12-06-27.
A related statute, Section 12-22-29, N.D. C.C., provides:
"Every person who lets any building or portion of any building knowing that it is intended to be used for any purpose declared punishable by sections 12-21-10, 12-22-14, 12-22-27, and 12-22-28, or who otherwise permits any building or portion of a building to be so used, is guilty of a misdemeanor."
The defendant petitioner in this case was convicted under Section 12-22-14(2).
Section 12-22-28 provides that any person who owns any place as a place of resort for unlawful sexual intercourse or for any other lewd, obscene or indecent purpose, shall be punished by a fine of not less than $25 nor more than $1,000 and by imprisonment in the county jail for not more than one year. The history of these criminal statutes may be traced to statehood. They have always classified the crimes as misdemeanors punishable by imprisonment in the county jail.
We find no statute, and none has been pointed out to us, prescribing a minimum term in the penitentiary or a maximum term in the county jail, except where these limits are prescribed for a specific crime. Section 12-2217, supra, is susceptible of two constructions.
Where a statute prescribing a penalty is susceptible of two constructions, that construction which is most favorable to the defendant is to be preferred. State v. Fargo Bottling Works Co., 19 N.D. 396, 124 N.W. 387, 26 L.R.A., N.S., 872; State v. American Bottling Association, 19 N.D. 344, 124 N.W. 396.
When the legislature amended the statute in 1951 and repealed the provision providing for punishment by imprisonment in the penitentiary on a first degree conviction (second offense), it cannot be said that there is clear statutory language providing that a first offense is a felony or that it is punishable by imprisonment in the penitentiary. Construing the statutes in effect applicable to this case most favorable to the defendant, and in the absence of a showing that the quantum of the punishment bears a reasonable relationship to a sentence in the penitentiary, we hold that assignation, as a first offense, is a misdemeanor punishable by imprisonment in the county jail.
In the case of Simpson v. Nygaard, supra, we said that assignation in the second degree is a crime punishable by imprisonment in the penitentiary for one year and therefore a felony. In the light of the foregoing arguments and the overwhelming authority from other States cited herein, we think we erred in that decision and therefore now hold to the contrary. Consequently, the sentence imposed upon the petitioner, Ann Davis, was erroneous.
As a general rule, if the law prescribes a place of imprisonment, the court cannot direct a different place, and if it does so, the sentence is void and the prisoner is entitled to a discharge, at least from that particular sentence. 15 Am.Jur., Criminal Law, §§ 462 and 463; In re Bonner, 151 U.S. 242, 14 S.Ct. 323, 38 L.Ed. 149; In re Mills, 135 U.S. 263, 10 S.Ct. 762, 34 L.Ed. 107; Ex parte Burden, 92 Miss. 14, 45 So. 1, 131 Am.St.Rep. 511; Ex parte Tani, 29 Nev. 385, 91 P. 137, 13 L.R.A.,N.S., 518, Ann. 76 A.L.R. 510.
Where the law prescribes a place for imprisonment, the court may not direct a different place, and if the court does so, *885 the sentence is void and the prisoner is entitled to relief by habeas corpus, but an order for discharge is ordinarily withheld and an order made for the transfer of the prisoner to the proper prison or an opportunity given for the correction of the sentence by the trial court which imposed it. 39 C.J.S. Habeas Corpus § 102, P. 689; 25 Am. Jur., Habeas Corpus, § 63; Ex parte Tani, supra; Maxey v. Manning, 224 S.C. 320, 78 S.E.2d 633; Ex parte Nichols, 82 Cal.App. 73, 255 P. 244; People ex rel. v. Eller, 323 Ill. 28, 153 N.E. 597, 49 A.L.R. 490.
The sentence to the State penitentiary is void and the petitioner is ordered discharged under the proceedings had and the sentence imposed, but such discharge is without prejudice to the right of the State to have her resentenced on the verdict in accordance with the law and in conformity with this opinion. The imposition of a void sentence does not terminate the jurisdiction of the court. In re Moore, 71 N.D. 274, 300 N.W. 37; 15 Am.Jur., Criminal Law, § 477; 24 C.J.S. Criminal Law § 1589b. The respondent warden of the North Dakota State Penitentiary is, therefore, directed to release the petitioner, Ann Davis, to the Sheriff of Ward County, North Dakota, who shall bring her before the district court for sentence and judgment according to law.
SATHRE, C. J., and MORRIS, BURKE and STRUTZ, JJ., concur.
