The opinion of the court was delivered by
Biles, J.:After Kerry Jenkins was convicted of misdemeanor theft in municipal court for violating a Wichita city ordinance, his conviction was vacated and he was charged with and convicted of felony theft in state district court for the same offense. Jenkins argues double jeopardy attached to the municipal court proceeding, so the State’s felony theft prosecution is barred under the Double Jeopardy Clauses of the Fifth Amendment to tire United States Constitution and § 10 of the Kansas Constitution Bill of Rights, as codified at K.S.A. 21-3108. The State counters that jeopardy did not attach to the municipal court proceeding because the municipal court did not have jurisdiction over felony theft. We hold that the municipal court could vacate Jenkins’ plea, and the State could prosecute him for felony theft. Double jeopardy did not attach. We affirm.
Facts and Procedural Background
On May 1, 2007, Jenkins stole two DVDs, valued at less than $1,000, from a grocery store. Jenkins was charged in municipal court with misdemeanor theft. Wichita City Ordinance 5.42.010 (2005), petit theft, classifies theft of property valued at under $1,000 as a misdemeanor and provides for a potential penalty of 1 year in jail and a fine.
At the time of the crime, K.S.A. 2006 Supp. 21-3701(b)(5) also classified theft of property valued at less than $1,000 as a misdemeanor, but another subsection of the statute provided: “Theft of property of the value of less tiran $1,000 is a severity level 9, nonperson felony if committed by a person who has been convicted of theft two or more times.” (Emphasis added.) K.S.A. 2006 Supp. 21-3701(b)(6); see K.S.A. 21-3701(b)(5), (6) (same). Jenkins had two prior theft convictions.
On May 31, 2007, the district attorney’s office filed felony theft charges in district court against Jenkins for the same theft. But on June 5, 2007—just 5 days after the felony charges were filed— Jenkins pleaded no contest to misdemeanor theft in municipal court.
On June 21, 2007, the city prosecutor moved to vacate the misdemeanor theft conviction. The City argued the municipal court *433lacked jurisdiction to prosecute the misdemeanor theft charge because Jenkins’ crime should have been classified as a felony under K.S.A. 21-3701(b)(6). The city prosecutor cited State v. Elliott, 281 Kan. 583, Syl. ¶ 1, 133 P.3d 1253 (2006), for tire holding that the municipal court lacks jurisdiction over felony crimes. On July 3, 2007, the municipal court granted the City’s motion to vacate.
On July 18, 2007, Jenkins filed a motion to dismiss the felony theft charge in district court, arguing it was a second prosecution for the same crime in violation of the Double Jeopardy Clause of the Fifth and Fourteenth Amendments to the United States Constitution, §10 of the Kansas Constitution Bill of Rights, and K.S.A. 21-3108. The State argued the statutory and constitutional double jeopardy provisions were not violated because the municipal court lacked jurisdiction. The district court agreed with the State.
The district court held that under K.S.A. 21-3701(b)(6), Jenkins’ third theft conviction must be classified as a felony. It held the municipal court conviction was a nullity because the municipal court lacked jurisdiction over felonies and that double jeopardy protections did not bar the felony proceedings in district court. The district court then presided over a bench trial during which Jenkins was convicted for felony theft. Jenkins filed a timely appeal to the Court of Appeals, arguing the municipal court had jurisdiction over the misdemeanor theft prosecution, so the second prosecution violated double jeopardy.
The Court of Appeals held that Elliott was controlling and the municipal court lacked jurisdiction because the theft was classified as a felony under K.S.A. 21-3701(b)(6). State v. Jenkins, No. 100,396,2009 WL 2144059, at *1-2 (Kan. App. 2009) (unpublished opinion). It then held K.S.A. 21-3108(4)(a), the statutory protection against double jeopardy, does not bar a second prosecution when tire court presiding over the first prosecution lacked jurisdiction. 2009 WL 2144059, at *2. Jenkins filed a petition for review with this court, raising the same double jeopardy issue. This court has jurisdiction under K.S.A. 20-3018(b) (review of Court of Appeals decision).
Analysis
The Double Jeopardy Clause of the Fifth Amendment to the *434United States Constitution protects against a second prosecution after conviction for the same offense by the same sovereign. See Heath v. Alabama, 474 U.S. 82, 88-89, 106 S. Ct. 433, 88 L. Ed. 2d 387 (1985) (under the dual sovereignty doctrine a defendant may be prosecuted for the same crime by two sovereigns if the two entities draw their authority to punish the offender from distinct sources of power). This court has held that § 10 of the Kansas Constitution Bill of Rights and the Fifth Amendment to the United States Constitution are coextensive. State v. Morton, 283 Kan. 464, 467, 153 P.3d 532 (2007); see State v. Cady, 254 Kan. 393, 396-97, 867 P.2d 270 (1994).
Historically, Kansas treated the cities and the State as separate sovereigns, allowing prosecution of the same crime in both municipal and district court. Earwood v. State, 198 Kan. 659, 660, 426 P.2d 151 (1967) (“The city and the state are separate sovereigns having separate codes of behavior. We have previously declared that a defendant may be prosecuted for his actions by both sovereigns.”)- But the United States Supreme Court held that practice violated the Fifth and Fourteenth Amendments. Waller v. Florida, 397 U.S. 387, 393-95, 90 S. Ct. 1184, 25 L. Ed. 2d 435, reh. denied 398 U.S. 914 (1970) (“[T]he judicial power to try petitioner on the first charges in municipal court springs from'the same organic law that created the state court ... in which petitioner was tried and convicted for a felony,” and petitioner could not be tried by both the municipal government and the State.). This court recognized that Waller overruled Earwood in Cox v. State, 208 Kan. 190, 191-92, 490 P.2d 381 (1971) (Earwood and other similar cases “may no longer be considered sound authority insofar as they are grounded on the theory of dual sovereignty of city and state.”).
Under this precedent, Jenkins' prosecution is seen as arising from the same sovereign because both the City and the State derive their power from the same organic law, the Kansas Constitution, so the double jeopardy provisions are potentially implicated. Whether a criminal defendant’s protection against double jeopardy is violated is a question of law over which an appellate court has unlimited review. State v. Gaudina, 284 Kan. 354, 369, 160 P.3d 854 (2007); Morton, 283 Kan. at 468.
*435The parties agree double jeopardy does not attach to a proceeding if the court lacked jurisdiction. This point is well established. See, e.g., Serfass v. United States, 420 U.S. 377, 391-92, 95 S. Ct. 1055, 43 L. Ed. 2d 265 (1975) (“[Jeopardy] does not come into play until a proceeding begins before a trier 'having jurisdiction to try the question of the guilt or innocence of the accused.’ [Citations omitted.] . . . Without risk of a determination of guilt, jeopardy does not attach, and neither an appeal nor further prosecution constitutes double jeopardy.”); Grafton v. United States, 206 U.S. 333, 345, 27 S. Ct. 749, 51 L. Ed. 1084 (1907) (“[B]efore a person can be said to have been put in jeopardy of life or limb the court in which he was acquitted or convicted must have had jurisdiction to try him for the offense charged.”); K.S.A. 21-3108(4)(a) (prosecution is not barred “[b]y a former prosecution before a court which lacked jurisdiction over the defendant or the offense”); State v. Hendren, 127 Kan. 497, 499-500, 274 P. 274 (1929) (Double jeopardy did not attach to prosecution in Cherokee County for blackmail because it was charged in wrong county and “ 'defendant cannot be considered as put in jeopardy by a proceeding in a court that has no jurisdiction in the premises, because any judgment that might be rendered against him would be void.’ ”).
The parties dispute whether the municipal court had subject matter jurisdiction over Jenkins’ third theft prosecution. Jenkins argues the municipal court had concurrent jurisdiction to convict him of misdemeanor theft under the Wichita ordinance, even though the crime would have been classified as a felony under K.S.A. 21-3701, because a prosecutor has discretion over whether to offer proof of prior offenses. The State argues municipal courts do not have jurisdiction over felonies and K.S.A. 21-3701(b)(6) mandates that the third prosecution for a theft of property valued at less than $1,000 is a felony.
To determine whether double jeopardy attached to Jenkins’ municipal court proceedings, we must resolve whether the municipal court had subject matter jurisdiction. Whether the municipal court had jurisdiction over the misdemeanor theft prosecution is a question of law subject to unlimited review. State v. McDaniel, 292 Kan. 443, 444, 254 P.3d 534 (2011).
*436 Scope of Municipal Court Jurisdiction
The jurisdiction of municipal and state district courts is defined by statute. City of Junction City v. Cadoret, 263 Kan. 164, 168, 946 P.2d 1356 (1997). K.S.A. 12-4104 defines municipal court jurisdiction, and K.S.A. 22-2601 defines state district court jurisdiction in criminal cases.
At the time the municipal charges were filed against Jenkins and he was found guilty in municipal court, K.S.A. 12-4104 stated: “The municipal court of each city shall have jurisdiction to hear and determine cases involving violations of the ordinances of the city.” And K.S.A. 22-2601 (Furse 1995) stated: “The district court shall have exclusive jurisdiction to tiy all cases of felony and other criminal cases under the laws of the state of Kansas.”. In Cadoret, this court held that “[a] reading of diese statutes clearly shows diat crimes which are designated as felonies can only be charged and tried in district courts, not in municipal courts.” (Emphasis added.) 263 Kan. at 168.
But Jenkins argues the city prosecutor can exercise discretion by choosing not to prove at least one of Jenkins prior theft convictions, avoiding the state statute’s felony designation. The State counters diat Jenkins’ third theft prosecution must be classified as a felony under state law, which would mean the city ordinance must be deemed invalid because it treats a third theft conviction as a misdemeanor.
This court has held that prosecutors have discretion to decide the level of offense to charge. See State v. Portillo, 294 Kan. 242, 253, 274 P.3d 640 (2012) (“prosecutor has essentially unfettered discretion to ignore a fact that would support a prosecution for a more serious offense and, instead, can merely choose to prosecute the defendant for a lesser offense”); State v. Sandberg, 290 Kan. 980, 986, 235 P.3d 476 (2010) (nothing “‘ “foreclose^] the prosecutor from deciding in a particular case that, notwithstanding the presence of one of the aggravated facts, the defendant will still be prosecuted for the lesser offense” ’ ”). But a prosecutor cannot simply confer subject matter jurisdiction on a court. Miller v. Glacier Development Co., 293 Kan. 665, 669, 270 P.3d 1065 (2011) *437(“[Sjubject matter jurisdiction is vested by statute, and parties cannot confer such jurisdiction upon a court by consent, waiver, or estoppel.”).
Resolution of this case turns on whether the city prosecutor could prosecute Jenkins based on a municipal ordinance that degrades the felony designation established by state law for Jenkins’ third theft crime. In other words, can the City enact an ordinance classifying a crime as a misdemeanor even though the state law specifically designates it as a felony? If tire City had authority under its home rule powers to enact an ordinance classifying all thefts of property valued at less than $1,000 as misdemeanors, the municipal court could exercise jurisdiction based on the Wichita petit theft ordinance. If not, the ordinance was invalid, and the municipal court could not base its jurisdiction upon it.
The legislature may preempt tire constitutional authority of cities only in the manner prescribed by the Home Rule Amendment to tire Kansas Constitution, Article 12, § 5. State ex rel. Kline v. Board of Comm’rs of Unified Gov’t of Wyandotte Co./KC, 277 Kan. 516, Syl. ¶ 2, 85 P.3d 1237 (2004). While the Home Rule Amendment empowered cities to determine local affairs, the “ "home rule power does not authorize cities to act where the state legislature has precluded municipal action by clearly preempting the field with a uniformly applicable enactment.’ ” 277 Kan. at 520 (quoting Kansas City Renaissance Festival Corp. v. City of Bonner Springs, 269 Kan. 670, 673, 8 P.3d 701 [2000]). As long as the legislature has not preempted a subject area with a uniformly applicable enactment, cities may exercise their home rule power by: (1) enacting a charter ordinance to exempt tire city from a nonuniform legislative enactment or (2) enacting an “ordinary” or noncharter ordinance if there is no conflicting legislative enactment. Kan. Const, art. 12, § 5(c); Kline, 277 Kan. at 520. This court has previously examined the validity of similarly conflicting state and municipal laws, and a review of those decisions provides guidance.
In City of Junction City v. Lee, 216 Kan. 495, 532 P.2d (1975), the defendant was convicted in municipal court of violating a Junction City ordinance that prohibited carrying a dangerous knife or firearm on one’s person. Lee appealed to the district court and *438sought dismissal on the grounds that the municipal ordinance conflicted with the state statute that preempted the field of weapons control. To support his argument, Lee pointed out that the statute only prohibited having the knife or weapon in two circumstances: when the weapon was concealed or when the person carrying the knife or firearm intended to use the weapon. The district court agreed the ordinance conflicted with these statutory provisions. This court reversed on appeal because we held that the ordinance merely went further than the statutory prohibition—but did not counter it. This court also held that the State had not clearly preempted the field of weapons control so as to exclude regulation by cities. 216 Kan. at 501-02. In dicta, the Lee court further noted that a different portion of the ordinance declared certain conduct to be a misdemeanor and that provision “could well be found to conflict with die state law because K.S.A. 21-4201(4) declares such offense to be a felony.” 216 Kan. at 504.
In Cadoret, the defendant was convicted in municipal court with driving under the influence (DUI) as a diird time offender. He appealed to district court and then sought dismissal of the conviction, arguing the city ordinance conflicted with the state statute and, as a result, the ordinance was preempted. The district court agreed and dismissed the conviction. This court affirmed. 263 Kan. at 168-74. At that time, K.S.A. 1996 Supp. 8-1567 provided that a first time DUI offense was a class B misdemeanor, a second offense was a class A misdemeanor, and a third or subsequent offense was a felony, In addition, subsection (m) of 8-1567 provided in part:
“Nothing contained in this section shall be construed as preventing any city from enacting ordinances, or any county from adopting resolutions, declaring acts prohibited or made unlawful by tins act as unlawful or prohibited in such city or county and prescribing penalties for violation thereof, but the minimum ■penalty prescribed by any such ordinance or resolution shall not be less than the minimum penalty prescribed by this act for the same violation, and the maximum penalty in any such ordinance or resolution shall not exceed the maximum penalty prescribed for the same violation.” (Emphasis added.)
The city adopted a DUI ordinance that was similar to, but not identical to, the state statute. Most significantly, the ordinance omitted the language designating first or second offenses as mis*439demeanors and third and subsequent offenses as felonies. In the appeal from the district court’s dismissal of the municipal court conviction, the Cadoret court framed the issue by stating:
“The question then becomes whether a city, under the authority of 8-1567(m), may omit the severity classification of a crime designated as a felony in a state statute of uniform application in order to prosecute and punish such offenders in municipal courts. For the various reasons we will hereafter set forth, we hold a city may not do so.” 263 Kan. at 168.
The court then noted the resolution did not depend on home rule authority because 8-1567(m) authorized the city to adopt a DUI resolution. Nevertheless, citing cases dealing with home rule authority, the court held the city ordinance could not conflict with the state statute. 263 Kan. at 169-74. The test for this determination, the Cadoret court stated, is:
“[Wjhether the ordinance permits what the statute forbids or prohibits what the statute authorizes. Lee, 216 Kan. at 501; see Blevins v. Hiebert, 247 Kan. 1, 7, 795 P.2d 325 (1990). If so, there is a conflict; but if both are prohibitory and the ordinance merely goes further in its prohibition, though not counter to the prohibition in the statute, there is no conflict. Lee, 216 Kan. at 501.
“In the present case, 8-1567(f) expressly designates a third or a subsequent offense as a nonperson felony. [The Junction City Ordinance] fails to make this designation. The ordinance does not go further in its prohibition. It actually ‘permits an identical violation to be prosecuted as a nondesignated offense while the same conduct is specifically stated to be a felony if charged under the state statute. This is a clear conflict.” (Emphasis added.) 263 Kan. at 170.
The Cadoret court noted this conclusion was supported by the dicta in Lee that the ordinance could conflict with state law because it classified the crime differently. This reference to Lee is significant for our purposes because Lee did not involve the DUI statute, which Jenkins attempts to distinguish from the theft statutes at issue in his case. But his point is weakened by the central holding in Lee that a municipal ordinance, even one that is in an area where the Kansas Legislature has not preempted city regulation, cannot conflict with state statute. See Lee, 216 Kan. at 501.
This existence of a conflict between a state statute’s felony classification and a city’s prosecution of a misdemeanor rose again in the DUI context in Elliott, 281 Kan. 583. In that case, the defendant was charged in district court with DUI as a third or subsequent *440offense, meaning he already had at least two prior DUI convictions. After a presentence report showed Elliott had four prior misdemeanor convictions in municipal court and one prior felony conviction in district court, Elliott challenged his criminal history classification for sentencing purposes. In making that argument, Elliott focused on K.S.A. 22-2601 (Furse 1995), which vested district courts with exclusive jurisdiction over felonies, and asserted the third and fourth convictions in municipal court could not be used to enhance his criminal history score because the municipal court lacked subject matter jurisdiction for those crimes the Kansas Legislature classified as a felony. This court agreed, stating that “the holding and reasoning of Cadoret could be applied to the circumstances of the present case to conclude that, because the municipal court possessed jurisdiction to prosecute Elliott for only two DUI offenses, the third and fourth convictions were void and could not be used to enhance his current sentence.” (Emphasis added.) Elliott, 281 Kan. at 587.
But the court continued its analysis to address arguments made by the State asserting the validity of the third and fourth municipal court convictions. And one of those arguments was essentially the same argument made by Jenkins in this case: The cases were not charged or proved as a felony but as a misdemeanor and, therefore, the municipal court had jurisdiction.
To support its argument, the State cited State v. Masterson, 261 Kan. 158, 929 P.2d 127 (1996), for its holding that a DUI is a felony only if the prior DUI convictions are alleged in the complaint and proven. In Elliott’s case, the State argued, there was no way to have alleged and proved the prior convictions because three convictions occurred on the same day. Nevertheless, the Elliott court rejected the State’s argument and held the municipal court lacked jurisdiction over the third and fourth offenses. 281 Kan. at 590-93. In doing so, the Elliot court discussed two post-Matterson decisions—State v. Larson, 265 Kan. 160, 958 P.2d 1154 (1998), and State v. Seems, 277 Kan. 303, 84 P.3d 606 (2004). In Larson, this court held that the State’s failure to plead the severity level in the DUI complaint did not render Larson’s conviction void, but instead restricted his sentence to that appropriate for a first-time offense. *441265 Kan. at 164. In Seems, we held that the State must prove the prior convictions at the preliminary hearing in order to establish that a felony had been committed and there was probable cause to believe the felony had been committed by the defendant. 277 Kan. at 306.
The Elliott court rejected the contention that this meant the municipal court had handled misdemeanors and therefore had jurisdiction.
“[T]he State’s position is that none of the four municipal court DUI convictions could have been felony convictions because the State neither alleged nor proved the prior DUI convictions, as required by Larson and State v. Seems, 277 Kan. 303, 84 P.3d 606 (2004). But the State fails to note that the ‘remedy’ for the State’s failing to establish at Seems’ preliminary hearing that a felony had been committed and there was probable cause to believe that tire felony had been committed by the defendant was dismissal of the charges pursuant to K.S.A. 2005 Supp. 22-2902(3). Dismissal of the charges is not the same as prosecuting the charges in municipal court contrary to 8-1567(f) or (g). With prosecution of the charges in municipal court, the question of the lack of subject matter jurisdiction remains.” (Emphasis added.) Elliott, 281 Kan. at 591-92.
Cadoret, Lee, and Elliott are consistent in their position that it does not matter whether the municipal court conviction was charged and proven as a misdemeanor because the municipal ordinance on which that prosecution was based conflicted with a state statute, so there was no basis for the municipal court to exercise jurisdiction. This analysis effectively answers any attempt to distinguish Cadoret on the basis that the defendant had been charged with a third DUI offense.
Nevertheless, there remains a potential distinction between Cadoret and Elliott because they are DUI cases, and this case and Lee, which are not. This distinction arises because the DUI statute expressly prohibited cities from imposing penalties that were more harsh or lenient than the state statutory penalties. See K.S.A. 2006 Supp. 8-1567(o)(l). There is no similar provision in the theft statute at issue in Jenkins’ case or in the firearms statute at issue in Lee.
As we have noted, this difference did not matter in the Lee court’s analysis, but that was dicta. Nevertheless, the Lee court was applying a rule that has subsequently been reiterated: Cities can *442adopt an ordinance or resolution relating to a local police power, even though there is a state law on the subject uniformly applicable to all municipalities, as long as the ordinance or resolution does not conflict with the state statute. Blevins v. Heibert, 247 Kan. 1, 8, 795 P.2d 325 (1990) (“[A] municipality has the right to legislate by ordinary ordinance or resolution non-conflicting local police powers even though there are state laws on the subject uniformly applicable to all municipalities.”).
The Wichita petit theft ordinance was inconsistent with K.S.A. 21-3701 at the time Jenkins was prosecuted and convicted in that all thefts of property valued at under $1,000—regardless of the number of prior theft convictions of the offender—-were punished as a misdemeanor. This runs directly counter to the legislature’s statutoiy pronouncement that a third theft offense “is” a felony. To the extent the ordinance is in conflict with K.S.A. 21-3701(b)(6) in that manner, it cannot serve as a basis for the Wichita municipal court’s exercise of jurisdiction. Consequently, it does not matter that a prosecutor has discretion to decide the level of offense to charge.
As held in Cadoret and Elliott, a city ordinance that conflicts with a state statute by classifying the offense as a misdemeanor when the legislature has classified the crime as a felony does not vest the municipal court with jurisdiction. The Wichita city ordinance created that conflict by allowing all thefts of property valued at less than $1,000 to be prosecuted as misdemeanors even though the same crime would be classified as a felony under K.S.A. 21-3701(b)(6) when committed by a person previously convicted of two or more thefts.
Finally, Jenkins argues the municipal court lacked authority to sua sponte set aside a properly entered and accepted plea absent fraud, citing State v. Dillion, 242 Kan. 410, Syl. ¶ 2, 748 P.2d 856 (1988). But Dillion is not applicable because tire municipal court did not vacate the conviction sua sponte. The State filed a motion, and the municipal court acted on that motion. Furthermore, a conviction entered by a court that lacks jurisdiction is void. Elliott, 281 Kan. at 585. The municipal court could vacate Jenkins’ plea, and the State could prosecute him for felony theft.
*443Affirmed.
Moritz, J., not participating. James Franklin Davis, District Judge, assigned.# tt *