The defendant, William Meidinger, was convicted on July 2, 1974, in the Municipal Court of Aberdeen, South Dakota, of violating Municipal Ordinance No. 1164, Section 701.3, making it unlawful to operate a junkyard without a permit. Specifically, he was accused by the City of placing junked cars on his property which is located north of Aberdeen. The property in question was outside of, but within three miles of the city limits of Aberdeen, and thus the City had jurisdiction to zone the property and enforce its zoning regulations under SDCL 11-6-10 and 11-6-11. Defendant was sentenced to thirty days in the city jail, to be suspended on condition that he remove the junked cars from that portion of his property which was subject to the zoning plan. Defendant appeals his conviction to this court, claiming that (1) the South Dakota statutes, SDCL 9-19-3 and 9-19-4, are repugnant to the -Constitution of the United States and to the Constitution of the State of South Dakota; (2) there was no arrest and arraignment of the defendant; (3) the defendant was entitled *414to a jury trial for an alleged violation of a municipal ordinance which provided for a jail sentence; (4) the municipality had no authority to label Section 1207 of the municipal ordinances of Aberdeen a misdemeanor; (5) the defendant should have been permitted to offer evidence on the issue of discriminatory penal enforcement; (6) testimony regarding a tax permit should not have been admitted; (7) the trial court improperly based its decision on the fact that the defendant was a trespasser on occupied property; and that (8) the City failed in its burden of proof that the defendant was in violation of the ordinance. We reverse and remand.
Defendant argues that the state statute under which he was sentenced does not comport with Article VI, § 18 of the South Dakota Constitution or the Equal Protection Clause of the Fourteenth Amendment to the United States Constitution. The statute in question is SDCL 9-19-4, which was repealed by the legislature, effective January 7, 1975 (Ch. 130, § 14, S.L.1973), but which was operative at the time of defendant’s conviction and sentencing. The statute read as follows:
“In cities where a municipal court functions, the governing body shall have the power to provide for the punishment of each violation of an ordinance, resolution, or regulation by a fine not exceeding five hundred dollars or by imprisonment not exceeding six months or by both such fine and imprisonment.”
This statute provided the sentencing máximums for cities which had municipal courts. The sentencing provisions for cities and towns not having municipal courts are found in SDCL 9-19-3, and there the sentences cannot exceed a fine of one hundred dollars, or imprisonment for thirty days, or both.
Defendant argues that SDCL 9-19-4 was unconstitutional because of the greater sentences allowed in cities that had municipal courts as opposed to cities and towns that did not have such courts. He maintains, in essence, that a municipality should not be allowed to impose greater penalties for a violation of its city ordinances just because it had established a municipal court at some time in the past.
*415In determining whether this statute comported with Article VI, § 18 of the South Dakota Constitution and the Equal Protection Clause of the Fourteenth Amendment of the United States Constitution it is necessary to utilize a two-part test which has traditionally been used by courts when a statute is called into question because of an alleged denial of equal protection. The first part of the test is whether the statute does set up arbitrary classifications among various persons subject to it. The second part of the test is whether there is a rational relationship between the classification and some legitimate legislative purpose. See Railway Express Agency v. New York, 1949, 336 U.S. 106, 69 S.Ct. 463, 93 L.Ed. 533; Schmitt v. Nord, 1947, 71 S.D. 575, 27 N.W.2d 910.
There can be no doubt that the statute did set up classifications among persons in the state. It allowed municipalities with municipal courts to impose greater penalties for municipal ordinance violations than those municipalities which did not have municipal courts because they could not meet the population requirement imposed by SDCL 16-11-2, 16-11-2.1 and SDCL 16-9-31, or did not find it necessary to have a municipal court. More importantly, it affected those accused of violating municipal ordinances. A person accused of violating a municipal ordinance in Sioux Falls, Rapid City or Aberdeen faced a maximum penalty of six months in jail and/or a five hundred dollar fine, while a person accused of violating the same ordinance in Mitchell, Clark or Garretson was subject to a maximum penalty of only thirty days in jail and/or a one hundred dollar fine. This inequality does not exist because the City Commission of Clark, in its legislative wisdom, deemed the violation less heinous and deserving of a lesser sentence than .did the City Commission of Aberdeen, but rather because the City Commission of Clark was foreclosed by state law from assessing a penalty in excess of thirty days in jail and/or a one hundred dollar fine.
Thus, this is not “legislative recognition of the differing desires and needs of the people” which formed a rational basis for inequality in State v. Beene, 1972, 263 La. 865, 269 So.2d 794. Nor does it respond to a need for legislation in certain localities of the state as does the statute requiring livestock ownership *416inspection in specific counties where branding is prevalent. State v. Smith, 88 S.D. 76, 216 N.W.2d 149. Rather, it is an arbitrary classification resulting in unequal punishment for like offenses where one city qualifies populationwise for a municipal court under SDCL 16-11-2, 16-11-2.1 and SDCL 16-9-31 and another in the same locality does not.
. The inequality created by SDCL 9-19-4 was completely arbitrary and capricious. As was stated by this court in State v. King, 1967, 82 S.D. 514, 149 N.W.2d 509:
“Equal protection of the law requires that the rights of every person must be governed by the same rule of law under similar circumstances and, in the administration of criminal justice, the imposition of different punishments or different degrees of punishment upon one than is imposed upon all for like offenses is a denial of such right.” 82 S.D. at 516, 149 N.W.2d at 510.
The extent of punishment for the violation of a municipal ordinance should be based upon the culpability of the individual defendant rather than upon whether the municipality had a municipal court or tried its cases in the district county court.
This statute also fails the second part of the test. We can find no rational relationship between the distinctions created by SDCL 9-19-4 and a legitimate legislative purpose nor has any rational relationship been suggested. “Equal protection does not require that all persons be dealt with identically, but it does require that a distinction made have some relevance to the purpose for which the classification is made.” Baxstrom v. Herold, 1966, 383 U.S. 107, 86 S.Ct. 760, 15 L.Ed.2d 620.
With the advent of the district county court, which was available for the trial of municipal ordinance violations in so-called “second-class” cities, the last semblance of rational relationship to a legislative purpose disappeared. Prior to that time such cases were tried in justice of the peace or police magistrate courts with jurisdiction limited to the trial of cases where the penalty did not exceed thirty days in jail and/or a one hundred dollar fine.
*417Since SDCL 9-19-4' did set up arbitrary, classifications which bore no rational relationship to a legitimate legislative purpose, we find it unconstitutional' on its face under Article VI, § 18 of the South Dakota Constitution and the Fourteenth Amendment of the United States Constitution.
In finding SDCL 9-19-4 unconstitutional, we overrule the case of Ex parte Webster, 1924, 47 S.D. 142, 196 N.W. 549, which upheld the constitutionality of the statute under Article VI, § 18 of our own Constitution. We feel that that holding can no longer be sustained or given weight as precedent.
In so holding, we reverse the conviction of the defendant. He was tried in municipal court in Aberdeen, and the maximum punishment for violation of Ordinance No. 1164, Section 701.3, was governed by SDCL 9-19-4. The fact that defendant was ultimately given a thirty-day suspended jail sentence is immaterial. The crucial point is that under the statute he was placed in jeopardy of a fine of five hundred dollars and/or six months in jail. This is where the real inequity lies. Persons convicted in municipal court were in jeopardy of greater punishment than those convicted in. district county court. This inequality simply does not square with the concept of equal protection under the law.
As we are overruling Ex parte Webster, supra, which had been the law in South Dakota since 1924, this holding is prospective only, and does not apply to cases handled by the municipal or magistrate courts previous to the date of this decision.
In view of this decision on constitutional grounds, the remaining assignments of error are not considered in this -opinion. The judgment is reversed and the cause remanded to the magistrate court of Aberdeen for the purpose of dismissal.
WINANS and DOYLE, JJ., concur. WOLLMAN and COLER, JJ., concur specially.