The plaintiff in error was charged with unlawfully having in his possession the green skins of muskrat and mink as prohibited by sec. 29.41, Stats. The penalty for such offense so charged is provided for by sub. (1) (d), sec. 29.63, Stats., by a fine of not less than $50 nor more than $100, or by imprisonment in the county jail not less than thirty days nor more than six months, or by both such fine and imprisonment. His sentence was eighteen months in the state prison. The lower branch of the municipal court of Langlade county, before which the plaintiff in error was first brought, having the jurisdiction of a justice of the peace, could hear, try, and determine the offense so charged and impose such a sentence. Sub. (5), sec. 4739, Stats. For an offense punishable to the extent of a term in the state prison such lower branch had but jurisdiction to bind over to the upper branch, which had jurisdiction of such offense and to inflict such a penalty as here -given.
The plaintiff in error alleges, in substance, first, that the proceedings in the lower branch of the municipal court on the first day where plaintiff in error, was charged with and pleaded guilty to a violation of sec. 29.41, Stats., placed him in jeopardy as to such offense and the facts thereof, and the proceedings in the upper branch of the same court were in violation of his constitutional right against second jeopardy; second, that in any event the sentence as. pronounced was in excess of that warranted by law and, to the extent of such excess at least, void.
*62The plaintiff in error is right in both contentions. The lower branch of the municipal court having, like a justice of the peace, a dual jurisdiction, one to bind over to an upper court an offender charged with, or whom the evidence on a preliminary hearing showed probable cause to believe had committed, an offense beyond such lower court’s jurisdiction to try, and also a jurisdiction to try and determine>cases involving such an offense as the one here charged and with such penalty, it undertook to exercise the latter form of jurisdiction and accepted defendant’s plea of guilty in lieu of a trial. By sec. 4749, Stats., it is expressly .made the duty of -such court to thereupon adjudge a defendant guilty of such an offense upon his plea of guilty. It contemplates no delay, between plea and sentence. His plea of guilty, accepted as it- was by the court, was a waiver of any trial and then and there subjected defendant forthwith to the statutory penalty. The exercise of the jurisdiction to try him for such an offense had then become a finality, and it could not be, either on motion by the prosecution or by the court on its own motion, wiped out and the,other jurisdiction to bind over be substituted, as would be the effect if the adopted procedure be sanctioned. The state in effect elected to have a trial as to the charged offense and the court assumed to try and determine for such offense, and such election and choice are binding, and the magistrate, having fully exercised the one jurisdiction, must forego the other. The defendant, under the record, certainly said or did nothing that could be treated as a consent to such subsequent proceedings or as a waiver of his constitutional rights.
By his plea of guilty to the complaint the person so charged stands as to the facts and the offense charged the same as though a verdict of guilty had beep rendered by a jury. Ex parte Brown, 68 Cal. 176, 8 Pac. 829. At such a stage he has passed the point at which jeopardy first attaches. State v. B-, 173 Wis. 608, 617, 182 N. W. 474. Having thus been once in jeopardy, the attempted *63proceedings in the upper branch, whereby what would in effect be a new sentence and a much greater penalty attempted to be given for the same offense and facts, violated his rights secured by sec. 8, art. I, Const., “and no person for. the same offense shall be put twice in jeopardy of punishment.” State v. Blevins, 134 Ala. 213, 32 South. 637; 16 Corp. Jur. 236; Boswell v. State, 111 Ind. 47, 11 N. E. 788.
The fact that he interposed no plea as to former jeopardy when brought before the upper branch of such court, as would have been the better and usual practice, cannot deprive him of his right to rely upon it here, where it is so clearly a matter of record. It is in these identical proceedings, and no issue of fact could have been raised nor resort had to the record of any other court or to any other proceeding. See authorities cited in note to L. R. A. 1917A, 1234.
It is claimed by the state that the proceedings in the lower branch amounted to but a preliminary hearing, at the conclusion of which that court might properly bind over to the higher court. But the plea of guilty to the offense as charged did away with the necessity of any preliminary hearing or any hearing whatsoever. And furthermore, the offense being one for which the court had jurisdiction not only to issue the warrant and bring the charged person before him but had also jurisdiction to try and sentence, there is no purpose in having, and no right given to the person so charged to insist upon, a preliminary examination before trial. State v. Solomon, 158 Wis. 146, 150, 147 N. W. 640, 148 N. W. 1095. The holding in this latter, case on this point is in nowise affected by what is said in Watke v. State, 166 Wis. 41, 44, 163 N. W. 258.
That the mistake that occurred in these proceedings was one of law and as to the powers and duties of the magistrate and that the result thereof will result in the person charged going without sentence or punishment whatsoever, *64does not alter his rights or change his position. It was • so held where, during a trial upon a plea of not guilty, the court discharged the jury without defendant’s consent, believing that the proceedings were being brought under a mistake as to which one of certain statutes controlled, nevertheless jeopardy had attached and could be successfully asserted. Mitchell v. State, 42 Ohio St. 383, 398.
The attempt by the lower branch tO' bind over the defendant to the upper branch of the court on the second day after the plea of guilty had been entered and accepted amounted in effect to the setting aside of such plea of guilty and the judgment that was consequent thereon, even though such an effect was not intended. That which in effect discharges a defendant in a criminal proceeding may be successfully pleaded in bar to.a second attack for the same offense, no matter how irregular the first proceeding may be (16 Corp. Jur. 255) ; or even if it be an acquittal under an erroneous direction of the court to that effect. 16 Corp. Jur. 256.
That the proceedings in the upper branch were for the same substantive offense as that originally charged in the complaint is beyond question. The record quoted supra shows that on its face. The substantial increase in the penalty fixed by the sentence over that fixed by the statute for the offense as charged and based upon the claim of previous conviction for some other offense, was matter that affected the penalty only and was not a part of the substantive offense. State v. Jacobs, 167 Wis. 299, 302, 166 N. W. 324; Dahlgren v. State, 163 Wis. 141, 143, 157 N. W. 531; Howard v. State, 139 Wis. 529, 532, 121 N. W. 133.
The defendant therefore having been once placed in jeopardy before the lower branch of the municipal court, the proceedings in the upper branch upon which sentence was pronounced placed him in jeopardy a second time for the same offense.
*65Upon this state of the record the defendant is now entitled to his discharge.
On the second proposition presented, defendant’s sentence to eighteen months in the state prison is claimed by the state to be warranted by virtue of sec. 4738, Stats., providing that where a person is convicted of an offense such as was here charged and so punishable, if it be alleged, proved, or admitted on the trial or ascertained after conviction that there has been a prior imprisonment, sentence wherefor remains of record and unreversed, the prescribed penalty in the then pending case may be increased. Prior to 1919 it was necessary that such prior conviction should be alleged by pleading before trial. Alsheimer v. State, 165 Wis. 646, 648, 163 N. W. 255. By ch. 35 of that year the provision was added, “or ascertained by the court after conviction.” By the same chapter sec. 4738a, Stats., was created, which, so far as material here, is as follows:
“If such former conviction shall not have been charged in the information, indictment or complaint, then, after a plea of guilty is entered, or- a verdict of guilty returned by the jury, and before sentence is passed, the court may ascertain in every case whether the defendant has been previously convicted of any offense in any court. . . . After such investigation the district attorney may in writing charge the defendant with such former conviction, and if the defendant denies such charge, the court shall proceed promptly to try the issue thereby formed, and, if demanded by the defendant, shall impanel a jury therefor.”
Even were the defendant properly bound over to the upper branch of the municipal court, still upon the record as here presented the sentence to the state prison was an excessive one and unwarranted because the plain provisions of such amended statute were not followed. Nothing appears in the record until after judgment indicating that defendant was in anywise notified, that reliance would be placed upon any prior convictions in order to increase the *66penalty over that-prescribed by sub. (1) (d), sec. 29.63, Stats., supra; much less did it show that he in any manner admitted such fact or the facts recited by the court or that testimony was taken as to such conviction or any such allegations. The positive recital in the record that he pleaded guilty to the crime charged in the information is a negative recital of his pleading to anything more or else. The entire record proper of the proceedings is silent as to any notice to him of the intention to rely upon a prior conviction, if any such there was, or of anything in the nature of a waiver on his part of the right to be so notified and to join issue with any such allegations and to have a trial by jury thereon.
Being bound as we are, and as the state should be, by the certified record sent to us of these proceedings, there is an entire absence in such record of any legal authority for the court sending the defendant to the state prison. For this reason also the judgment must be reversed. It is also our duty to direct his discharge. State v. Moon, 41 Wis. 684, 687.
By the Court. — Judgment reversed, with directions to discharge the defendant.