In this original habeas corpus proceeding, Patrick L. Muldrew, Jr., who may he referred to hereafter in this opinion as the relator or as the prisoner, seeks to he discharged from the state penitentiary where he is serving a sentence of life imprisonment imposed on February 1, 1965, by the Intermediate Court of Ohio County, pursuant to the habitual criminal statutes of this state, following a conviction upon his plea of guilty to an indictment in that court charging him with being an accessory before the fact to the commission of a murder. A statement of the factual background is necessary in order to present in proper perspective the grounds assigned by the prisoner in his habeas corpus petition, as amended by permission of this Court, to form the basis of the discharge he seeks.
In 1961, the prisoner was sentenced by the Intermediate Court of Ohio County to a term of life imprisonment pursuant to the habitual criminal statutes of this state, following his conviction by a jury of a charge of being an accessory before the fact to murder in the first degree with a recommendation of mercy. On August 3, 1964, he was discharged from that imprisonment in a habeas corpus proceeding by the Circuit Court of Marshall County, that being the county in which the state penitentiary is located, on the ground *1036that the indictment charging the prisoner with haying-been an accessory before the fact to murder was void.
On August 11,1964, the prisoner was again indicted in the Intermediate Court of Ohio County upon a charge involving the same alleged murder as that which formed the basis of the indictment, conviction and consequent sentence to life imprisonment in 1961. The charging part of this latter indictment is as follows :
“ # * * did unlawfully, feloniously, and knowingly incite, instigate, move, procure, aid, counsel, hire, and command Robert Clinton Satterfield to feloniously, willfully, maliciously, deliberately, and unlawfully slay, kill, and murder one, Robert R. Nelson in the County of Ohio; and the Grand Jurors aforesaid do further present that, upon their oaths aforesaid, thereafter, the said Robert Clinton Satter-field, pursuant to said inciting, instigating, moving, procuring, aiding, counseling, hiring, and commanding in Ohio County, did felon-iously, willfully, maliciously, deliberately, and unlawfully, slay, kill, and murder one, Robert R. Nelson, in said Ohio County with the intent aforesaid, although the said Patrick L. Mul-drew, Jr., was not present at the scene of said crime * *
In 1961, Thomas P. O’Brien was Prosecuting Attorney of Ohio County and, as such, represented the State of West Virginia in all the court proceedings leading to the life imprisonment sentence imposed in that year as previously stated in this opinion. At the time of the return of the second indictment and at all stages of subsequent proceedings consequent upon that indictment, culminating in the second sentence to life imprisonment from which the prisoner seeks to be discharged in this habeas corpus proceeding, Thomas P. O’Brien, the former prosecuting attorney, was the Judge of the Intermediate Court of Ohio County. He presided and acted in that capacity when the *1037second indictment was returned by the grand jury of the Intermediate Court of Ohio County on August 11, 1964. Thereafter, Judge Thomas P. O’Brien disqualified himself from acting further as judge in the case, obviously because of the fact that he had acted as prosecuting attorney in the earlier stages of the case in 1961. In all subsequent proceedings in the case, including the imposition of the second sentence to life imprisonment from which the prisoner seeks to be discharged in the present case, Honorable James Gr. McClure, Judge of the Circuit Court of Ohio County, presided as Judge of the Intermediate Court of Ohio County.
The case was submitted in this Court for decision upon the habeas corpus petition, as amended by permission of this Court; upon a return and a demurrer to the petition filed in behalf of the respondent; upon a stipulation of facts relative to the manner of the endorsement and entry of the orders reciting the proceedings in the case while Judge McClure was presiding ; and upon briefs in writing and oral argument of counsel.
Questions raised and asserted in behalf of the prisoner as basis for his discharge are, briefly summarized, as follows: (1) Was Honorable Thomas P. O’-Brien legally disqualified to act as judge when the second indictment was returned by a grand jury of the Intermediate Court of Ohio County by reason of the fact that he had acted as prosecuting attorney in connection with the court proceedings leading to the former sentence to life imprisonment? (2) Was Honorable James Gr. McClure, Judge of the Circuit Court of Ohio County, vested with lawful authority to act as special judge in the case in the Intermediate Court of Ohio County? (3) Are certain specified court orders entered in the case setting forth proceedings before Judge McClure, while presiding as judge, void as having been endorsed or signed by Judge Thomas P. O’-Brien who had previously disqualified himself from *1038acting as judge in the case? (4) Will an indictment for the crime of accessory before the fact to murder support or warrant a lawful, valid plea of guilty to murder in the second degree? (5) Was the prisoner entitled to credit upon the second sentence for time served in the state penitentiary as a consequence of the former sentence to life imprisonment? (6) Was the prisoner’s conviction of a felony in 1953 in the United States District Court for the Northern District of Ohio, Eastern Division, void because of denial of his constitutional right to assistance of counsel, denial of his right to trial by a jury and denial of his alleged right to be indicted by a grand jury? The 1953 conviction was one of the two alleged prior felony convictions of the prisoner charged in the information filed pursuant to the habitual criminal statutes of this state. (7) Did Judge McClure abuse his discretion in refusing to permit the prisoner to withdraw his plea of guilty to murder in the second degree?
We are of the opinion that the regular judge acted with complete propriety in the circumstances in disqualifying himself to act in this case following the second indictment. State v. Cottrell, 45 W. Va. 837, pt. 3 syl., 32 S.E. 162. See also Anno. 72 A.LJEt. 2d 443. It was not improper for him to preside and he was not disqualified from presiding as judge in the court proceedings in connection with the return by the grand jury of the second indictment, and his presiding as judge in that connection cannot be regarded as affecting the validity of the indictment. The indictment constituted a mere accusation of a crime. Code, 1931, 51-2-8, which deals with disqualification of judges of courts of record to act in certain situations, concludes as follows # * Provided further, that nothing herein contained shall disqualify a judge * * * to enter a formal order designed merely to advance the canse toward a final hearing and not requiring judicial action involving the merits of the case. ’ ’
In State ex rel. Black v. Pennybacker, 144 W. Va. *1039612, 615, 110 S.E. 2d 265, 267, the Court stated: “* * * Preliminary orders, of a purely formal nature, were properly entered by the regular judge. Findley v. Smith et al., 42 W. Va. 299, 4 syl., 26 S.E. 370. As a matter of fact, ‘a special judge should not be elected to preside at a trial of a case, until the case is pending in court.’ The statute, to the extent that it provides for the election or selection of a special judge for a specific case, <# * * presupposes a case in court at the time of such election.’ Ropp v. Nadenbousch, 100 W. Va. 599, 131 S.E. 353.” We, therefore, hold that the second indictment is not invalid because of the fact that Judge Thomas P. O’Brien presided as judge at the time the indictment was returned.
The prisoner has exhibited with his petition a transcript of the proceedings leading to his plea of guilty to a felony in the United States District Court for the Northern District of Ohio, Eastern Division, on December 11, 1953. This transcript discloses that, before accepting the plea of guilty, the presiding judge proceeded to determine with meticulous care that the prisoner understood the nature and character of the charge and that the prisoner deliberately and intelligently waived any right he may have had to be indicted by a grand jury; his right to assistance of counsel; and properly entered a plea of guilty to the felony charged in the information. It is well settled that one charged with crime may waive his right to assistance of counsel, his right to trial by a jury and may enter a plea of guilty, if such actions on his part are taken intelligently and understandingly. State ex rel. Powers v. Boles, 149 W. Va. 6, pt. 5 syl., 138 S.E. 2d 159; State ex rel. May v. Botes, 149 W. Va. 155, pt. 5 syl., 139 S.E. 2d 177; State ex rel. Rider v. Boles, 149 W. Va. 282, pt. 1 syl., 140 S.E. 2d 611; State ex rel. Fountain v. King, 149 W. Va. 511, 142 S.E. 2d 59.
It is contended in behalf of the prisoner that the failure of the trial court, in imposing the second sentence, to give the prisoner credit for time served by *1040Mm, pursuant to Ms previous conviction upon the same charge, had the effect of postponing the time of his eligibility for parole and also denied him certain constitutional rights which will be referred to more specifically subsequently in this opinion.
In State ex rel. Rucker v. Boles, 149 W. Va. 190, 139 S. E. 2d 265, this Court, in an original proceeding in habeas corpus, held that a sentence of the prisoner to the state penitentiary was void because it was not authorized by the pertinent statute. In the body of the opinion (149 W. Va. 192, 139 S. E. 2d 267,) the Court stated: “ *' * *' In the event a new and valid sentence is imposed, the trial court will have the right and authority to give credit on such sentence for the period of time the prisoner shall have served pursuant to the void sentence. State ex rel. Powers v. Boles, Warden, etc., 149 W. Va. 6, 138 S. E. 2d 159; State ex rel. Truslow v. Boles, Warden, etc., 148 W. Va. 707, 137 S. E. 2d 235; State ex rel. Facemyer v. Boles, Warden, etc., 148 W. Va. 702, 137 S. E. 2d 237; State ex rel. Mundy v. Boles Warden, etc., 148 W. Va. 752, 137 S. E. 2d 240; State ex rel. Burdette v. Boles, Warden, etc., 148 W. Va. 758, 137 S. E. 2d 244; State ex rel. Boner v. Boles, Warden, etc., 148 W. Va. 802, 137 S. E. 2d 418; State ex rel. Nicholson v. Boles, Warden, etc., 148 W. Va. 229, 134 S. E. 2d 576.” See also Anno. 35 A.L.R. 2d 1283.
We are of the opinion that the contention of the prisoner that the trial court, in imposing the second sentence in this case, was legally required to give credit for time served, pursuant to the previous conviction upon the same charge, presents a question which this court has not heretofore decided.
Patton v. State of North Carolina, 381 F. 2d 636 (4th Cir. 1967), affirming the judgment of the United States District Court for the Western District of North Carolina rendered in a habeas corpus proceeding (256 F. Supp. 225), involved a prisoner who was released *1041under the authority of Gideon v. Wainwright, 372 U.S. 335, 83 S. Ct. 792, 9 L. Ed. 2d 799, from a sentence of imprisonment imposed by a state court and who, upon a retrial, was convicted by a jury upon the same charge. In that case the Court held that, in relation to the second conviction, the trial court denied the constitutional rights of the prisoner in imposing a greater sentence than that imposed pursuant to the former conviction, and also in failing to give the prisoner credit upon the second sentence for the period of imprisonment served by him as a consequence of the prior conviction and sentence for the same offense. Following are excerpts from the Patton case:
“ * * * Thus, as a result of seeking and obtaining a new trial, the prisoner, who originally would have been eligible for parole in October, 1965, now, it is agreed, will not become eligible until February 1970.
“The simplistic rationale traditionally offered for denying credit and permitting a harsher sentence at a second trial is that the prisoner, by successfully attacking his initial conviction, has ‘voided’ or ‘wiped out’ all consequences of that conviction — including the sentence imposed by the first judge and any time served under that sentence.
“The principle of fair dealing which impels judges in passing sentence to take into account the time a defendant was deprived of his liberty while awaiting trial, Dunn v. United States, 376 F. 2d 191 (4th Cir. February 24,1967), insists even more inexorably that he shall not be finessed out of credit for time he was forced to serve under an invalid sentence. The trial and conviction may be voided on appeal, but the time illegally exacted by the unconstitutional sentence is an irreversible fact. It is grossly unfair for society to take five years of a man’s life and then say, we now acknowledge that this should not have happened, but *1042we will set everything right by refusing to recognize that it did happen. This is an unworthy pretense. Courts should not he astute to fashion legal fictions to attain unjust ends.
“The risk of a denial of credit or the risk of a greater sentence, or both, on retrial may prevent defendants who have been unconstitutionally convicted from attempting to seek redress. For this reason, the District Court declared that predicating Patton’s constitutional right to petition for a fair trial on the fiction that he has consented to a possibly harsher punishment, offends the due process clause of the Fourteenth Amendment. It would confront the prisoner with the unhappy choice of either abandoning his constitutional right to a fair trial and serving out his prison term under the invalid sentence, or exercising that right under the hazard, in the event of a second conviction, of being treated as though the years of imprisonment already served had never occurred.
“* * * Enjoyment of a benefit or protection provided by law cannot be conditioned upon the ‘waiver’ of a constitutional right.
“In view of the foregoing, we need not rest our decision on double jeopardy grounds. We are persuaded, however, that the constitutional protection against double jeopardy would also be violated if an increased sentence or denial of credit is permitted on retrial.
“Double jeopardy, rather than being a single doctrine, is actually comprised of three separate though related rules, prohibiting (1) reprosecution for the same offense following acquittal, (2) reprosecution for the same offense following conviction, and (3) multiple punishment for the same offense.
“* * * Thus, unless a defendant is held to waive this double jeopardy protection in seeking a new *1043trial, a harsher penalty may not he imposed. And ■we have already declared, in Part II of this opinion, that we decline to predicate a prisoner’s exercise of his right to seek a new trial on the fiction that he has ‘waived’ the benefits of his initial sentence, because of the restrictive effect this has on access to post-conviction remedies. This is in accord with this circuit’s decision in United States v. Walker, 346 F. 2d 428 (4th Cir. 1965), that, in seeking correction of an erroneous sentence, a defendant does not waive his double jeopardy right not to be subjected to multiple punishment.
* # * *
“We affirm the District Court’s order to release the defendant from confinement unless he is constitutionally resentenced * * # with full credit for the time already served. ’ ’
While the Court of Appeals, in its opinion, made reference to the double jeopardy provision of the Constitution, the decision of that court and also the decision of the District Court, in relation to denial of credit for time served on the previous sentence, were based on denial of equal protection and due process of law. On the basis of the Patton case, therefore, we are of the opinion that, by the failure of the trial court to give the prisoner credit upon the second sentence for time served by him pursuant to the prior conviction upon the same charge, the prisoner was denied his constitutional rights under the due process and equal protection provisions of the Fourteenth Amendment of the Constitution of the United States; and that similarly he was denied his constitutional rights under the due process provision of Article III, Section 10 of the Constitution of West Virginia. We therefore hold that, if the prisoner is again arraigned, convicted and sentenced under the indictment now pending against him, he must be given credit on such sentence for the time previously served by him under the sentences imposed pursuant to his two previous convictions involving the charge contained in the indictment.
*1044“At common law and in those states in which the common-law distinctions between the principal felon and accessories before the fact are retained, there can be no conviction of a person as an accessory before the fact on an indictment charging him as principal, and, conversely, there can be no conviction as principal of one charged as accessory before the fact;”. 42 C.J.S., Indictments and Informations, Section 260, page 1284. To the same effect, see 27 Am. Jur., Indictments and Informations, Section 93, page 653, and Section 95, page 655; 31 O.J., Indictments and Informations, Section 485(2), page 845; 1A M. J., Accomplices and Accessories, Section 5, page 69; Sandage v. State, 61 Neb. 240, 85 N. W. 35; The Criminal Trial in the Virginias (2d Ed.), Volume 2, Section 795, page 550.
“* * * A statute may abolish the common-law distinction between an accessory before the fact and a principal, and provide that an accessory may be indicted, tried, and convicted as a principal.” 21 Am. Jur. 2d, Criminal Law, Section 124, page 199. “* * * Some of the states have provided by statute that all parties to a felony, either before or after the fact, shall be principals; and under such statutes all parties, who at common law would be accessories before the fact to larceny, become principals, and may be convicted as such. * * * However, in this state we still recognize the distinction between accessories and principals, and an accessory to be convicted must be indicted as such. State v. Roberts, 50 W. Va. 422, 40 S. E. 484; State v. Cremeans, 62 W. Va. 136, 57 S. E. 405. * * * ” State v. Powers, 91 W. Va. 737, 747, 113 S. E. 912, 916.
Code, 1931, 61-11-6, is in part as follows: “In the case of every felony, every principal in the second degree, and every accessory before the fact, shall be punishable as if he were the principal in the first degree; * * #.” This statute merely provides how principals in the second degree and accessories before the fact shall be punished. State v. Franklin, 139 W. Va. *104543, pt. 8 syl., 79 S. E. 2d 692. “An accessory before the fact to a felony cannot be convicted on an indictment against him as principal.” State v. Roberts, 50 W. Va. 422, pt. 5 syl., 40 S. E. 484. “Under the laws of this state, to convict a person as an accessory to a crime, he mnst be indicted and tried as snch.” State v. Lilly, 47 W. Va. 496, pt. 2 syl., 35 S. E. 837. An accessory before the fact mnst be indicted, prosecuted and punished as snch and cannot be indicted or convicted as a principal. State ex rel. Brown v. Thompson, 149 W. Va. 649, 657, 142 S. E. 2d 711, 717. It is interesting to note that in connection with the previous conviction of the prisoner in 1961, the trial jury found the prisoner guilty of being an accessory before the fact to murder in the first degree. See also State v. Loveless, 139 W. Va. 454, 80 S. E. 2d 442, and 140 W. Va. 875, 87 S. E. 2d 273.
In the light of the authorities previously cited, the Court holds that the prisoner’s plea of guilty of murder in the second degree entered upon the indictment which charged him with the offense of being an accessory before the fact to murder was not responsive to the charge made against him in the indictment and that, therefore, such plea was unwarranted by law and is void and a nullity.
The single syllabus point of Moore v. Lowe, 116 W. Va. 165, 180 S. E. 1, is as follows: “An indictment for accessory before the fact to murder will sustain a conviction of voluntary manslaughter.” The soundness of that decision was vigorously and ably assailed in a dissenting opinion. The case was also criticized in an article in 42 W. Ya. L. Rev. 67, in which the author of the article stated: “* * * Prior to the instant case it was apparently settled law in West Virginia that an indictment as a principal would not sustain a conviction for an accessory. It is difficult to reconcile this rule with the present holding.” To the extent that the Moore case holds that an indictment charging the accused with being an accessory before the fact to *1046murder will warrant a conviction of tlie accused as a principal, it is hereby expressly disapproved as being out of harmony with the law of this state.
Inasmuch as we hold that the prisoner’s plea, conviction and consequent sentence are void, it is unnecessary for us to consider the additional assignments of error, because we cannot assume that the same questions will arise in the event the prisoner is again brought to trial on the indictment pending against him. However, we do deem it appropriate earnestly to admonish the Bench and Bar of this state that failure properly to adhere to the statutory requirements for the election or selection of special judges may result in serious and unfortunate consequences. In this connection reference is made to the following cases recently decided by this Court: State ex rel. Black v. Pennybacker, 144 W. Va. 612, 110 S. E. 2d 265; Bowles v. Mitchell, 146 W. Va. 474, 120 S. E. 2d 697; Brinkley v. Brinkley, 147 W. Va. 557, 129 S. E. 2d 436.
For reasons stated in this opinion, the prisoner is discharged from his present imprisonment, subject to the right of the State of West Virginia to take such further action in the case as may be proper.
Prisoner discharged.