This matter is before this Court upon a writ of prohibition filed by Thomas “T.J.” Gessler, Jr. (hereinafter “Petitioner”) seeking to prevent the enforcement of a May 3, 2002, order of the Circuit Court of Ohio County reinstating six counts of an indictment against the Petitioner. The Petitioner contends that a plea agreement in which he pled guilty to two counts in exchange for the dismissal of the remaining six counts with prejudice should not have been set aside by the lower court. Upon thorough review of this matter, this Court concludes that the lower court correctly resolved this matter, and we consequently deny the requested writ of prohibition.
*371 I. Facts
On September 10, 2001, the Grand Jury of Ohio County indicted the Petitioner on eight counts arising from crimes allegedly committed on August 21, 1999, and November 21, 1999. 1 On November 20, 2001, the Petitioner and the State entered into a plea agreement in which the Petitioner pled guilty to two counts of “felon in possession of a firearm,” a violation of West Virginia Code § 61-7-7(b)(2). Pursuant to the plea agreement, the lower court dismissed the remaining six counts of the indictment with prejudice. At the time of plea negotiations and the entry of the plea, both the Petitioner and the State erroneously believed that the two counts to which the Petitioner pled guilty were felonies, based upon the version of West Virginia Code § 61 — 7—7(b)(2) in effect at the time of the plea negotiations. However, although that section had been amended to classify those crimes as felonies, effective June 8, 2000, the crimes were classified as misdemeanors at the time the Petitioner allegedly committed the crimes. Prior to sentencing, the lower court discovered the error and consequently found that the Petitioner could not have been lawfully charged with the felonies of “felon in possession of a firearm” and that the plea agreement was invalid and unenforceable. Thus, based upon the fact that the dismissal with prejudice of the remaining six counts was an integral part of an invalid plea agreement, the lower court reinstated the remaining six counts of the indictment and dismissed the counts of felon in possession of a firearm. 2
The Petitioner requests a writ of prohibition, contending that the six counts had been dismissed with prejudice and cannot be reinstated against him without violating principles of double jeopardy. He further contends that the dismissal with prejudice, pursuant to the plea agreement, is binding upon both the defendant and the State, despite the mutual mistake regarding the classification of the crimes as misdemeanors or felonies. The State asserts that the lower court properly resolved the quagmire by withdrawing the plea agreement and reinstating the remaining six counts. The State contends that only a valid plea agreement is enforceable and binding and maintains that the plea agreement in the present case was not a valid and enforceable plea agreement because the sentence to be imposed was a legal impossibility based upon the mutual mistake regarding the classification of the crimes as felonies rather than misdemeanors. Thus, the State concludes that the lower court implemented the only proper remedy, voiding the agreement in its entirety and placing the parties, both the defendant and the State, in the positions they occupied prior to their execution of the plea agreement.
II. Standard of Review
This Court expressly stated the standard of review applicable to a writ of prohibition in syllabus point one of
State ex rel. United Hospital Center, Inc. v. Bedell,
“ ‘A writ of prohibition will not issue to prevent a simple abuse of discretion by a trial court. It will only issue where the trial court has no jurisdiction or having such jurisdiction exceeds its legitimate powers. W. Va.Code, 53-1-1.’ Syl. pt. 2, State ex rel. Peacher v. Sencindiver,160 W.Va. 314 ,233 S.E.2d 425 (1977).” Syl. pt. 2, State ex rel. Kees v. Sanders,192 W.Va. 602 ,453 S.E.2d 436 (1994).
This Court elaborated on this standard of review in syllabus point four of
State ex rel. Hoover v. Berger,
*372 In determining whether to entertain and issue the writ of prohibition for cases not involving an absence of jurisdiction but only where it is claimed that the lower tribunal exceeded its legitimate powers, this Court will examine five factors: (1) whether the party seeking the writ has no other adequate means, such as direct appeal, to obtain the desired relief; (2) whether the petitioner will be damaged or prejudiced in a way that is not correctable on appeal; (3) whether the lower tribunal’s order is clearly erroneous as a matter of law; (4) whether the lower tribunal’s order is an oft repeated error or manifests persistent disregard for either procedural or substantivé law; and (5) whether the lower tribunal’s order raises new and. important problems or issues of law of first impression. These factors are general guidelines that serve as a useful starting point for determining whether a discretionary writ of prohibition should issue. Although all five factors need not be satisfied, it is clear that the third factor, the existence of clear error' as a matter of law, should be given substantial weight.
In determining the third factor, the existence of clear error as a matter of law, we will employ a
de novo
standard of review, as in matters in which purely legal issues are at issue. Syllabus point one of
Chrystal R.M. v. Charlie A.L.,
III. Discussion
A. West Virginia Jurisprudence
In
State ex rel. Morris v. Mohn,
This Court also addressed the potential double jeopardy bar in
Myers
and concluded as follows in syllabus point thirteen: “The entry of a nolo contendere or a guilty plea pursuant to a plea bargain and the oral pronouncement of a sentence by a circuit court does not impose a double jeopardy bar where the defendant has not served any portion of the sentence.” The Court essentially determined that double jeopardy had simply not attached at that stage. This Court was adamant in
Myers
that “rules regarding the attachment of jeopardy at a jury or a nonjury trial cannot be directly transposed to the plea bargain process-”
We have generally followed the United States Supreme Court’s holdings with regard to when jeopardy attaches, as summarized in United States v. Martin Linen Supply Co.,430 U.S. 564 , 569,97 S.Ct. 1349 , 1353,51 L.Ed.2d 642 , 650 (1977): ‘The protections afforded by the [Double Jeopardy] Clause are implicated only when the accused has actually been placed in jeopardy_ This state of jeopardy attaches when a jury is empaneled and *373 sworn, or, in a bench trial, when the judge begins to receive evidence.’ (Citations omitted) See Syllabus Point 1, Adkins v. Leverette,164 W.Va. 377 ,264 S.E.2d 154 (1980); Syllabus Point 4, Manning v. Inge,169 W.Va. 430 ,288 S.E.2d 178 (1982).
Even though jeopardy attaches at a certain stage in a plea bargain proceeding, this does not mean that it has become irretrieveably embedded. As illustrated in United States v. Tateo,377 U.S. 463 ,84 S.Ct. 1587 ,12 L.Ed.2d 448 (1964), if a defendant is successful in setting aside his guilty plea conviction, the State is not barred from prosecuting him on the underlying offense. In Tateo, the United States Supreme Court recognized that while jeopardy had initially attached when the guilty plea was entered and sentence had been executed, the subsequent setting aside of the guilty plea because it was coerced did not preclude further prosecution because it was analogous to a reversal on appeal for trial error, citing United States v. Ball,163 U.S. 662 ,16 S.Ct. 1192 ,41 L.Ed. 300 (1896), and Forman v. United States,361 U.S. 416 ,80 S.Ct. 481 ,4 L.Ed.2d 412 (1960).
B. Other Jurisdictions
This Court’s assertions in this regard conform with the approach of courts of other jurisdictions. It has been universally held that a guilty plea must be voluntarily, knowingly and intelligently made in order to be valid.
Henderson v. Morgan,
An- excellent example of the reasoning of other jurisdictions facing similar scenarios is found in
Chae v. People,
In
United States v. Greatwalker,
*374 C. Resolution
The Petitioner in the present ease maintains that the lower court’s dismissal of the six counts with prejudice, incident to the plea agreement, forecloses any possibility of reinstatement of those counts against him, despite the realization that the plea agreement is legally unenforceable. The fallacy in the Petitioner’s reasoning is revealed by the fact that the dismissal of the six counts formed an integral part of the plea agreement and was the basis for the Petitioner’s entry of guilty pleas to the two felon in possession counts. The dismissals and the guilty pleas, while constituting two components of the plea agreement, were not entirely separate considerations. They were inextricably intertwined, and the plea agreement must be viewed as one unified agreement as we examine its validity. If one component collapses, i.e., the ability of the court to legally sentence the Petitioner as contemplated in the plea agreement, then the other countervailing component, i.e., the dismissal, must also collapse. The “bargain” to which the Petitioner agreed is a legal impossibility. He agreed to accept punishment for two felonies, with statutory punishments of up to five years and/or $5,000 fines, in exchange for permanent dismissal of the other six charges against him. The “bargain” become impossible, through mutual mistake regarding statutory realities. Upon that occurrence, this Court cannot condone a resolution, as requested by the Petitioner, which would permit him to retain the benefit of his bargain by having six counts dismissed while serving no sentence for the crimes to which he desired to plead guilty. Where a plea agreement cannot be discharged due to legal impossibility, the entire agreement must be set aside. The Petitioner cannot choose which portions are advantageous to him and implore this Court to apply only those certain portions. There is no equity in that result, no semblance of a bargain, and certainly no public policy which would support such a result. 4
Applying the principles enumerated by this Court, as well as other jurisdictions, we find that the lower court correctly resolved this unfortunate predicament by holding that a plea agreement which cannot be fulfilled based upon legal impossibility must be vacated in its entirety, and the parties must be placed, as nearly as possible, in the positions they occupied prior to the entry of the plea agreement.
See Ohio v. Johnson,
For the reasons which gave rise to this appeal, the prosecution of the misdemeanor counts, originally charged as felonies, relating to or alleging that the defendant was a felon in possession of a firearm may not proceed. We deny the Petitioner’s requested writ of prohibition and permit the proseeu *375 tion to proceed on the six felonies for which the indictment was returned.
Writ denied.
Notes
. The eight counts included wanton endangerment involving a firearm on August 21, 1999; wanton endangerment involving a firearm on November 21, 1999; felon in possession of a firearm on August 21, 1999; felon in possession of a firearm on November 21, 1999; burglary on August 21, 1999; burglary on November 21, 1999; attempted robbery on August 21, 1999; and attempted robbery on November 21, 1999.
. By so doing, the lower court merely placed the parties in the positions occupied prior to the plea, absent the two invalidated counts which could no longer be prosecuted as misdemeanors due to the one-year limitation on the prosecution of a misdemeanor. See W. Va.Code § 61-11-9 (1923) (Repl.Vol.2000).
.
See also Sinn
v.
State,
. Courts reviewing analogous predicaments have concluded that no sound public policy supports granting defendants "a right to benefit from illegal sentences.”
People v. District Court,
