OPINION
APODACA, Judge.Defendant appeals the district court’s order placing him on probation for a period of eighteen months, as a result of his conviction for a petty misdemeanor. He contends the relevant statutory scheme does not permit the length of probation to vary depending on whether a defendant is sentenced in district court or a lesser tribunal. We agree and reverse the district court’s sentencing order.
BACKGROUND
Defendant was indicted by a grand jury for several crimes, which included felonies and misdemeanors. Initially, he pled not guilty to all counts of the indictment. Later, however, he pled guilty to the charge of possession of less than one ounce of marijuana, a petty misdemeanor, and the state agreed to dismiss all remaining charges. He was sentenced to fifteen days in the county jail, the maximum period of incarceration provided by the applicable statute. The district court suspended the sentence and placed defendant on supervised probation for eighteen months.
At the sentencing hearing, defendant objected to the length of the probation period. He argued that the district court would have no authority to enforce the terms of the probation once defendant had been on probation for fifteen days, the length of the underlying suspended sentence. See State v. Encinias, 104 N.M. 740, 726 P.2d 1174 (Ct.App.1986). In response, the district court stated that it would use its contempt powers to enforce the terms of the probation, should defendant fail to comply with those terms once the underlying sentence of fifteen days expired. In addition to appealing the district court’s imposition of probation, defendant asks us to address the court’s threatened use of contempt powers. Because we are reversing the district court’s sentence, we need not address the contempt issue.
DISCUSSION
Defendant contends the pertinent statutes permit only a period of supervised probation not to exceed fifteen days, the maximum amount of time he could have been incarcerated for the misdemeanor. See NMSA 1978, § 30-31-23(B)(1) (Repl.Pamp.1989). To address defendant’s contention, we must examine the applicable statutes and determine the legislative intent. These statutes are NMSA 1978, Sections 31-19-1(C) (sentencing authority for misdemeanors), 31-20-5(A) (probation requirements where sentence is suspended or deferred), and 31-20-6(C) (authorized length of probation where sentence is suspended or deferred) (Repl.Pamp.1990).
Section 31-19-1(C) provides generally that, when a court has suspended or deferred a sentence based on a misdemean- or conviction, the court shall place defendant “on supervised or unsupervised probation for all or some portion of the period of deferment or suspension.” Section 31-20-5(A) states that “when the magistrate, metropolitan or district court has deferred or suspended sentence, it shall [place] the defendant on probation for all or some portion of the period of deferment or suspension if the defendant is in need of supervision,” provided that the total period of probation does not exceed five years for district courts, and the total period of probation for metropolitan or magistrate courts does not exceed the maximum allowable incarceration time for the offense. Finally, Section 31-20-6(C) authorizes a district court to place a defendant on supervised probation for a term not to exceed five years.
There are at least two possible interpretations of the interplay between these statutes. Section 31-19-1(C) could simply be a minimum requirement that a misdemeanant must be placed on some type of probation if part or all of the sentence is suspended, since the section states a court shall impose probation for part or all of a suspended sentence. Sections 31-20-5(A) and 31-20-6(C) would then provide the maximum lengths for such probation — five years if the sentencing court is the district court and fifteen days (the maximum period of incarceration) if the sentencing court is a magistrate or metropolitan court. On the other hand, the language in Section 31-19-1(C) (requiring that a court impose probation for part or all of the suspended or deferred term) could be interpreted as a maximum probationary period for any misdemeanor. That is, under this view, no court could impose a longer probation period than the length of the suspended or deferred sentence. This interpretation focuses not on the court in which sentencing occurs, but on the offense that has been committed.
Based on our review of the legislative history surrounding the subject stab utes, we conclude that the latter interpretation is correct. Consequently, we hold that the maximum period of probation for a misdemeanor depends not on the court in which the sentence is imposed, but instead on the crime that has been committed.
Our holding is supported not only by the history of the applicable statutes, but by the rule of lenity. See State v. Keith, 102 N.M. 462, 697 P.2d 145 (Ct.App.1985) (doubts about construction of criminal statutes are resolved in favor of rule of lenity). Additionally, we determine that allowance of such a variation in penalty based on the pure happenstance of where a case is tried would be an unreasonable result, which we must avoid in interpreting our statutes. See Gonzales v. Lovington Pub. Schools, 109 N.M. 365, 785 P.2d 276 (Ct.App.1989).
We now summarize the legislative history supporting our disposition. In 1984, our legislature added Section 31-19-1(C), with its language concerning suspension or deferral of a misdemeanant’s sentence. The added language required that a court place the defendant on supervised or unsupervised probation for all or part of the period of deferment or suspension. See § 31-19-1(C) (Cum.Supp.1984). Section 31-20-5 was also amended to mention specifically magistrate and metropolitan courts, as well as district courts, and to state that the maximum probation period for magistrate and metropolitan courts could not be longer than the maximum incarceration term allowed by law, while the maximum for district courts was five years. See § 31-20-5(A) (Cum.Supp.1984). When this change was made, the distinction made by the legislature between the courts was inconsequential and even meaningless, because at that time, Section 31-20-6(D) provided that the only crimes resulting in a probation period longer than the maximum allowable sentence were third and fourth degree felonies. See § 31-20-6(D) (Cum.Supp.1984). It followed that, for misdemeanors, the maximum possible probation period was limited to the maximum legal sentence for that crime, no matter in which court the case was heard.
In 1985, the legislature amended Section 31-20-6 and eliminated the “maximum allowable sentence” restriction on length of probation for all crimes, not just third and fourth degree felonies. At that time, however, the legislature did not change the language in Section 31-20-5(A), which appeared to allow district courts to impose longer periods of probation than permitted for magistrate or metropolitan courts, even for the same gravity of crimes. The legislature also left intact Section 31-19-1(C), which could be interpreted to limit probationary periods for misdemeanors to the maximum incarceration period allowed by law. Because of this apparent conflict and the fact that, when the legislature first distinguished between magistrate or metropolitan courts and district courts, the distinction was meaningless, we conclude that the failure to eliminate that distinction in 1985 was merely an oversight by the legislature.
As we previously noted, our interpretation of the pertinent statutes is bolstered by our conclusion that, in prescribing a maximum penalty, it is unreasonable to focus on the court in which a defendant is tried, rather than the crime the defendant committed. The state argues that such a distinction is not unreasonable, contending that misdemeanors are most often tried in metropolitan or magistrate courts, and that, when a misdemeanor charge is filed in district court, it is normally a result of unusual circumstances — usually because other, more serious charges are filed together with the misdemeanor charge. We recognize that, within the maximum allowable range, a trial court has discretion to vary the penalty for a crime by suspending part or all of the sentence, depending on a wide variety of factors. NMSA 1978, § 31-20-3 (Repl.Pamp.1990). However, we do not believe it is reasonable to expand the maximum range of penalties for identical crimes, on the basis of a blanket assumption that a defendant who is tried for the crime in district court must have committed other crimes as well. We therefore reject this argument.
The state also argues that the rule of lenity should not apply to this appeal, because the language of the statutes is clear. We disagree. As we already noted, Section 31-19-1(C) may be interpreted to limit the maximum period of probation allowed, or it may be interpreted as a minimum requirement on the sentencing court. Given this ambiguity, and because we believe application of the rule of lenity renders a more reasonable resolution of the issue, we resolve the ambiguity in defendant’s favor. See State v. Keith.
CONCLUSION
In summary, we hold that the maximum period of probation that may be assessed in misdemeanor or petty misdemeanor cases is the maximum allowable period of incarceration for that crime, irrespective of whether a defendant is sentenced in district court or in a lower tribunal. We thus reverse the sentence imposed and remand for resentencing consistent with this opinion. Because of our disposition, it is unnecessary to address the contempt issue raised by defendant.
IT IS SO ORDERED.
DONNELLY and BIVINS, JJ., concur.