
44 N.W.2d 119 (1950)
Ex parte WATT.
No. 9181.
Supreme Court of South Dakota.
September 28, 1950.
*120 Danforth & Danforth, Sioux Falls, for petitioner.
Sigurd Anderson, Attorney General, Pierre, William J. Flittie, Assistant Attorney General, for defendant.
SEACAT, Circuit Judge.
On November 17, 1942, an information containing two counts was filed in the Circuit Court of Lawrence County, South Dakota, charging Donald Eugene Watt with the crime of grand larceny in the first count, and the crime of burglary in the third degree in the second count, to which information the said Donald Eugene Watt entered his plea of guilty to both counts. Immediately thereafter a second information was filed in said court by the state's attorney charging the said Donald Eugene Watt with being an habitual criminal, and alleging his conviction of four prior felonies, to which information he entered a plea of guilty. Thereupon the court pronounced the following sentence, omitting formal parts:
"* * * The court is bound to take notice of the nature and character of the offenses with which you have been previously charged and convicted, as well as the offenses committed in this county and state.
"Upon Count I of the information charging you with the crime of grand larceny, it will be the sentence and judgment of the court that you be imprisoned in the state penitentiary at Sioux Falls, South Dakota, for the term and period of five years; and upon Count II of the information charging you with burglary in the third degree, it will be the sentence and judgment of the court that you be imprisoned at Sioux Falls, South Dakota, in the state penitentiary for the term and period of ten years, and that you stand committed to the custody of the sheriff of Lawrence county, South Dakota, pending execution of both of such sentences.
"Upon the information charging you as an habitual criminal, it seems that under the law of this state and under the record you have made, it becomes the duty of the court to sentence you to the penitentiary for life. If the time is shortened it must be shortened by those who have authority to give you your liberty. You have not heretofore appreciated or had any understanding of your duties as a citizen. You seem to demonstrate at every opportunity that you must wrong someone. It is unfortunate that you have so made your life and so established a record, so it will be the sentence and judgment of the court that upon your plea of guilty to the information charging you as an habitual criminal you be imprisoned in the Sioux Falls penitentiary for and during the term and period of your natural life and that you stand committed to the sheriff of Lawrence county pending the execution of that sentence. * * *"
Thereafter on the same day, the judge signed and entered a written judgment to the effect that the defendant, Donald Eugene Watt, be imprisoned in the state penitentiary at Sioux Falls on Count I for the full term of five years, and on Count II for the full term of ten years, and that upon the information charging him as an habitual criminal with the commission of four previous felonies, he be imprisoned for the full term and period of his natural life, and committing the defendant to the custody of the sheriff pending the execution of the judgment. The said Donald Eugene Watt was thereupon committed to the state penitentiary at Sioux Falls, South Dakota.
On the 28th day of February, 1950, the petitioner, Donald Eugene Watt, applied to the Circuit Court of Minnehaha County, Second Judicial Circuit, for a writ of habeas corpus, and the court issued an alternative writ directed to G. Norton Jameson, warden of the penitentiary; and thereafter, the attorney general having made due return to said application and writ, the prisoner, Donald Eugene Watt, was brought before the court, appearing by his counsel, and the warden appearing in person and by an assistant attorney general, and a hearing was had thereon.
*121 On the 3d day of April, 1950, the circuit court of Minnehaha County, South Dakota, entered a judgment in said habeas corpus proceedings, in which judgment the court found that the applicant pleaded guilty under one information in two counts, filed in the circuit court of Lawrence County, South Dakota, on the 17th day of November, 1942, one for grand larceny and one for burglary, and that on the same day there was also filed an additional information in the same court charging the petitioner with being an habitual criminal, to which information he likewise pleaded guilty; and that thereupon the court proceeded to pronounce sentence immediately, ordering the said Donald Eugene Watt to be imprisoned in the state penitentiary at Sioux Falls, South Dakota, upon Count 1 for the full term of five years, and upon Count II for the full term of ten years, and upon the information charging him as an habitual criminal, with the commission of four previous felonies, for the full term and period of his natural life, and committing the defendant to the custody of the sheriff of Lawrence County pending the execution of the judgment; and that the defendant was, on the 20th day of November, 1942, committed and delivered to the South Dakota state penitentiary, and that he was and is still being held under and by virtue thereof.
The court further found: "* * * that from the facts and from the concessions made before the Court by the Attorney General's office and from the form of sentence imposed, that that portion of the judgment wherein and whereby the petitioner is sentenced for being an habitual criminal is not only erroneous, but null and void and of no force and effect. The Court likewise further finds that as no good time has been fixed and none could be fixed by the Board of Charities and Corrections as long as said life sentence existed, that the petitioner's application for a writ of habeas corpus be and the same is denied and dismissed, and that the prisoner be remanded to the custody of the Warden of the State Penitentiary until his ten-year sentence is served, less good time, if granted by the Board of Charities and Corrections."
And upon the above findings, the court entered the following judgment: "Now therefore, it is ordered and adjudged that the writ of habeas corpus heretofore issued on the 28th day of February, 1950 and filed March 1, 1950, be and the same is hereby dismissed, and said petitioner, Donald Eugene Watt, is hereby remanded to the custody of said G. Norton Jameson, the Warden of said penitentiary, with instructions to make recommendations to the Board of Charities and Corrections, as provided by law in regard to the good time of said Donald Eugene Watt, and that said Donald Eugene Watt be only released by the Warden of the State Penitentiary when he has served the ten-year sentence, less such good time, if any, as may be fixed by the Board of Charities and Corrections, as provided by law."
On the 6th day of April, 1950, upon the application of the attorney general, the Circuit Court of Lawrence County issued an order directing that the defendant, Donald Eugene Watt, be returned to Lawrence County for the purpose of resentence. An order and notice of hearing was given the defendant and his counsel, and a hearing had on the 8th day of May, 1950, at which hearing the defendant was present with his counsel; and on motion of the attorney general, and over the objection of the defendant, the court, with the Hon. Alex Rentto, judge, presiding, entered the following judgment, omitting the formal parts:
"And now, on this 8th day of May, 1950, it is by the Court
"Considered, ordered and adjudged that the Defendant, Donald Eugene Watt, on his plea of guilty to the charge contained in Count II of the information, and on his admission that he is the same person who committed the four felonies charged in the additional information filed herein, be imprisoned in the State Penitentiary of the State of South Dakota, at Sioux Falls in Minnehaha County, in said State, for the full term and period of his natural life, *122 said life sentence being enhanced punishment as a habitual criminal for the crime of burglary in the third degree; and further, that the sentence of ten (10) years, previously imposed for the offense of burglary in the third degree on November 17, 1942, is herewith vacated, such time as has already been served under said sentence to be deducted from the sentence herein imposed.
"That the Defendant stand committed to the Sheriff of Lawrence County, pending the execution of this sentence and judgment."
Thereupon the said Donald Eugene Watt was returned to the penitentiary where he is now confined. In the meantime, the record discloses that the Board of Charities and Corrections of the State of South Dakota had allowed the defendant Watt his time off for good behavior, so that he was eligible for discharge, on the ten-year sentence, June 20, 1950.
The said Donald Eugene Watt has now applied to this court for a writ of habeas corpus alleging, in substance, that he is unlawfully restrained of his liberty by the warden of the state penitentiary under the purported authority of the judgment of the Circuit Court of Lawrence County, South Dakota, dated May 8, 1950, which revoked the former judgment of said court sentencing the defendant to ten years' imprisonment on the charge of burglary in the third degree, and imposing life imprisonment for the same offense.
In habeas corpus proceeding to inquire into imprisonment resulting from a judicial proceeding, the inquiry is limited to question affecting jurisdiction of court which caused the imprisonment. SDC 37.-5504; State ex rel. Engebritson v. Circuit Court for Grant and Day Counties, 69 S.D. 454, 11 N.W.2d 659, 150 A.L.R. 739; State ex rel. Smith v. Jameson, 70 S.D. 503, 19 N.W.2d 505.
There is no dispute in the facts, and therefore the only question presented is whether it was within the authority of the second trial court, under the admitted facts, to set aside the prior sentence of ten years for burglary in the third degree, and resentence the defendant to life imprisonment.
It is very plain from the record before us that the sentencing court was laboring under the misapprehension that the information charging the defendant with four prior convictions constituted a separate and distinct crime for which the court was compelled to inflict life imprisonment, for the trial court, after sentencing the defendant to five years in the penitentiary for grand larceny, ten years in the penitentiary for burglary in the third degree, and committing him to the custody of the sheriff of Lawrence County pending the execution of both sentences, said: "Upon the information charging you as an habitual criminal, it seems that under the law of this state and under the record you have made, it becomes the duty of the court to sentence you to the penitentiary for life. * * *, so it will be the sentence and judgment of the court that upon your plea of guilty to the information charging you as an habitual criminal you be imprisoned in the Sioux Falls penitentiary for and during the term and period of your natural life and that you stand committed to the sheriff of Lawrence county pending the execution of that sentence."
In the late case of State ex rel. Smith v. Jameson, 70 S.D. 503, 19 N.W.2d 505, 507, the Supreme Court said: "Chapter 119, Laws 1927 [now Section 13.0611, South Dakota Code], authorizing a more severe penalty to be inflicted on one who is a. persistent offender, did not create a new or independent crime. State v. DeMarsche, 68 S.D. 250, 1 N.W.2d 67. It did not inflict additional punishment for a prior offense or authorize conviction on charge of being an habitual criminal. A prior conviction is not an element of an offense charged, but is merely a matter of aggravation going to the punishment to be imposed. Graham v. State of West Virginia, 224 U.S. 616, 32 S.Ct. 583, 56 L.Ed. 917; Goodman v. Kunkle, 7 Cir., 72 F.2d 334; Kuwitzky v. O'Grady, 135 Neb. 466, 282 N.W. 396; People v. Atkinson, 376 Ill. 623, 35 N.E.2d 58."
*123 It is conceded by the attorney general that the original judgment of the court, insofar as it attempts to impose life imprisonment on the defendant for being an habitual criminal, is void, but he insists that the Circuit Court of Lawrence County has jurisdiction to set aside and vacate said sentence of ten years, and impose a life sentence for said crime of burglary, and cites as his authority the case of Macomber v. State, 181 Or. 208, 180 P.2d 793.
That case is not controlling for the reason that the Oregon habitual criminal act is mandatory in its terms, while our statute leaves the imposition of the increased penalty of the sentence within the discretion of the trial court.
Under the Oregon law, the prior convictions may be established and the enhanced penalty imposed under provisions similar to subsection three of our act after conviction and sentence on the principal offense, and even though the prior convictions were known to the court at the time of passing sentence on the principal offense, for the reason that the imposition of increased punishment on repeaters, under the Oregon habitual criminal act, is not discretionary with the sentencing judge, but his mandatory duty. O.C.L.A. §§ 26-2801 to 26-2804; State v. DeMarsche, supra; Macomber v. State, supra.
On November 17, 1942, the trial court had jurisdiction of the defendant and of the subject matter. It was within his power to sentence the defendant to five years in the penitentiary for grand larceny and ten years in the penitentiary for burglary in the third degree, and commit him to the custody of the sheriff of Lawrence County for transfer to the penitentiary, all of which he did. Whether or not the penalties would have been increased if the trial court had realized that the prior convictions did not create a new or independent crime, but were merely a matter of aggravation of the punishment to be imposed for the conviction of the crime of grand larceny or burglary in the third degree or both, is now a matter of conjecture.
In the case of State v. DeMarsche [68 S.D. 250, 1 N.W.2d 69], supra, the sentencing judge, with full knowledge of the defendant's prior convictions, refused to increase the penalty, but gave the defendant a sentence of five years less than the maximum provided for the principal offense charged, and thereafter, upon a supplemental proceeding, the defendant was brought from the penitentiary and taken before a judge in the circuit other than the judge who had last sentenced him, who set aside the judgment sentencing the defendant to the penitentiary for ten years, and entered a new judgment of life imprisonment. The Supreme Court, in holding the first sentence to be valid, and setting aside the sentence of life imprisonment, said: "We are satisfied that the legislature never intended by the enactment of this law to permit a situation where one trial judge with knowledge of all the facts could in the exercise of his discretion sentence a defendant five years less than the maximum allowed by law, and then on a supplemental proceeding vest another trial judge with discretion and thereby permit a life sentence for the same offense for which defendant had already been sentenced. It should be noted in this connection that our statute does not create a new offense, but merely prescribes a punishment for the subsequent offense which in the discretion of the court may be made more severe than the punishment provided for the prior offenses. Such is the construction placed upon similar laws. See cases cited in 24 C.J.S., Criminal Law, § 1958. The third trial judge was, therefore, imposing a sentence for the identical crime for which the defendant had already been sentenced."
We are also satisfied that where the facts of defendant's prior conviction or convictions are alleged in the original information charging the defendant with the principal offense, or such facts are set forth in an additional information, and the defendant, after having been convicted of the principal offense, admits the truth of the prior convictions as alleged, it is the duty of the trial court, if the judgment is *124 not arrested or a new trial granted, to proceed under SDC 34.3701, and sentence the defendant to such punishment as, in his discretion, he thinks the defendant should receive. If the trial court refuses, fails, or for any cause neglects to increase the sentence beyond the maximum provided by law for the principal offense, and gives the defendant a sentence within the limits which the statute provides for the original offense committed, and the defendant is thereupon committed to the penitentiary and begins serving such sentence, the judgment or sentence is valid, notwithstanding the fact that the trial court may have attempted to impose a void sentence on the defendant of life imprisonment for the offense of being an habitual criminal. In re Taylor, 7 S.D. 382, 64 N.W. 253, 45 L.R.A. 136, 58 Am.St.Rep. 843. While the trial court retains sufficient jurisdiction even after commitment in execution of the sentence, to permit, hear and pass upon a motion for a new trial in proper case at any time prior to the complete finality of the judgment by expiration of the time for appeal therefrom, a valid sentence cannot be increased in severity after the defendant has commenced the serving thereof. State ex rel. Conway v. Hughes, 62 S.D. 579, 255 N.W. 800; Anno. 168 A.L.R. 706.
There is another important reason why the Circuit Court of Lawrence County was without authority to vacate the sentence of ten years for burglary in the third degree and impose a life sentence for the same offense in its judgment of May 8, 1950.
Where a court has jurisdiction of the person and offense, the imposition of a sentence in excess of what the law permits does not render the legal or authorized portion of the sentence void, but only leaves such portion of the sentence in excess open to question and attack. In re Taylor, 7 S.D. 382, 64 N.W. 253, 45 L.R.A. 136, 58 Am.St.Rep. 843; State v. Sturgis, 54 S.D. 245, 222 N.W. 681; State ex rel. King v. Jameson, 69 S.D. 565, 13 N.W.2d 46; In re Lackey, 6 S.D. 526, 62 N.W. 134.
The record discloses that after the defendant was committed to the penitentiary and had served all of his five-year sentence, and more than eight years of the ten-year sentence, he made application to the Circuit Court of Minnehaha County for a writ of habeas corpus to test the legality of his imprisonment under the judgment of the court of November 17, 1942. A hearing was had upon the defendant's application, and the Circuit Court of Minnehaha County entered a judgment or order to the effect that the judgment of the court, insofar as it attempted to impose life imprisonment on the defendant for the crime of being an habitual criminal, was null and void and of no force and effect, and that the defendant had received a valid sentence of five years for grand larceny and ten years for burglary in the third degree, both sentences running concurrently, and remanded the prisoner back to the penitentiary until he had served his ten-year sentence-for burglary in the third degree, less such time off for good behavior that he might be entitled to receive.
This decision of the Circuit Court of Minnehaha County constituted a final order affecting the rights of the defendant under said sentence made in a special proceeding from which an appeal to the Supreme Court is authorized. Since an order of a circuit court or a judge on a writ of habeas corpus is a final order affecting a substantial right and appealable, it is res judicata as to every question that was or could have been presented upon such a writ, the facts and conditions remaining the same. In re Scott, 1 Dak. 135, 46 N.W. 512; McMahon v. Mead, 30 S.D. 515, 139 N.W. 122, 123.
In the case of McMahon v. Mead, the Supreme Court of this state said: "We are not unmindful of the fact that in a majority of the jurisdictions of this country the courts hold an order of the court remanding one who has sought discharge upon habeas corpus not to bar another court from discharging such person upon the very ground passed upon by the former court; but, where the reason for a rule of law does not exist, such rule should not prevail, and the reason upon which such rule is based is that an order *125 in habeas corpus proceedings is not appealable. The right to appeal in any matter is purely statutory, and, in those jurisdictions where an appeal from an order upon habeas corpus is denied, the courts base such denial upon the fact that such courts do not deem an order in habeas corpus proceeding to be a final order, and, not being considered a final order, there is no statute authorizing an appeal therefrom. Thus we find the decisions of such courts traveling in an endless circle. The order, not being final, is not appealable. The order, not being appealable, is not res judicata. The order, not being res judicata, is not final, and the relator may therefore renew his application as oft as he sees fit. Hurd on Habeas Corpus, 573. Happily the courts of this state are not traveling along this unending road, but travel upon a straight path that leads on to a definite end. Under the rulings of our courts, an order made in habeas corpus proceedings is a final order. Being a final order, it is appealable. Being appealable, it is res judicata of all matters that were or could have been raised upon such proceeding. In U.S. ex rel. Scott v. Burdick, 1 Dak. 137, 46 N.W. 571, the territorial court, after a full discussion of its reasons therefor, held that an appeal lay from the order of the district court in a habeas corpus proceeding. At the same term of court, In re Scott, 1 Dak. 135, 46 N.W. 512, 513, that court said: `After careful consideration, we have arrived at the conclusion that this writ should be abated. Under our laws, the principle of res judicata is applicable to a proceeding upon habeas corpus. In such cases the district court has original concurrent jurisdiction with this court, and, where a court has jurisdiction, it has a right to decide every question which arises in the cause; and, whether its decision be correct or otherwise, its judgment until reversed is binding in every other court. In the application of the principle of res judicata, it ought to make no difference whether the first writ was returnable before a court of record or a Judge out of court; for in neither case ought the party suing out the writ be permitted to proceed ad infinitum before the same court or officer, or before another court or officer having concurrent jurisdiction, to review the former decision, while the facts and conditions remain the same. * * *"
In the case of Ex parte Messina, 233 Mo.App. 1234, 128 S.W.2d 1082, 1085, the Supreme Court of Missouri, quoting from Freeman on Judgments, 3d Ed., sec. 324, said: "The principles of public policy requiring the application of the doctrines of estoppel to judicial proceedings, in order to secure the repose of society, are as imperatively demanded in the cases of private individuals contesting private rights under the form of proceedings in habeas corpus as if the litigation were conducted in any other form; otherwise, as is well stated in the opinion of Senator Paige (Mercein v. People, 25 Wend. [N.Y., 64, 35 Am.Dec. 653] supra), `such unhappy controversies as these may endure until the entire impoverishment or the death of the parties renders their further continuance impracticable. If a final adjudication upon a habeas corpus is not to be deemed res adjudicata, the consequences will be lamentable. This favored writ will become an engine of oppression, instead of a writ of liberty.'"
In this case the record discloses that there has been no change in the facts or conditions since the rendition of the order of the Circuit Court of Minnehaha county in said habeas corpus, proceeding, except that the defendant has now fully served his sentence of ten years.
It is therefore the judgment of this court that the applicant is entitled to be released from the penitentiary, and the writ will therefore issue.
SEACAT, Circuit Judge, sitting for HAYES, P. J., disqualified.
All the Judges concur.
