
195 Va. 228 (1953)
M. L. ROYSTER, SUPERINTENDENT OF VIRGINIA STATE FARM
v.
JOHN LEWIS SMITH.
Record No. 4156.
Supreme Court of Virginia.
October 12, 1953.
J. Lindsay Almond, Jr., Attorney General    and    Thomas M. Miller, Assistant Attorney General,    for the plaintiff in error.
W. A. Hall, Jr.,    for the defendant in error.
Present, All the Justices.
1.  A writ of    habeas corpus    does not lie where the judgment of conviction is merely voidable, no matter how flagrant the error, where correction is possible through appellate proceedings.  If the court had jurisdiction of the accused and of the offense and if the punishment imposed is of the character prescribed by law,    habeas corpus    does not lie because of irregularities in the sentence.
2.  In    habeas corpus    proceedings the defendant's conviction as a third offender (Code 1950, section 53-296) was set aside by the trial court on the ground that one of the prior convictions, for burglary, was null and void because the sentence imposed was confinement in the penitentiary for two years whereas the statutory minimum for burglary is five years.  This was error because the sentence, though erroneous, was not void, but voidable merely, and no timely objection was made or writ of error prosecuted to it.
Error to a judgment of the Circuit Court of Goochland county.  Hon. Burnett Miller, Jr., judge presiding. The opinion states the case.
HUDGINS
HUDGINS, C.J., delivered the opinion of the court.
John Lewis Smith was convicted and sentenced to the penitentiary for the commission of five separate and distinct felonies.  On January 6, 1930, he was convicted in the Circuit Court of Madison county on two indictments; one charging the illegal manufacture of ardent spirits, the sentence being confinement in the penitentiary for one year, the other charging housebreaking with intent to steal, the sentence being similar confinement for five years. The order stated that the two sentences should run consecutively.  Smith served these sentences and was discharged from custody.
On June 5, 1935, he was convicted in the Circuit Court of Page county for housebreaking with intent to steal and sentenced to the penitentiary.  He served this sentence and was discharged from custody.
On February 23, 1949, he was convicted in the Circuit Court of Page county on two indictments for burglary to which he plead guilty.  On each he was sentenced to two years in the penitentiary, the order stating that the sentences should run consecutively and not concurrently.
On July 27, 1949, he was tried as a third offender under the provisions of Code section 53-296, in the Circuit Court of the city of Richmond and sentenced to an additional ten years in the penitentiary.
On June 5, 1952, the same John Lewis Smith, hereinafter designated petitioner, filed a petition for writ of    habeas corpus    in the Circuit Court of Goochland county wherein he alleged that each of the above mentioned convictions was null and void and prayed to be discharged from custody.  The lower court issued the writ, but on the hearing petitioner abandoned his attack upon all the judgments of conviction against him except the two convictions for burglary entered against him on February 23, 1949, in the Circuit Court of *230  Page county, and his conviction as a third offender.  The court held that the two convictions for burglary were null and void on the ground that the sentence imposed on each of the two indictments was two years in the penitentiary, whereas the minimum punishment prescribed for burglary by Code section 18-159 was and is five years.  In the same order and over the objection of the Attorney General and petitioner, petitioner was transferred to the custody of the Circuit Court of Page county, "for all such further action by the Circuit Court of Page county regarding the convictions against petitioner upon two charges of burglary in the proceedings of the Circuit Court of Page county on February 23, 1949, as that court may be advised."
The Circuit Court of Goochland county retained the    habeas corpus proceeding on its docket and on the 31st day of October, 1952, held that the judgment of conviction of petitioner as a third offender pronounced by the Circuit Court of the city of Richmond was null and void and discharged petitioner from custody under all of the sentences existing against him at the time of the filing of the petition.  On the application of M. L. Royster, superintendent of Virginia State Farm, this writ of error was granted to review the two judgments of the lower court.
While the record shows that petitioner has been convicted and sentenced to the penitentiary for the commission of five separate and distinct felonies, two of the judgments of conviction were pronounced against him in 1930 at the same term of the Circuit Court of Madison county and the two convictions for burglary were pronounced against him at the same term of the Circuit Court of Page county.  Hence the validity of the conviction of petitioner as a third offender depends upon whether either of the judgments of conviction pronounced by the latter court in 1949 was final and not subject to collateral attack.     Wesley
Commonwealth,    190 Va. 268, 56 S.E.(2d) 362.  *231 
The orders evidencing the two judgments of conviction and sentence for burglary are similar.  The following order was entered on January 29, 1949, on one of the indictments.
"Commonwealth v. John Lewis Smith"
"FELONY (BURGLARY)"
"This day came the attorney for the Commonwealth and the defendant, John Lewis Smith, appeared in the Court in the custody of the Sheriff of this county, and by counsel heretofore appointed to defend him, and being thereof arraigned plead guilty to the indictment, after having been advised by counsel."
"The Court having explained to him in open court the effects of his plea of guilt and being satisfied that he knows and understands the consequence of such plea; with the consent of the attorney for the Commonwealth and also of the defendant given in open court and entered of record, the court hears said case on said plea without the intervention of a jury, and the court having heard the evidence takes the case under advisement pending an investigation of the defendant by the Probation and Parole Officer of this district, who is hereby requested and directed by the court to make an investigation of the defendant, John Lewis Smith, and subsequently report his findings to this court."
"And the said defendant is remanded to jail."
Thereafter, on February 23, in the same court and in the same case the following judgment of conviction was entered.
"FELONIES (BURGLARY)"
"This day came the attorney for the Commonwealth and the defendant, John Lewis Smith, appeared in the court in the custody of the Sheriff of this county, and by counsel *232 heretofore appointed by the court to defend him, pursuant to an order of this court entered on the 29th day of January 1949."
"Having received the written report of, and having heard the sworn testimony of Roy Lee Miller, Assistant Probation and Parole Officer of this District, in open court, which report is hereby ordered filed with the papers in this case, and the court being fully advised doth find the defendant, John Lewis Smith, guilty on each of two charges of burglary, as charged in the indictments, and fixes his punishment at confinement in the penitentiary of this Commonwealth for the term of two (2) years in each of two charges."
"It is therefore considered by the court that the Commonwealth recover the said John Lewis Smith the costs incident to this prosecution and that he be confined in the penitentiary of this Commonwealth, at hard labor, for the term of two (2) years on each of two charges, to run consecutively, subject to a credit of 36 days the time spent in jail."
If the two sentences for burglary are nullities as contended by the petitioner, then his conviction as a third offender is illegal and void; if on the other hand the sentences are merely voidable, as contended by the Attorney General, then they are not subject to collateral attack and the judgments pronounced in the    habeas corpus    proceedings are erroneous and petitioner is not entitled to be discharged from custody.
  This court has repeatedly held that a writ of    habeas corpus    does not lie where the judgment of conviction is merely voidable by reasons of error of law or fact, omissions, or other irregularities, no matter how numerous or flagrant they may be.  The remedy in such cases is by appeal or writ of error. The underlying question in such proceedings is that of jurisdiction -- that is, whether the court had jurisdiction of the person and the subject matter and the power to render the particular judgment.  If the court had jurisdiction of the person and of the subject matter of *233 the prosecution, and if the punishment imposed is of the character prescribed by law, a writ of    habeas corpus does not lie to release the prisoner from custody merely because of irregularities or defects in the sentence.     Fitzgerald     Smyth,    194 Va. 681, 74 S.E.(2d) 810;    McDorman     Smyth,    187 Va. 522, 47 S.E.(2d) 441; Thornhill     Smyth,    185 Va. 986, 41 S.E.(2d) 11;    Harmon     Smyth,    183 Va. 414, 32 S.E.(2d) 665;    Hanson     Smyth,    183 Va. 384, 32 S.E.(2d) 142;
Hobson     Youell,    177 Va. 906, 15 S.E.(2d) 76;    Gross     Smyth, 182 Va. 724, 30 S.E.(2d) 570;    Commonwealth     Beavers,    150 Va. 33, 142 S.E. 402; 25 Am.Jur. 185-186, Habeas Corpus sec. 55.
In    In re Belt,    159 U.S. 95, 100, 15 S.Ct. 987, 988, 40 L.ed. 88, 90, Chief Justice Fuller said "The general rule is that the writ of    habeas corpus"
will not issue unless the court, under whose warrant the petitioner is held, is without jurisdiction; and that it cannot be used to correct errors. Ordinarily the writ will not lie where there is a remedy by writ of error or appeal.
Mr. Justice Jackson in his concurring opinion in    Brown     Allen, (February 9, 1953) 344 U.S. 443, 73 Supreme Court Reporter 397, said:  "No state is obliged to furnish multiple remedies for same grievance.  Most states, and with good reason, will not suffer a collateral attack such as    habeas corpus"
to be used as a substitute for or duplication of the appeal.  A state properly may deny    habeas corpus    to raise either state or federal issues that were or could have been considered on appeal.""
  The general rule is that a sentence to a shorter term or lesser punishment than that prescribed by law for the offense for which an accused was convicted ordinarily cannot be successfully assailed in    habeas corpus proceedings.  25 Am.Jur. 189,    Habeas Corpus    sec. 62; 39 C.J.S. 501, Habeas Corpus    sec. 26(f).
In    Lee Lim     Davis,    75 Utah 245, 284 P. 323, 76 A.L.R. 460 at 463, it is said that defendant "seeks to apply the principle applicable in cases where the court in pronouncing *234 sentence does not follow the law, but imposes a sentence of imprisonment for a term less than that which it is by law directed to impose.  Such a sentence, by the weight of authority though erroneous, is not void, and the prisoner will not be released on    habeas corpus    until he has served the term actually imposed by the sentence."  This rule is restated and a number of cases cited to support it in the Annotation in 76 A.L.R. at page 505.
This court held in    Jones     Commonwealth,    20 Gratt. (61 Va.) 848, that a sentence of an accused to the penitentiary for a shorter period than that prescribed by statute is a mere inadvertence, voidable but not void.  The pertinent facts in that case were that a jury found the accused guilty of stealing two horses and fixed his punishment at three years in the penitentiary. The trial court entered judgment on this verdict.  The statute, at that time, fixed the minimum punishment for such an offense at five years confinement in the penitentiary.  The mistake was not discovered until after the jury was discharged.  The accused made a direct attack upon the judgment by seeking and obtaining a writ of error from this court.  Speaking to the point, the court said, "And as that act prescribes five years as the shortest term of confinement in the penitentiary with which the said offense can be punished, and as the term of such confinement, as fixed by the verdict and judgment in this case, is three years only, it follows that in that respect the said judgment is erroneous; and for that cause it must be reversed, though the error is in favor of the accused. And this is admitted by the Attorney-General."
* * *
"If the court had discovered, before the jury was discharged that the term of imprisonment ascertained by the verdict was shorter than the law allowed, the jury would have been sent back to their rooms to reconsider and correct that matter.  But the discovery was not made, and the judgment conformed to the verdict.  The error is one of *235 mere inadvertence.  And, though the judgment must be reversed therefor, we are of opinion that there must be a    venire facias de novo."
The court reversed the judgment and caused the prisoner to be brought before it on a    habeas corpus    proceeding and remanded him to the custody of the lower court for a new trial.
We held in    Crutchfield     Commonwealth,    187 Va. 291, 46 S.E.(2d) 340, that a sentence in excess of that which the court rendering it had the power to pronounce, is void for the excess only.  The facts in that case were that Crutchfield pleaded guilty of unlawful assault to an indictment charging him with malicious wounding under the maiming act, which plea was accepted by the Corporation Court of the city of Lynchburg.  The court on the plea, convicted the accused of unlawful wounding and fixed his punishment at three years in the penitentiary.  No appeal was taken to this judgment of conviction.  Later, on a writ of    habeas corpus    issued by the Circuit Court of the city of Richmond, it was held that the sentence of three years was a nullity.  Thereupon the custody of the accused was transferred to the Corporation Court of the city of Lynchburg.  This latter court on the motion of the Commonwealth and over the objection of the accused entered an order declaring all proceedings in the former trial null and void and put the accused upon a new trial on the same indictment.  On the second trial the accused was found guilty of unlawful wounding and his punishment fixed at confinement in the penitentiary for four years, judgment being entered on the verdict.  On review by this court, this judgment was reversed and the verdict of the jury set aside.  Mr. Justice Spratley speaking for the court said:  "A plea of guilty, accepted and entered by the court, is a conviction or the equivalent of a conviction of the offense to which it is directed, the effect of which is to authorize the imposition of the punishment prescribed by law on a verdict of guilty of *236 the offense admitted.     Hobson     Youell,    177 Va. 906, 15 S.E.(2d) 76."
* * *
"On the trial of October 14, 1946, (first trial) the Corporation Court of the city of Lynchburg had jurisdiction of the person of the defendant and the subject matter of the prosecution.  By reason of acceptance of the defendant's plea, he could have been found guilty of no greater offense than unlawful assault, a misdemeanor.  The sentence imposed was in excess of that prescribed for a misdemeanor and as to the excess was invalid."
* * *
"It is well settled that 'a court may impose a valid sentence in substitution for one that is void, even though the execution of the void sentence has commenced.     Powell     Commonwealth,    182 Va. 327, 28 S.E.(2d) 687.'"
* * *
"The order of the Circuit Court of the city of Richmond in the    habeas corpus    proceeding clearly discloses that it did not adjudge the whole proceedings of October 14, 1946, null and void.  It only held 'that the sentence of three years is a nullity.'  The sole issue before that court was whether the sentence of three years was in excess of that prescribed by law.  Upon the recommitment of the defendant to the custody of the sergeant of the city of Lynchburg for further action, it only remained for the corporation court of that city to impose a valid sentence for a misdemeanor."
A sentence in excess of that prescribed by law is not void    ab inito because of the excess, but is good in so far as the power of the court extends, and is invalid only as to the excess.  An accused in custody on such a sentence cannot be discharged on    habeas corpus    until he has suffered so much of the punishment as it was within the power of the court to impose.
Judge Haymond, now President of the Supreme Court of West Virginia, in Dye     Skeen,       W.Va.   , 62 S.E.(2d) *237 681; 24 A.L.R.(2d) 1234 at p. 1241, quoted with approval the following extracts from    Ex parte Mooney    26 W.Va. 36, 53 Am.Rep. 59, "A proceeding defective for    irregularity    and also one void for    illegality    may be reversed upon error or    certiorari; but it is the latter defect only which gives authority to discharge on    habeas corpus."
* * *
"Wise rules of procedure established for the regulation of other judicial proceedings are not to be discarded in that of    habeas corpus    when they are applicable.  One of these rules is, that when a record or process is only collaterally    brought into question, it can not be invalidated for error or irregularity."
* * *
"Therefore, where a party is imprisoned under a judgment or order of a court having authority to make the order, he can not be discharged on    habeas corpus,    however erroneous such judgment may be."
* * *
"Errors which render the judgment merely voidable and do not make it absolutely void, can not be enquired into under a writ of    habeas corpus."
* * *
"If the judgment is in excess of that which the court rendering it had by law the power to pronounce, such judgment is void for the excess only. Brooks     Com.    4 Leigh, Va. 669;    Murray     Com.    5 Leigh, Va. 720; Hall     Com.    6 Leigh, Va. 615, 618."
The Circuit Court of Page county appointed two practicing attorneys, Mark D. Woodward and Roby G. Janney, to defend petitioner before he was arraigned. After the attorneys had full opportunity to prepare the case for defense of petitioner, he, on their advice, pleaded guilty on his arraignment.  In addition, the trial judge in open court fully explained to petitioner the effect of the pleas of guilty, and *238 did not accept them until after he was satisfied that petitioner knew and understood the consequences of such pleas. No objection was made to the sentences and no writs of error were prosecuted thereto.  The petitioner acquiesced in the sentences and suffered the penalty imposed by serving the full period of the combined sentences, less credits to which he was entitled under Code sections 53-211 and 53-213.  According to his record in the penitentiary, he was entitled to be discharged from custody on those two sentences on September 30, 1951, more than eight months before June 5, 1952, when he filed his petition for writ of    habeas corpus.
The trial court should have refused to issue the writ and permitted the proper authorities to retain custody of the petitioner until he had served the sentence imposed upon him as a third offender on July 27, 1949, by the Circuit Court of the city of Richmond.
For the reason stated the judgment of the lower court declaring the two judgments of conviction for burglary entered against the accused on the 23rd day of February 1949, in the Circuit Court of Page county and the conviction and sentence of petitioner as a third offender by the Circuit Court of the city of Richmond mere nullities, are hereby reversed and the petition for writ of habeas corpus    is dismissed.
Reversed and final judgment.
