delivered the opinion of the court.
The accused, Leon Seay, was tried in the Circuit Court of Essex county upon an indictment containing two counts. Only the first count is herein involved and it reads as follows:
“The grand jury of the Commonwealth of Virginia, in and for county of Essex, upon their oaths present that R. L. Wright, in the county of Hanover and in the circuit court of said county, on the 27th day of September, 1926, was convicted of unlawful transportation of ardent spirits; that afterwards, to-wit, on the 9th day of December, 1926, in the city of Richmond, Virginia, and in the Hustings Court of said city, the said R. L. Wright was convicted for this, to-wit, that in the said city of Richmond, on the *10917th day of October, 1926, the said R. L. Wright did unlawfully and feloniously sell, offer, keep, store and expose for sale, transport, dispense, solicit, advertise and receive orders for ardent spirits, and that afterwards, to-wit, on the 3rd day of November, 1928, in the county of Essex, Virginia, the said R. L. Wright did unlawfully and feloniously transport ardent spirits, and the grand jury aforesaid on their oaths aforesaid do further present that Leon Seay on the 22nd day of November, 1920, in the county of Halifax, Virginia, and in the circuit court of that county, was convicted of a violation of the prohibition laws of the State of Virginia, and at another time, afterwards, to-wit, on the 21st day of April, 1927, the said Leon Seay, in the county of Charles City, and the circuit court of that county, was convicted of a violation of the prohibition laws of the State of Virginia, and that afterwards, to-wit, on the 3rd day of November, 1928, one R. L. Wright, in the county of Essex, Virginia, did unlawfully and feloniously transport ardent spirits as aforesaid, and the said Leon Seay, then and there being present, did aid, assist, advise and counsel the said R. L. Wright in the unlawful and felonious transportation of ardent spirits against the peace and dignity of the Commonwealth of Virginia.”
Seay was convicted by the jury and sentenced by the court, in accordance with the verdict, to serve a term of six months in jail and to pay a fine of $500.00. The case is before us on a writ of error to that judgment.
The record discloses that on the night of November 3, 1928, State prohibition officers arrested R. L. Wright on the charge of transporting ardent spirits and at the same time arrested the accused. Two warrants were issued by a justice of the peace against Seay, one charging him with interfering with prohibition officers in the discharge of their duty and the other with aiding and abetting Wright in the unlawful transportation of ardent spirits. On the *109216th day of November he was tried and convicted on the warrant charging him with obstructing justice, and a fine of $25.00 was imposed. On the charge of aiding and abetting he was sent on to the grand jury.
Seay immediately appealed his conviction and was bailed to appear before the circuit court on the 17th day of December. On that day Seay paid to the trial magistrate, in the presence of the clerk of the court, the fine and costs assessed against him and the warrant was dismissed by the magistrate. On the same day the indictment in issue was returned by the grand jury. Upon the call of the case for trial in the circuit court Seay filed a demurrer to the indictment, which demurrer the court overruled, and then Seay filed a plea in which he alleged in substance that he had been arrested on two warrants charging different crimes growing out of the same transaction; that he had been tried and convicted for the offense of impeding officers, had paid the fine and costs assessed and that the warrant had been dismissed; that the acts set forth in the indictment constitute one and the same offense and that a trial upon the indictment would be violative of section 4775 of the Code 1919, as amended by Acts 1920, chapter 118, which provides: “If the same act be a violation of two or more statutes or of two or more municipal ordinances conviction under one of such acts or ordinances shall be a bar to a prosecution or proceeding under the other or others.
The Commonwealth demurred to the plea, which demurrer the court sustained, and thereupon the accused entered a plea of not guilty.
The first assignment of error challenges the action of the court in sustaining the demurrer of the Commonwealth to the plea of former conviction.
Section 4987 of the Code confers upon the justices of the peace concurrent jurisdiction with the circuit courts *1093of the counties in all misdemeanor cases occurring within their jurisdiction. A defendant who has been convicted upon a warrant tried by a justice of the peace has the right of appeal to the circuit court pursuant to the provision of section 4989, provided the appeal is applied for at any time within ten days from such conviction. When the right of appeal is exercised at the time of the judgment, as was done in the case at bar, the defendant is entitled to bail. It then becomes the mandatory duty of the justice of the peace to forthwith return and file the warrant and all other papers with the clerk of the court having appellate jurisdiction of the case.
The main contention of the accused is that until the appeal is placed upon the court docket by the clerk thereof the trial justice has absolute dominion over the proceedings and may with the satisfaction of the judgment by the accused dismiss the same. This contention is not well founded. Under our system of criminal jurisprudence a justice of the peace is clothed with such powers only as are conferred upon him by statute. There is no statutory provision providing for a new trial to be had before a justice of the peace in a criminal case, nor is there any warrant of law authorizing him to hold in abeyance the judgment of conviction. When judgment of conviction has been pronounced the only prerogative a justice of the peace can lawfully exercise is to admit the accused to bail, if applied for immediately, or grant bail if subsequently applied for within ten days, or carry into execution the judgment. A magistrate’s court is not a court of record, hence the mandatory provision of the statute that all papers shall be forthwith returned and filed with the clerk of the court vested with concurrent jurisdiction. When this act has been performed by the justice of the peace his jurisdiction is at an end and any further act committed in connection with the judgment is ultra vires and void. Ex parte Hazel *1094Smith, 124 Va. 791, 98 S. E. 10. The appeal is then perfected, and it is the duty of the clerk, pursuant to section 6244, to docket the case.
We will now consider the contention that the right of appeal is a personal one and that the accused could satisfy the judgment and dismiss the appeal afterwards, even though the same had been perfected in the magistrate’s court. Our conclusion is that he had no such right. When one convicted of a criminal offense by a justice of the peace elects to appeal from the judgment, then ipso facto jurisdiction is conferred upon the court appealed to, and the Commonwealth is then as much a party to the transaction as it was in the proceedings before the justice of the peace, and the court—not the accused—is vested with the power of dismissal. Having acquired jurisdiction by the election of the accused to exercise his right of appeal, the case is on the docket of the court and is to be tried de novo.
In State v. Brewer, 98 N. C. 607, 615, 3 S. E. 819, 820, defendants asked leave to withdraw their appeal, which motion was opposed by the Attorney-General. The court held that accused could not withdraw their appeal as a matter of right, saying:
“The appellants having brought their appeal to this court, the latter has jurisdiction thereof for all proper purposes, and may, in the exercise of a sound discretion, grant or refuse their motion. The court will ordinarily, with the assent of the Attorney-General, grant such a motion, but it will not when he opposes it, unless just and reasonable cause be shown why it should be allowed.”
In 17 C. J. 191, the rule is thus stated:
' “In some jurisdictions the view is taken that the right of appeal is a personal one, and that defendant in a criminal case may waive the same and dismiss the appeal. However, the rule in most jurisdictions seems to be that defendant is not entitled to withdraw the appeal as a matter of right, *1095and that the question of withdrawal is largely within the discretion of the court, except perhaps in cases where the consent of the adverse party is obtained.”
There is no merit in the first assignment of error. The second assignment of error involves the action of the court in overruling the demurrer to the indictment. The grounds relied upon are as follows:
“(1) That the indictment charges Leon Seay with an offense that constitutes a felony, when, as a matter of law, the offense as charged is merely a misdemeanor, in this, to-wit, because the former convictions alleged against Leon Seay were for offenses which would not constitute a felony even though he might be found guilty of aiding and abetting in the transportation of ardent spirits in Essex county, Virginia, on the said day of November 3, 1928.”
“(2) Because the indictment attempts to charge Leon Seay with an offense that constitutes a felony by virtue of the citation and averment of former convictions of Roland Wright, when, as a matter of law, Leon Seay could only be found guilty of aiding and abetting Roland Wright in the transportation of ardent spirits, which offense is not in itself a felony, for Leon Seay cannot be punished for the former convictions of Roland Wright as they are no part of the offense committed by Leon Seay, whereupon the accused tendered a special plea of former jeopardy.”
The third assignment of error calls in question the action of the court in giving, on the motion of the Commonwealth, the following instruction:
“That if they believe beyond a reasonable doubt that R. L. Wright was on the 27th day of September, 1926, in the Circuit Court of the county of Hanover, Virginia, convicted of- the unlawful transportation of ardent spirits, and that Leon Seay in the county of Essex, Virginia, did aid, assist, advise and counsel the said R. L. Wright in the transportation of ardent spirits, they shall find the said *1096Leon Seay guilty as charged in the first count of the indictment and fix his punishment at confinement in the penitentiary at not less than one year and not more than five years, or in your discretion by a fine not exceeding five hundred dollars and by confinement in jail not less than six months nor more than twelve months.”
The assignments of error above stated involve the same question of law and will be considered together. The indictment charges the accused with the commission of a felony and the instructions empower the jury to fix the punishment by confinement in the penitentiary, which can only be done in the case of a felony. The theory of the Commonwealth is based upon the general principle of law that a person aiding and abetting in the commission of a crime is guilty of the same offense as the principal. It is conceded that the averments in the indictment of former convictions of the accused are not averments of such offenses as would make a subsequent offense of a similar nature a felony. The issue then resolves itself into this question: Can Seay be convicted of a felony based upon an infraction of the prohibition law by alleging and proving that Wright, the principal, has been guilty of prior and present violations of the prohibition law? While it is true that the general rule is that an accessory is amenable to the same punishment as the principal, the general rule is not applicable to the case at bar. In derogation of the general rule, section 4675 (4), Code 1924, fixes the status of an aider or abettor and provides that the punishment shall be the same as if the defendant were solely guilty of such violation.
In the construction of a statute the chief concern of the court is to ascertain the intention of the lawmaking body. For the sake of brevity we omit setting forth the statute in full. Sections 4675 (4) to sections 4675 (6), as amended by Acts 1926, chapter 231, designate *1097the offense punishable, the degree thereof, and fixes the punishment to be imposed. Our construction of section 4675 (4), 4675 (5) and 4675 (6) is that it was the intention of the legislature, in the enactment of these sections, to prevent a repetition of violations of the prohibition law by the same person by imposing increased penalties upon him for a subsequent conviction. It is inconceivable that the legislature intended to 'mete out the same punishment to one guilty in fact of only a misdemeanor as is meted out to an habitual violator of the prohibition law. Had Seay been convicted as principal, this being his first offense under the transportation provision of the statute, he would have been only guilty of a misdemeanor, and the proof of the prior convictions averred in the indictment would have accentuated merely the degree of punishment and would not have raised the grade of the offense from a misdemeanor to a felony.
In Keeney v. Commonwealth, 147 Va. 685, 137 S. E. 478, 481, Judge Chichester said: “The allegation of a prior conviction under the prohibition statute is no part of the offense charged, but it is the averment of a fact which, if proven, increases the penalty.”
On the other hand, if the contention of the Commonwealth is sound, by aiding and abetting Wright, the principal (conceding Wright to be guilty of a second offense), Seay is transformed from a misdemeanant into a felon and amenable to a punishment of five years in the penitentiary.
Statutes imposing increased punishment on habitual violators have been in existence in England and in this State for many years. In Rand’s Case, 9 Gratt. (50 Va.) 739, decided in 1852, Judge Daniel traces the history, of such legislation, which it is unnecessary, here to repeat. In our investigation we have found no case where one who is merely guilty of a misdemeanor has had imposed upon him as an aider or abettor the same punishment as is imposed on one who is guilty of a subsequent offense.
*1098In Underhill’s Criminal Evidence (3d ed.), section 770, the rule is thus stated: “In England and in very many of the States of the American Union, from the earliest times, statutory enactments have existed by virtue of which a severer punishment has been inflicted upon the accused, if the crime of which he is convicted is a second, a third, or a subsequent offense. These statutes, it will be observed, are highly penal in their character, and their application ought not to be extended to cases which do not, by the strictest rules of construction, come under their provisions. It is clear that they were intended by the legislature to prevent the repetition of crime by the same persons by imposing increased penalties upon old offenders, and inflicting a severer punishment upon the repetition of certain crimes.”
Our conclusions are that the demurrer to the indictment should have been sustained, with leave to the Commonwealth to amend, and that it was error to give to the jury instruction No. 1.
For the reasons stated, the judgment of the trial court must be reversed and the case remanded to the circuit court for a new trial, if the Commonwealth be so advised.
Reversed and remanded.