
274 S.W.2d 769 (1955)
Frank SWITZER, Petitioner,
v.
John M. GOLDEN, Circuit Judge of the 10th Judicial Circuit of Arkansas, Respondent.
No. 4792.
Supreme Court of Arkansas.
January 31, 1955.
Paul K. Roberts, Warren, Terral & Rawlings, Little Rock, for appellant.
Tom Gentry, Atty. Gen, Thorp Thomas, Asst. Atty. Gen, for appellee.
ROBINSON, Justice.
This case is here on certiorari. On the 5th of February, 1954, the prosecuting attorney filed an information in the Ashley Circuit Court charging petitioner herein with the offense of selling intoxicating liquor in dry territory, committed as follows, to wit: "The said defendant on the 3rd day of February, 1954, in Ashley County, Arkansas, did unlawfully sell one pint of Early Times Whiskey to E. B. Booth in Ashley County, Arkansas, which is a dry county, and against the peace and dignity of the State of Arkansas." The record shows that on March 18 defendant "entered his plea of guilty of selling intoxicating liquor in dry territory for 3rd offense", and was placed on probation for a period of five years. The record further shows that on September 18 probation was revoked and the defendant sentenced to serve five years in the state penitentiary. On September 30 motion for new trial and amendment to the motion for new trial were filed. On October 10 a second amendment was filed. It does not appear that the court acted on the motion for new trial or the amendments thereto. On October 12 petitioner filed in this court a petition for a writ of mandamus to require the trial court to pass on the *770 motion for new trial. At the time of the oral argument on the petition for writ of mandamus, it was understood that the procedure would be treated as a petition for writ of certiorari.
Ark.Stat. § 48-803 prohibits the sale of intoxicating liquor in any dry territory, and further provides that one convicted for violation of the statute for the first offense, shall be "deemed guilty of a misdemeanor and shall be fined not less than one hundred [$100.00] dollars nor more than one thousand [$1,000.00] dollars: for a second conviction, shall be fined not less than two hundred [$200.00] dollars, nor more than two thousand [$2,000.00] dollars; and for any subsequent conviction, shall be guilty of a felony and shall be sentenced to not less than one [1] year nor more than five [5] years in the State Penitentiary."
The defendant is charged with one specific instance of selling liquor in a dry territory. The penalty is a fine of not less than $100 nor more than $1,000. Nothing is said in the information about the defendant having been convicted on other occasions. He was not charged with the third offense. This case is controlled by Robbins v. State, 219 Ark. 376, 242 S.W.2d 640, 643. There it was held that before one could be convicted of the crime of the third offense of selling liquor in a dry territory, which is a felony punishable by confinement in the* penitentiary for not less than one year nor more than five years, it is necessary that the defendant be specifically charged with the third offense.
ArkStat. § 43-2157 provides: "When the proof shows the defendant to be guilty of a higher degree of the offense than is charged in the indictment, the jury shall find him guilty of the degree charged in the indictment."
It is further pointed out in the Robbins case that the defendant waived no right by failing to demur or move for a bill of particulars, and further: "In 25 Am.Jur, Habitual Criminals, Sec. 26, the author says: Tn the absence of controlling statutory provisions to the contrary, and despite some authority to the contrary, the general rule is that in order to subject an accused to the enhanced punishment as a second or subsequent offender or as a habitual criminal, it is necessary to allege in the indictment or information the fact of a prior conviction or convictions.' In 58 A.L.R. 64, the annotator cites numerous decisions of the courts of thirty-six states which support the general rule. See also, Anno.: 82 A.L.R. 366 and 116 A.L.R. 229. We applied the rule in Hettle v. State, 144 Ark. 564, 222 S.W. 1066, and held that an indictment which failed to charge a prior conviction would not sustain a conviction for illegal cohabitation as for a second offense under Ark.Stat. § 41-805."
In the case at bar, as in the Robbins case, the information embraces no charge of a prior conviction nor any other allegation calculated to put the defendant on notice that he was charged with a felony. The only distinction between the case here and the Robbins case is that in the Robbins case the defendant pleaded not guilty and was convicted by a jury, the state being permitted over defendant's objection to prove prior offenses; while here the defendant entered a plea of guilty. In the Robbins case it was held that one could not be convicted of an offense he is not charged with; neither can he plead guilty to such an offense.
The trial court exceeded its jurisdiction in sentencing the defendant to the penitentiary on a plea of guilty to a felony when he was only charged with a misdemeanor. Certiorari is the proper remedy where the court acts in excess of jurisdistion. Reese v. Cannon, 73 Ark. 604, 84 S.W. 793.
"`The writ (of certiorari) is granted in two classes of cases: first, where it is shown that the inferior tribunal has exceeded its jurisdiction; and, second, where it appears that it has proceeded illegally, and no appeal will lie, or that the right has been unavoidably lost.'" Ex parte Goldsmith, 87 Ark. 519, 113 S.W. 799, 800.
*771 The circuit court exceeded its jurisdiction by assessing punishment for a felony when the information only charged the defendant with a misdemeanor. The judgment is therefore quashed. Of course the penalty for the offense defendant is charged with may be invoked, but he should be given credit for the time he served in the penitentiary before he was allowed to make bond.
