
12 Cal.4th 826 (1996)
911 P.2d 1
50 Cal. Rptr.2d 101
DENNIS PINEDA BALUYUT et al., Petitioners,
v.
THE SUPERIOR COURT OF SANTA CLARA COUNTY, Respondent; THE PEOPLE, Real Party in Interest.
Docket No. S045419.
Supreme Court of California.
March 4, 1996.
*828 COUNSEL
Bruce W. Nickerson for Petitioners.
Sean M. SeLegue as Amicus Curiae on behalf of Petitioners.
No appearance for Respondent.
Daniel E. Lungren, Attorney General, George Williamson, Chief Assistant Attorney General, Ronald S. Bass, Assistant Attorney General, Mark S. Howell, Ronald S. Matthias, Catherine A. Rivlin and Frances Marie Dogan, Deputy Attorneys General, for Real Party in Interest.
*829 OPINION
BAXTER, J.
Petitioners below are defendants charged with violation of Penal Code section 647, subdivision (a) (section 647(a)),[1] in the Municipal Court for the Santa Clara Judicial District. They sought dismissal of the charges on the ground that the Mountain View police who arrested them engaged in a pattern of discriminatory arrest and prosecution of homosexuals under this statute, thereby denying them equal protection of the law. The municipal court judge found that defendants[2] had established all of the factors necessary to establish constitutionally impermissible discriminatory prosecution except a specific intent on the part of the Mountain View police to punish defendants for their membership in a particular class, an element which the court believed was required by People v. Smith (1984) 155 Cal. App.3d 1103 [203 Cal. Rptr. 196] (Smith).
After the superior court denied a petition for writ of mandate by the defendants who sought to set aside the ruling of the municipal court, the Court of Appeal ordered the municipal court to grant defendants' motion to dismiss the complaints.[3] In the erroneous belief that the Court of Appeal decision had become final without a petition for review by the People, the municipal court, with the concurrence of the local prosecutor, dismissed the charges against defendants in the interest of justice. This court nonetheless granted review in response to the Attorney General's request that the court clarify whether, as Smith held, a defendant claiming discriminatory prosecution must show that the police or prosecutor targeted the group of which he or she is a member for arrest or prosecution with a specific intent to punish those defendants for membership in the group.[4]
We conclude that the Court of Appeal correctly held that showing a specific intent on the part of law enforcement to punish the defendant for *830 membership in a particular class is not necessary to establish discriminatory prosecution. Inasmuch as the petition for writ of mandate is now moot, however, we shall reverse the judgment with directions to dismiss the petition for writ of mandate.

I

Background
In support of their motion to dismiss, defendants presented 10 arrest reports spanning a 2-year period. The reports described decoy officers' arrests of men in and outside an adult bookstore in Mountain View for violations of section 647(a). The arrests involved a decoy officer who had engaged a person in small talk. In five of the arrests, after the person eventually made it clear that he was interested in a sexual encounter the officer suggested that the person accompany the officer to the officer's car. Once at the officer's car, the person was arrested for soliciting a lewd act to be performed in a public place. In the remainder, the person suggested going to a place which, while public or open to the public, was not clearly one at which the person knew or should know there would be other persons who might observe and be offended by the suggested conduct (see Pryor v. Municipal Court (1979) 25 Cal.3d 238, 256 [158 Cal. Rptr. 330, 599 P.2d 636]), but the person was also arrested for soliciting a lewd act to be performed in a public place. Other evidence was offered that the modus operandi of the decoy officers was typical of a "cruising" pattern of homosexual men and that it invited homosexual men to make contact with the decoy officer.
Mountain View police records for the two years prior to the arrest of defendants were reviewed by the municipal court which also heard testimony about the decoy operation.[5] The court concluded that the operation was focused solely on persons who had a proclivity to engage in homosexual conduct.
The court summarized its factual and legal conclusions: "[T]he Court does come inevitably to the conclusion that there was discrimination ... evidenced by the officers' method of operation; that their method of operation was designed to ferret out homosexuals or those who were likely to engage *831 in homosexual acts, and that it did so without any relationship to the alleged problems at that location for which the citizen complaint had been initially lodged."
(1a) Based on these factual conclusions, and applying this court's decision in Murgia v. Municipal Court (1975) 15 Cal.3d 286 [124 Cal. Rptr. 204, 540 P.2d 44] (Murgia), the municipal court ruled that defendants had established there was improper selectivity  discrimination  in prosecution and that the discrimination had an invidious basis. It was unjustifiable, arbitrary, and without a rational relationship to legitimate law enforcement interests. Notwithstanding these conclusions and the court's belief that the complaints should be dismissed, the court felt bound by Smith to deny the motion to dismiss because defendants had not established that the Mountain View police had a specific intent to punish the defendants for their membership in a particular class.
Defendants claim, and the Court of Appeal agreed, that neither the decisions of this court, nor those of the United States Supreme Court on which our decisions have been based, require that a defendant prove specific intent to punish for membership in a particular class. In their briefs in this court, the People do not disagree. Instead they ask this court to clarify the nature of the showing necessary to establish discriminatory prosecution and argue that specific intent to which the Smith court referred "properly informs a reviewing court's determination of a claim of discriminatory enforcement or discriminatory prosecution."[6]

II

Discussion
(2) Although referred to for convenience as a "defense," a defendant's claim of discriminatory prosecution goes not to the nature of the charged offense, but to a defect of constitutional dimension in the initiation of the prosecution. (Murgia, supra, 15 Cal.3d at p. 293, fn. 4.) The defect lies in the denial of equal protection to persons who are singled out for a prosecution that is "deliberately based upon an unjustifiable standard such as race, religion, or other arbitrary classification." (Oyler v. Boles (1962) 368 U.S. 448, 456 [7 L.Ed.2d 446, 453, 82 S.Ct. 501].) When a defendant establishes the elements of discriminatory prosecution, the action must be dismissed even if a serious crime is charged unless the People establish a compelling *832 reason for the selective enforcement. (McLaughlin v. Florida (1964) 379 U.S. 184, 193-196 [13 L.Ed.2d 222, 229-231, 85 S.Ct. 283]; Murgia, supra, 15 Cal.3d at p. 304.)
Unequal treatment which results simply from laxity of enforcement or which reflects a nonarbitrary basis for selective enforcement of a statute does not deny equal protection and is not constitutionally prohibited discriminatory enforcement. (Wayte v. United States (1985) 470 U.S. 598, 608-610 [84 L.Ed.2d 547, 556-558, 105 S.Ct. 1524]; Murgia, supra, 15 Cal.3d at p. 296.) However, the unlawful administration by state officers of a state statute that is fair on its face, which results in unequal application to persons who are entitled to be treated alike, denies equal protection if it is the product of intentional or purposeful discrimination. (Snowden v. Hughes (1944) 321 U.S. 1, 8 [88 L.Ed. 497, 503, 64 S.Ct. 397].)
(3) In Murgia this court explained the showing necessary to establish discriminatory prosecution: "[I]n order to establish a claim of discriminatory enforcement a defendant must demonstrate that he has been deliberately singled out for prosecution on the basis of some invidious criterion. Because the particular defendant, unlike similarly situated individuals, suffers prosecution simply as the subject of invidious discrimination, such defendant is very much the direct victim of the discriminatory enforcement practice. Under these circumstances, discriminatory prosecution becomes a compelling ground for dismissal of the criminal charge, since the prosecution would not have been pursued except for the discriminatory design of the prosecuting authorities." (Murgia, supra, 15 Cal.3d at p. 298, fn. omitted.)
We again explained the necessary showing in People v. Superior Court (Hartway) (1977) 19 Cal.3d 338, 348 [138 Cal. Rptr. 66, 562 P.2d 1315] (Hartway): "The elements of the defense of discriminatory enforcement were set forth in Murgia v. Municipal Court, supra. To establish the defense, the defendant must prove: (1) `that he has been deliberately singled out for prosecution on the basis of some invidious criterion'; and (2) that `the prosecution would not have been pursued except for the discriminatory design of the prosecuting authorities.'"
The Smith court elaborated on these elements and in so doing appeared to hold that the defendant must show not only that an invidious discriminatory purpose underlies the prosecution, but also that this purpose is to punish the defendant for his membership in a particular class. The court correctly acknowledged our statement of the elements in Hartway, but inexplicably added: "In other words, a criminal prosecution which results from the prosecutor's intent to punish a defendant for belonging to a class or exercising rights protected by the equal protection clause cannot be sustained." *833 (Smith, supra, 155 Cal. App.3d at p. 1133.) The court recognized that an invidious purpose for prosecution is one that is arbitrary and thus unjustified because it bears no rational relationship to legitimate law enforcement interests, and that this court has not attempted to circumscribe the range of classes that might be improperly targeted for prosecution. (Id. at p. 1135.) It also recognized that Murgia held that the discriminatory prosecution must be deliberate, i.e., intentional or purposeful, but again added a gloss not present in Murgia: "The defense is established only when it appears an important factor in the prosecutor's selection of the defendant is the prosecutor wants to punish the defendant for membership in a protected class or exercise of protected rights." (Id. at p. 1136.)
(1b) Nothing in Murgia, Hartway, or the controlling decisions of the United States Supreme Court supports the imposition of this additional burden on a defendant. Showing an intent to punish for membership in a group or class is not necessary to establish a violation of an individual's right to equal protection under the Fourteenth Amendment to the United States Constitution. There must be discrimination and that discrimination must be intentional and unjustified and thus "invidious" because it is unrelated to legitimate law enforcement objectives, but the intent need not be to "punish" the defendant for membership in a protected class or for the defendant's exercise of protected rights.
The People contend, however, that a "specific intent" akin to that which is an element of some criminal offenses may be an element of a discriminatory prosecution showing. The People argue that a specific intent requirement may be found in Murgia because Murgia indicates that more than mere selective enforcement of a law which produces a discriminatory result is needed. Therefore, they reason, the Smith court correctly denominated the intent element to be a specific intent to punish. Understood in this manner, the "specific intent to punish" element is a corollary to the question of whether the police acted permissibly, i.e., on a nonarbitrary and noninvidious basis.
We agree with the premise that if the police single out a group or member of a group for arrest and prosecution with the intent to punish the defendants for membership in the group rather than simply for violation of the law, the prosecution is arbitrary and lacks a legitimate law enforcement purpose. Thus the discrimination in singling out those defendants is invidious. It does not follow, however, that a specific intent to punish for membership in a particular classification is a necessary element of a discriminatory prosecution showing. Murgia did not so hold.
Murgia arose in the context of a motion for discovery by defendants who claimed that they were being discriminatorily prosecuted under various *834 statutes on the basis of their membership in or support of the United Farm Workers Union (UFW) and sought information relevant to that claim. Discovery had been denied on the ground that the evidence sought was irrelevant as defendants had violated the laws under which they were charged. We first noted the holding of Oyler v. Boles, supra, 368 U.S. 448, 456 [7 L.Ed.2d 446, 452-453], and stated our view of the holding of that case in the present context: "Neither the federal nor state Constitution countenances the singling out of an invidiously selected class for special prosecutorial treatment, whether that class consists of black or white, Jew or Catholic, Irishman or Japanese, United Farm Worker or Teamster. If an individual can show that he would not have been prosecuted except for such invidious discrimination against him, a basic constitutional principle has been violated, and such prosecution must collapse upon the sands of prejudice." (Murgia, supra, 15 Cal.3d at p. 290, italics added.)
Then, rejecting arguments by the People that equal protection principles were inapplicable to the administration of penal statutes, we recognized that under Snowden v. Hughes, supra, 321 U.S. 1, 8 [88 L.Ed. 497, 503], and Sunday Lake Iron Co. v. Township of Wakefield (1918) 247 U.S. 350, 352-353 [62 L.Ed. 1154, 1155-1156, 38 S.Ct. 495], mere errors of judgment would not establish discrimination and that there must be "intentional or purposeful discrimination." "As these authorities teach, an equal protection violation does not arise whenever officials `prosecute one and not [another] for the same act' (cf. People v. Montgomery [(1941)] 47 Cal. App.2d 1, 13 [117 P.2d 437]); instead, the equal protection guarantee simply prohibits prosecuting officials from purposefully and intentionally singling out individuals for disparate treatment on an invidiously discriminatory basis." (Murgia, supra, 15 Cal.3d at p. 297, italics added.)
Still later we repeated the elements several times, often paraphrasing them. "[I]n order to establish a claim of discriminatory enforcement a defendant must demonstrate that he has been deliberately singled out for prosecution on the basis of some invidious criterion." (Murgia, supra, 15 Cal.3d at p. 298.) "[A] criminal defendant may object, in the course of a criminal proceeding to the maintenance of the prosecution on the ground of deliberate invidious discrimination in the enforcement of the law." (Id. at p. 300.) "[D]efendants' discriminatory enforcement defense does not rest simply upon allegations of laxity of enforcement; instead, defendants have clearly alleged that the Kern County law enforcement authorities undertook a practice of `intentional, purposeful and unequal enforcement of penal statutes' against the class of individuals who belong to or are associated with the UFW. We conclude that such allegations of a conscious policy of selective enforcement directed against members or supporters of a particular *835 labor organization are clearly sufficient to support a claim of invidious discrimination which is prima facie invalid under the equal protection clause." (Id. at p. 301.)
Explaining further we also said: "[A] denial of equal protection would be established if a defendant demonstrates that the prosecutorial authorities' selective enforcement decision `was deliberately based upon an unjustifiable standard such as race, religion, or other arbitrary classification.' ... In the instant case we have no occasion to consider the entire range of classifications that may be `arbitrary' in this context, i.e., that bear no rational relationship to legitimate law enforcement interests...." (Murgia, supra, 15 Cal.3d at p. 302, italics omitted.)
The suggestion in Smith that Murgia somehow implied that discriminatory enforcement is not established unless the defendant establishes that the law enforcement officers responsible had a specific intent to punish the defendants for their membership in a particular classification finds no support in these expressions of the elements of the defendant's burden. Rather, the purpose or intent that must be shown is simply intent to single out the group or a member of the group on the basis of that membership for prosecution that would not otherwise have taken place. When there is no legitimate law enforcement purpose for singling out those persons for prosecution, the prosecution is arbitrary and unjustified and thus results in invidious discrimination.
Moreover, the Smith court did not actually apply the gloss it added to the Murgia/Hartway elements of a discriminatory prosecution showing. In Smith, the defendant's discriminatory prosecution claim was predicated on an assertion that the district attorney exhibited personal animosity toward defendant and prosecuted defendant because of his political affiliation. The court properly held that personal animosity toward a defendant may implicate due process concerns if a prosecutor improperly involves himself or herself in a criminal prosecution, but does not establish an element of discriminatory prosecution, an equal protection-based concept. The court also considered the evidence that defendant was a member of the Republican Party and the district attorney a Democrat, and that four years earlier the district attorney had triggered an investigation of defendant's conduct, and then discussed with the Franchise Tax Board the defendant's possible tax-related violations. However, the court held only that defendant failed to establish that the prosecutor's interest had an invidious basis. (Smith, supra, 155 Cal. App.3d at p. 1137.) The court made no mention of the "specific intent to punish" element that it had said elsewhere was part of the defense burden in establishing discriminatory prosecution.
*836 Even were this a case of first impression, this court would not be free to add the gloss suggested by Smith to the test of discriminatory prosecution. Federal constitutional constraints preclude our doing so. Subsequent to Murgia and the United States Supreme Court decisions on which it relied, the high court again visited the question and reaffirmed the factors which establish a violation of a defendant's right to equal protection, noting that ordinary equal protection principles apply in assessing discriminatory prosecution claims. In Wayte v. United States, supra, 470 U.S. 598, the court considered a "passive enforcement" policy under which the federal government prosecuted persons who failed to register for the draft. Under that policy the government prosecuted only persons who reported themselves as unwilling to register. Those who reported themselves were known by the government as likely to be persons who for moral or religious reasons were vocal opponents of the registration requirement. At the time the policy existed, the Selective Service system was unable to develop a more active enforcement system.
Wayte, the petitioner, was one of the first persons indicted under the passive enforcement policy. He claimed to be a victim of selective or discriminatory enforcement and asserted that the indictment violated his First Amendment rights. The district court dismissed the indictment, ruling that the government had not rebutted Wayte's prima facie case of selective prosecution. Although it agreed that Wayte had shown that others similarly situated had not been prosecuted for the same conduct, the court of appeals reversed on the ground that Wayte failed to show that the government focused its investigation on Wayte because of his protest activities.
The Supreme Court affirmed the court of appeals. In so doing it again emphasized that while broad discretion is vested in government officers over whom to prosecute, that discretion is not unfettered and may not be based on an unjustifiable standard. (Wayte v. United States, supra, 470 U.S. at p. 608 [84 L.Ed.2d at p. 556].) The court then declared: "It is appropriate to judge selective prosecution claims according to ordinary equal protection standards. See Oyler v. Boles, supra. Under our prior cases, these standards require petitioner to show both that the passive enforcement system had a discriminatory effect and that it was motivated by a discriminatory purpose." (Ibid., fns. omitted.)[7]
The court held that even if the government's passive enforcement policy had a discriminatory effect, Wayte had not shown that the government *837 intended that result. (Wayte v. United States, supra, 470 U.S. at p. 610 [84 L.Ed.2d at pp. 557-558].) Although he had shown that the government was aware that the likely impact of its passive enforcement policy was prosecution of vocal objectors, a showing of "discriminatory purpose" required more. That showing is that the government selected the course of action "`at least in part "because of," not merely "in spite of," its adverse effects upon an identifiable group.'" (Ibid.)
The intent element of the equal protection test the court applied was drawn from Personnel Administrator of Mass. v. Feeney (1979) 442 U.S. 256 [60 L.Ed.2d 870, 99 S.Ct. 2282], Village of Arlington Heights v. Metropolitan Housing Corp. (1977) 429 U.S. 252 [50 L.Ed.2d 450, 97 S.Ct. 555], and Washington v. Davis (1976) 426 U.S. 229 [48 L.Ed.2d 597, 96 S.Ct. 2040]. None of those cases arose in the context of a criminal prosecution and none, therefore, supports a conclusion that a specific intent to punish the party allegedly subjected to discrimination is an element of an equal protection violation. The first was a challenge to the Massachusetts veterans' preference in civil service hiring which, although facially neutral, resulted in men being hired in overwhelmingly larger numbers than women. The court held that disparate impact was insufficient to establish an equal protection violation. The necessary intent element, which the plaintiff failed to show, was intent to exclude women from civil service jobs. "`Discriminatory purpose,' ... implies more than intent as volition or intent as awareness of consequences. See United Jewish Organizations v. Carey [(1977)] 430 U.S. 144, 179 [51 L.Ed.2d 229, 254, 97 S.Ct. 996] (concurring opinion). It implies that the decisionmaker, in this case a state legislature, selected or reaffirmed a particular course of action at least in part `because of,' not merely `in spite of,' its adverse effects upon an identifiable group." (Personnel Administrator of Mass. v. Feeney, supra, 442 U.S. at p. 279 [60 L.Ed.2d at pp. 887-888], fns. omitted.)
Village of Arlington Heights v. Metropolitan Housing Corp., supra, 429 U.S. 252, considered a claim that the refusal of a village to rezone property from single-family to multiple-family use was racially discriminatory. Addressing the intent element of an equal protection violation, the court again noted that a showing of disparate impact is insufficient and that a showing of discriminatory intent or purpose is required. (Id. at p. 265 [50 L.Ed.2d at p. 464].) The intent element was also addressed in Washington v. Davis, supra, 426 U.S. 229, in which the impact of oral and written personnel tests on Black applicants for the District of Columbia Police Force was offered as the basis for a claim that the applicants had been denied equal protection in employment. There the court, reviewing its past decisions, rejected the argument that discriminatory impact alone established a violation, and reaffirmed the necessity for a showing of discriminatory purpose.
*838 We are not free to adopt a narrower construction of the protection afforded by the equal protection clause of the Fourteenth Amendment than that enunciated by the United States Supreme Court. Requiring a defendant to show that the government had a specific intent to punish a person singled out as a member of a class for criminal prosecution finds no support in the controlling precedent of the United States Supreme Court cases.

III

Disposition
The judgment of the Court of Appeal is reversed with directions to dismiss the petition for writ of mandate as moot.
Lucas, C.J., Mosk, J., Kennard, J., George, J., Werdegar, J., and Arabian, J.,[*] concurred.
NOTES
[1]  Section 647: "Every person who commits any of the following acts is guilty of disorderly conduct, a misdemeanor: [¶] (a) Who solicits anyone to engage in or who engages in lewd or dissolute conduct in any public place or in any place open to the public or exposed to public view."
[2]  For clarity, as the People are the petitioner in this court, we will refer to the mandate petitioners as "defendants," their status in the underlying criminal prosecution.
[3]  An order of the superior court denying a petition for writ of mandate directed to the municipal court is not appealable, but may be reviewed on petition for writ of mandate. (Code Civ. Proc., § 904.1.) The Court of Appeal may have overlooked the procedural posture of the case as its judgment directed the municipal court to grant defendants' motion to dismiss, rather than directing issuance of a peremptory writ of mandate to the respondent superior court ordering the superior court to set aside its order denying relief and to grant the petition filed in that court.
[4]  "`If an action involves a matter of continuing public interest and the issue is likely to recur, a court may exercise an inherent discretion to resolve that issue, even though an event occurring during its pendency would normally render the matter moot.' (Liberty Mut. Ins. Co. v. Fales (1973) 8 Cal.3d 712, 715-716 [106 Cal. Rptr. 21, 505 P.2d 213]....)" (Morehart v. County of Santa Barbara (1994) 7 Cal.4th 725, 746-747 [29 Cal. Rptr.2d 804, 872 P.2d 143]; see also Amwest Surety Ins. Co. v. Wilson (1995) 11 Cal.4th 1243, 1266 [48 Cal. Rptr.2d 12, 906 P.2d 1112].)
[5]  The arrest records submitted as exhibits to the petition do not reveal the name of the persons arrested, but two apparently relate to the arrests of the defendants. In one of these arrests, the officer suggested going to his car. In the other, the defendant suggested going to the officer's car.
[6]  Because review was granted to decide only the "intent to punish" question and the petition is moot, we do not reach the People's argument that petitioners failed to establish other elements of discriminatory prosecution.
[7]  When the equal protection claim is based on an overtly discriminatory classification, however, discriminatory intent need not be shown. (Wayte v. United States, supra, 470 U.S. at p. 608, fn. 10 [84 L.Ed.2d at p. 556].)
[*]   Retired Associate Justice of the Supreme Court sitting under assignment by the Chairperson of the Judicial Council.
