
316 S.E.2d 439 (1984)
VIRGINIA DEPARTMENT OF CORRECTIONS, et al.
v.
Daniel Curry CROWLEY.
VIRGINIA DEPARTMENT OF CORRECTIONS, et al.
v.
David Steeves TAYLOR.
VIRGINIA DEPARTMENT OF CORRECTIONS, et al.
v.
Larry Noel SHERMAN.
Record Nos. 820084-820086.
Supreme Court of Virginia.
April 27, 1984.
*440 James E. Kulp, Sr. Asst. Atty. Gen., Jerry P. Slonaker, Asst. Atty. Gen. (Gerald L. Baliles, Atty. Gen., on brief), for appellant.
Robert G. Cabell, Jr., Richmond (C. Michael DeCamps, Cabell, Paris, Lowenstein & Bareford, Richmond, on brief), for appellee Crowley.
Ralph B. Robertson, Richmond, for appellee Taylor.
Edward L. Hogshire, Charlotteville (Bailes, Buck, Hogshire & Gouldman, Ltd., Charlotteville, on brief), for appellee Sherman.
Present: All the Justices.
*441 POFF, Justice.
As posited by appellants Commonwealth of Virginia and Department of Corrections (collectively, the Commonwealth), the question common to three cases consolidated for appeal is: "Should an order entered by a circuit court after its jurisdiction has been extinguished be vacated and set aside?"
Appellees Daniel Curry Crowley, David Steeves Taylor, and Larry Noel Sherman were three of five defendants convicted on guilty pleas (entered in separate trials) of felonies involving possession of LSD and possession of 13,402 pounds of marijuana with intent to distribute. In each case, the defendant filed a motion to modify or suspend the penalty imposed and the judgment entered against him. In separate orders, each endorsed "Seen" by the Commonwealth's Attorney, the trial judge noted that the defendants had not yet been transferred from the county jail to the penitentiary, declared that he was not prepared to rule, and took the motions under advisement. All five orders were entered before expiration of the 21-day period prescribed in Rule 1:1.
Following expiration of that period and after the five felons had been transferred to the penal system and had served a portion of their sentences, Crowley, Taylor, and Sherman moved the trial court to rule upon their previous motions. The trial judge granted the several motions and entered orders releasing the appellees from custody, suspending the remainder of the terms imposed, and placing each on probation under the supervision of the Parole Board. The Commonwealth's Attorney endorsed each release order "Seen and Agreed to". The trial judge took no action on the motions filed by the other two felons, Douglas Bogue and William Syfrett.
At this point, the Department of Corrections filed a petition in this Court seeking a writ of prohibition to prohibit enforcement of the orders releasing Crowley, Taylor, and Sherman and to prohibit the trial court from entering such orders respecting Bogue and Syfrett. All five defendants intervened and filed briefs amicus curiae and motions to dismiss. Bogue and Syfrett argued that the orders taking their motions under advisement had tolled the 21-day limitation in Rule 1:1; that the sentencing orders remained interlocutory; and that in such case Code § 53-272 (now §§ 53.1-151, -186) should be construed to permit a trial court to retain jurisdiction over the sentence even after the defendant has been transferred to the penitentiary. Rejecting the tolling argument and construing the rule and statute together, we said:
Code § 53-272 authorizes the trial court, where a defendant convicted of a felony has been sentenced but not actually committed and delivered to the penitentiary, to suspend or modify the unserved portion of his sentence, or place the defendant on probation. Thus, reading Rule 1:1 and Code § 53-272 together, we conclude that after the expiration of 21 days from the sentencing order if the prisoner has been committed and delivered to the penitentiary and no order had been entered within 21 days after final judgment suspending the sentence, the trial court has no further authority to suspend the sentence.
In Re: Dept. of Corrections, 222 Va. 454, 463, 281 S.E.2d 857, 862 (1981) (hereinafter cited "Corrections" or referenced "the prohibition proceeding").
Based upon this holding, we awarded the Department a writ prohibiting the trial court from suspending the sentences of Bogue and Syfrett. With reference to the other three defendants, we held that the writ could not be used to prohibit enforcement of the release and suspension orders.
We can not pass upon the validity of the orders under which Sherman, Crowley and Taylor were released from custody. The Attorney General has misconstrued the function of the writ of prohibition, which is not available to undo errors that may have been committed in ordering the release of these defendants....
....
... In each case, the release is an accomplished fact; thus, the time for challenging *442 such releases in a petition for a writ of prohibition has passed. So long as these defendants continue to comply with the terms of their probation, the orders of the trial court are final and conclusive. The only portions of the release orders that remain executory are the requirements for continuing supervisory probation.... [T]he effect of prohibiting enforcement of the unexecuted provisions would be to leave the defendants free from the constraints of probation, a result that unquestionably would be contrary to the public interest.
Corrections at 461, 281 S.E.2d at 861.
Four days after the date of our opinion in that case, the Commonwealth filed motions in the trial court to vacate the orders releasing Crowley, Taylor, and Sherman from custody. Citing "reasons stated in defendant's pleading, and the decision of the Supreme Court of Virginia in the recent case", the trial court entered orders in all three cases dismissing the motion to vacate.
One of the "reasons stated in defendant's pleading" and restated on appeal was that the Commonwealth's motions were time-barred under Rule 1:1.[1] The appellees overlook the fact that we have expressly held that "this rule is not a limitation on the power and authority of the court to vacate a void order." Cofer v. Cofer, 205 Va. 834, 837, 140 S.E.2d 663, 665-66 (1965). We reaffirmed that holding in an appeal from an order refusing to vacate a void order in Matthews v. Commonwealth, 216 Va. 358, 359, 218 S.E.2d 538, 540 (1975). This brings us to the crucial question whether the orders releasing the appellees and suspending their sentences were void.
Those orders were not entered until after the 21-day limitation fixed in Rule 1:1 had expired and the prisoners had been transferred to the penitentiary. And "by taking the motions to set aside [the judgments] under advisement the trial court did not `modify, vacate, or suspend' the judgments" so as to toll the period of limitation. Corrections at 464, 281 S.E.2d at 863. "As no order modifying, vacating, or suspending the [judgment] order was entered within the prescribed period of 21 days, the court lost jurisdiction over the action upon the expiration of that time." Prohm v. Anderson, 220 Va. 74, 77, 255 S.E.2d 491, 493 (1979). Applying these principles in our opinion in the prohibition proceeding, we held that "the trial court ha[d] no further authority to suspend the sentence." Corrections at 463, 281 S.E.2d at 862.
The appellees insist that this holding applied only to Bogue and Syfrett and not to them, that the orders entered in their cases were declared to be "final and conclusive", and, consequently, that the question whether their orders were valid or void is foreclosed by "the basic precepts of res judicata, collateral estoppel and stare decisis". We disagree.
The appellees argued at bar that if the Attorney General wanted to relitigate the jurisdictional issue in their cases, he could have and should have done so by petitioning this Court for a writ of mandamus. That argument tacitly recognizes that our opinion in the prohibition proceeding was not a final adjudication of the validity of the release orders. The import and effect of our holding that those orders were "final and conclusive" must be understood in the context in which it was rendered. As we said, "[w]e can not pass upon the validity of the orders" because "[t]he Attorney General has misconstrued the function of the writ of prohibition, which is not available to undo errors that may have been committed in ordering the release of these defendants." Corrections at 461, 281 S.E.2d at 861. Thus, we restricted the basis of our holding to the procedural error committed by the Attorney General. Since we specifically refrained from making a merits determination as to the validity of *443 the release orders, the jurisdictional issue remained an open question.
The Attorney General promptly submitted that question for a merits determination to the trial court. He did so by filing a motion to vacate the release orders on the ground they were void for want of jurisdiction.[2] Since that procedure was an "adequate legal remedy", a writ of mandamus could not issue. Board of Supervisors v. Combs, 160 Va. 487, 498, 169 S.E. 589, 593 (1933). Want of subject-matter jurisdiction may be raised by motion. Thacker v. Hubard, 122 Va. 379, 386, 94 S.E. 929, 930 (1918); accord Nolde Bros. v. Chalkley, 184 Va. 553, 561, 35 S.E.2d 827, 830 (1945), aff'd on other grounds sub nom. Feitig v. Chalkley, 185 Va. 96, 38 S.E.2d 73 (1946). Proceeding by motion is also a proper way to challenge jurisdiction over the person, even when the motion is made in a different case pending before a different court, and "[i]t is immaterial that the order was not attacked by direct appeal or by a bill in equity." Slaughter v. Commonwealth, 222 Va. 787, 793, 284 S.E.2d 824, 827 (1981).
In the orders underlying these appeals, the trial court dismissed the Commonwealth's motions on the ground "the Court finds the Motion to Vacate to be without merit". Now, for the first time, the jurisdictional question adjudicated in those orders is procedurally ripe for appellate review on the merits. And, contrary to the appellees' contention, the doctrines of res judicata, collateral estoppel, and stare decisis do not foreclose that review, because our decision in the prohibition proceeding, based as it was solely on the Attorney General's procedural mistake, was not a merits determination.
Yet, the appellees argue that, for two reasons, these appeals are not properly before us. They say that the Attorney General "acted ultra vires" in filing the motions to vacate because Code § 2.1-124 provides that "[u]nless specifically requested by the Governor so to do, the Attorney General shall have no authority to institute or conduct criminal prosecutions in the circuit courts of the State except in cases [not relevant here]." And they contend that these appeals offend Article VI, § 1, of the Virginia Constitution and the double jeopardy clause of the Fifth Amendment of the Constitution of the United States.
Both arguments rest upon the theory that the proceeding instituted by the motion to vacate was merely another stage in the course of a continuing criminal prosecution. We reject that theory. Although a petition for rehearing filed by the Commonwealth in a criminal case reviewed by this Court involves "the life or liberty of a person", it does not constitute an "appeal" within the intendment of Va. Const. art. VI, § 1.[3]Burgess v. Commonwealth, 136 Va. 697, 704, 118 S.E. 273, 275 (1923). Nor does the constitutional constraint prohibit an appeal by the Commonwealth from a habeas corpus judgment, for "habeas corpus is a civil and not a criminal proceeding" and "in no sense a continuation of the criminal prosecution." Smyth v. Godwin, 188 Va. 753, 760, 51 S.E.2d 230, 233, cert. denied, 337 U.S. 946, 69 S.Ct. 1503, 93 L.Ed. 1748 (1949) (citing Ex parte Tom Tong, 108 U.S. 556, 559-60, 2 S.Ct. 871, 872-73, 27 L.Ed. 826 (1883)).
A petition for habeas corpus and an appeal from a judgment granting the writ both test the legality of the incarceration rather than the guilt or innocence of the prisoner. See Lacey v. Palmer, 93 Va. 159, 163, 24 S.E. 930, 931 (1896). The same is true of the motions to vacate filed in these cases and the appeals from the judgments dismissing those motions. We are of opinion that the proceedings conducted *444 on the motions to vacate were civil in nature, and we hold that Code § 2.1-124 and the constitutional provisions upon which the appellees rely are inapplicable, and that these appeals are properly before this Court.[4]
Finally, we consider a question raised in Taylor's case. Taylor's counsel of record in the criminal prosecution and in the prohibition proceeding before this Court appeared pro bono publico in the proceeding on the motion to vacate and on this appeal. Counsel moved in the trial court to dismiss the motion to vacate and asks us to affirm the judgment from which this appeal was taken on the ground that Taylor was not properly served with process.
Counsel acknowledges that the Commonwealth mailed a copy of the motion to his law office, and he does not contend that process was defective because the motion was not served on Taylor in person. See Code § 8.01-314. See generally Annot., 78 A.L.R. 370 (1932). Rather, he argues only that the attempt to serve Taylor through counsel of record failed because he was not then counsel of record. He reasons that the prohibition proceeding "ended when the Supreme Court of Virginia denied the writ of prohibition" and he "was not retained by Taylor nor appointed by the court to represent Taylor on these subsequent proceedings."
Departing from the argument urged by the other appellees, counsel says that "[t]he motion to vacate ... was a new and separate proceeding, distinct from the original criminal case against Taylor", and we have so held. However, the prohibition proceeding and the proceeding on the motion to vacate were continuing stages in the proceeding initiated when Taylor moved the trial court to enter the order releasing him from the penitentiary. Counsel at bar was Taylor's counsel of record when he made that motion. The Commonwealth's motion to vacate was filed four days after our opinion in the prohibition proceeding and before the 10-day period prescribed in Rule 5:53(a)[5] had expired. Because counsel has never withdrawn "by leave of court after notice to the client", Rule 1:5, he remained counsel of record throughout every stage of the proceeding initiated by Taylor. Accordingly, we reject the argument counsel advances.
Applying the rationale addressed to the cases of Bogue and Syfrett in the prohibition opinion, we hold that, because the orders releasing the appellees and suspending their sentences were entered after the 21-day limitation in Rule 1:1 had expired and the appellees had been transferred to the penitentiary, those orders were void for lack of jurisdiction and the trial court erred in dismissing the motions to vacate. Hence, we will reverse the several judgments and enter a final judgment in each case vacating the void order. If, upon entry of our mandates, the Attorney General, acting as attorney for the Commonwealth, for the Department of Corrections, and for the warden of the institution in which the appellees were incarcerated, so elects, he may initiate the process required to return the appellees to custody to serve the sentences originally imposed. See State ex rel. v. Adams, 145 W.Va. 354, 115 S.E.2d 158 (1960), cert. denied, 366 U.S. 933, 81 S.Ct. 1652, 6 L.Ed.2d 392 (1961); Kirk v. Best, 123 Colo. 127, 225 P.2d 850 (1950).
Reversed and final judgments.
NOTES
[1]  Rule 1:1 provides, in part, that "[a]ll final judgments, orders, and decrees, irrespective of terms of court, shall remain under the control of the trial court and subject to be modified, vacated, or suspended for twenty-one days after the date of entry, and no longer."
[2]  The fact that the Commonwealth's Attorney had consented to the release orders did not confer jurisdiction upon the trial court to enter them, nor did his consent estop the Attorney General from filing the motions to vacate. Corrections at 465, 281 S.E.2d at 863.
[3]  This section provides in pertinent part that "[n]o appeal shall be allowed to the Commonwealth in a case involving the life or liberty of a person, except ... in any case involving ... the State revenue."
[4]  Crowley argues that "the Virginia Department of Corrections is not a proper party ... and should be dismissed from the proceedings." We considered and rejected that argument in the prohibition proceeding, and we reaffirm what we said in our opinion, Corrections at 466, 281 S.E.2d at 864.
[5]  This section of the Rule provides:

A party intending to apply for a rehearing shall file written notice with the clerk of this Court within ten days after the date of the order of this Court deciding the case. If such notice is given, the clerk of this Court shall withhold certification of the mandate until time for filing the petition for rehearing has expired and, if the petition is filed, until it is disposed of.
