
106 Cal.Rptr.2d 447 (2001)
88 Cal.App.4th 1110
The PEOPLE, Plaintiff and Respondent,
v.
Rafael Garcia ALVAREZ, Jr., Defendant and Appellant.
No. E026734.
Court of Appeal, Fourth District, Division Two.
May 4, 2001.
Review Denied August 15, 2001.[**]
*448 Patrick Morgan Ford, under appointment by the Court of Appeal, San Diego, for Defendant and Appellant.
Bill Lockyer, Attorney General, David P. Druliner, Chief Assistant Attorney General, Gary W. Schons, Senior Assistant Attorney General, Janelle M. Boustany, Supervising Deputy Attorney General, and Sabrina Y. Lane-Erwin, Deputy Attorney General, for Plaintiff and Respondent.
Certified for Partial Publication.[*]

OPINION
GAUT, J.
Defendant Rafael Garcia Alvarez, Jr. appeals from judgment entered against him for murder (count I),[1] assault with a firearm (count II),[2] and resisting a peace officer (count III).[3] The jury further found true allegations that, as to count I, defendant intentionally discharged a firearm *449 causing death[4] (firearm enhancement) and, as to count II, he personally used a firearm.[5]
The court sentenced defendant to a prison term of 50 years to life, comprised of 25 years to life for first degree murder and 25 years to life for the firearm enhancement on count I.
Defendant contends the trial court prejudicially erred in admitting gang evidence since the murder was not gang related and the evidence should have been excluded under Evidence Code section 352 as highly inflammatory. Defendant further contends the 25-years-to-life firearm enhancement violated his equal protection rights because similarly situated murderers using other deadly weapons are not subject to the same harsh penalty.
We conclude the trial court did not abuse its discretion in allowing the gang evidence because it was relevant to motive and witness credibility, and, hence, its probative value outweighed its prejudicial nature. We further reject defendant's contention that imposition of the firearm enhancement violated his equal protection rights. We accordingly affirm the judgment.

Facts and Procedural Background
During the evening of July 10, 1998, defendant shot Eric Rios in the stomach, and then, after Rios fell to the ground, either defendant or Noe Contreras shot Rios twice in the head. The events leading up to this murder are as follows.
On July 10, 1998, at around 10:00 p.m., a group of people gathered in Contreras's garage and drank beer. The group included defendant, who was a Southside Beaumont gang member (or, according to defendant, had been a member but was no longer one), and fellow gang members, Noe Contreras and Steven Teti, and at least two other gang members. Also present were Rios and his nephew, Phillip Martinez, who were not gang members.
Around 11:00 p.m., while outside Contreras's garage, Martinez asked Contreras to pay him back $10. Contreras said he did not have the money and became angry at Martinez for demanding the money in an embarrassing manner. Rios, who was standing nearby, interjected, "Where is my nephew's money?" Contreras said he would pay Martinez later. While still arguing with Rios, Contreras returned to the garage and mentioned something to defendant which upset him. Defendant stated that "[Rios] doesn't want to mess with me [or us]," and "He doesn't know us [or me]." Defendant then pulled out a gun, cocked it, walked out of the garage, and stood next to Contreras. Rios and Contreras were yelling at each other. According to the testimony of a friend of Contreras, Frank Madren, Contreras was holding a screwdriver-like object. Contreras and defendant testified that Rios pulled out a knife but dropped it. As Rios turned away from defendant, defendant shot Rios in the abdomen. Rios fell to the ground. Defendant or Contreras then shot Rios twice in the head.
According to defendant's and Contreras's trial testimony, Rios tried to grab defendant's gun and, while Rios and defendant were struggling over the gun, defendant accidentally discharged the gun into Rios's stomach.
Defendant testified that, when Rios fell to the ground, defendant lost his balance and fell, and dropped the gun. According to defendant, Contreras picked up the gun *450 and shot Rios twice in the head. But according to the testimony of Frank Madren, who saw defendant fire the first shot into Rios's stomach, but not the second and third shots, Contreras ran away right after defendant fired the first shot and did not have a gun. Madren further testified that the second and third shots were fired after Contreras ran away and it sounded as if the second and third shots were fired from the same location as the first shot.
During the trial, Detective Assumma testified as a gang expert. He stated that Teti, Contreras, and defendant were members of the Southside Beaumont gang, and that officers found gang "roll calls" in which Contreras's name had been crossed out, indicating that the gang disliked him and his life was threatened.
Assumma further testified regarding gang culture, noting that the more outrageous and violent a gang member is, and the more a gang member is feared, the more respect the member receives within the gang. But if a gang member testifies against another gang member, he probably will be killed by a fellow gang member.
Assumma also testified that, in his opinion, Rios's demand for money from Contreras showed disrespect for defendant and his gang. By standing up for Contreras and killing Rios, defendant increased his respect in the gang. Assumma concluded that the murder was therefore gang related.

2. Admission of Gang Evidence[***]

3. Firearm-Use Enhancement

Defendant contends the 25-years-to-life firearm enhancement, under section 12022.53, subdivision (d), violated his equal protection rights under the federal and state Constitutions. The federal and state Constitutions' equal protection provisions are similar in scope and effect.[14] They guarantee that persons similarly situated shall be treated equally under the law.[15]
Here, a jury convicted defendant of murder and found, pursuant to section 12022.53, subdivision (d), that defendant personally and intentionally discharged a firearm causing death. The court sentenced defendant to 25 years to life for first degree murder and 25 years to life for the firearm enhancement. Defendant claims that the firearm enhancement sentence violated his right to equal protection rights under the federal and state Constitutions because similarly situated murderers using other kinds of deadly weapons are not subjected to as harsh a penalty as the firearm enhancement.
In general, a denial of equal protection occurs when the state adopts a classification that affects similarly situated groups or individuals in an unequal manner.[16] "Statutes challenged under the equal protection clause will receive differing levels of scrutiny depending upon the nature of the distinctions they establish. Legislation which creates a suspect classification or impinges on the exercise of a fundamental right is subject to strict scrutiny and will be upheld only if it is necessary to further a compelling state interest. All other legislation will satisfy constitutional requirements if it bears a rational relationship to a legitimate state purpose." [17]
*451 In the instant case, defendant argues that the firearm enhancement impinges on a fundamental right, that of liberty, and thus strict scrutiny applies. The People, on the other hand, claims that the lower rational basis standard applies. In People v. Olivas,[18] the California Supreme Court applied the strict scrutiny standard and found it was a denial of equal protection to charge, try, and convict a juvenile offender in adult court and then commit that person to the Youth Authority for a longer term than for an adult convicted of the same offense but sentenced to prison.[19]
In discussing the Olivas case, the court in People v. Bell[20] noted that "We find a lack of clarity and consistency in the cases dealing with the equal protection analysis of penal statutes. Olivas did not deal with a statute creating a crime but was concerned rather with a law which results in greater punishment for separate defendants convicted of the same crime in the same court based solely on the ages of the defendants. Still, Olivas states that liberty is a fundamental interest and requires that the strict scrutiny test be applied to equal protection claims when liberty is affected. Courts since Olivas have applied that concept narrowly...."[21]
While the court in People v. Hernandez[22] recognized that liberty is a fundamental interest, the court applied the rational basis standard. In Hernandez the defendant complained that giving greater weight to an in-state prior than an out-of-state prior for the purpose of a section 667.5 sentence enhancement violated his equal protection rights. The court noted that there is a qualitative difference "between the initial interest one has in retaining his liberty prior to sentencing and the interest one has in whether or not an enhancement applies."[23]
In People v. Flores[24], the defendant, who was convicted of attempted second degree murder, complained that his equal protection rights were violated because he received the same sentence as someone convicted of attempted first degree murder. The Flores court concluded the rational basis standard applied because "The decision of how long a particular term of punishment should be is left properly to the Legislature. The Legislature is responsible for determining which class of crimes deserves certain punishments and which crimes should be distinguished from others. As long as the Legislature acts rationally, such determinations should not be disturbed. [¶] ... Appellant does not have a fundamental interest in a specific term of imprisonment or in the designation a particular crime receives."[25]
*452 Relying on Hernandez and Flores, the court in People v. Silva[26] concluded that the defendant's equal protection challenge, based on an alleged sentencing disparity, was subject to the rational basis challenge.[27] The defendant, who was convicted of spousal abuse, complained that the spousal abuse statute violated his equal protection rights because the statute permitted a lesser showing of harm for conviction and imposed a greater penalty than felony battery or felony assault statutes.
The instant case also involves an alleged sentencing disparity. Defendant complains he is being more severely punished for murder with a firearm than those who commit the same offense with a weapon other than a firearm. Thus, under Hernandez, Flores and Silva, the rational basis standard applies.
Even if we assume, without deciding, that the strict scrutiny standard applies under Olivas,[28]People v. Williams,[29] and People v. Jacobs,[30] defendant's equal protection claim fails because there is a compelling purpose for the firearm enhancement.
The firearm enhancement provision in question, section 12022.53, also known as the "10-20-life" law, was enacted in 1997 to increase substantially the penalties for using a firearm in the commission of designated serious felonies.[31] "The Legislature found `that substantially longer prison sentences must be imposed on felons who use firearms in the commission of their crimes, in order to protect our citizens and deter violent crime.'"[32]
In People v. Martinez,[33] the defendant argued that the firearm enhancement under section 12022.53 constituted cruel and unusual punishment in violation of the federal and state Constitutions. The Martinez court disagreed, concluding that the ease with which a victim of one of the serious felonies listed in section 12022.53, could be killed or injured by means of a firearm supported a legislative distinction treating firearm offenses more harshly than the same crimes committed by other means.[34]
While we recognize the Martinez defendant challenged the section 12022.53, subdivision (d) firearm enhancement not on equal protection grounds, but, rather, on cruel and unusual punishment grounds, the rationale relied upon supports a determination here that there is a compelling state interest for the provision.
The Martinez court noted that, in evaluating the constitutionality of a statute, "The judicial inquiry commences with great deference to the Legislature. Fixing the penalty for crimes is the province of the Legislature, which is in the best position *453 to evaluate the gravity of different crimes and to make judgments among different penological approaches."[35]
The Martinez court went on to explain that "[s]ection 12022.53 as a whole represents a careful gradation by the Legislature of the consequences of gun use in the commission of serious crimes. The section is limited, in the first place, to convictions of certain very serious felonies. [Fn. omitted.] The statute then sets forth three gradations of punishment based on increasingly serious types and consequences of firearm use in the commission of the designated felonies: 10 years if the defendant merely used a firearm, 20 years if the defendant personally and intentionally discharged it, and 25 years to life if the defendant's intentional discharge of the firearm proximately caused great bodily injury. Furthermore, the provision in question is an enhancement to the base term for the underlying conviction; a trial court retains flexibility as to fixing the underlying base term for attempted murder."[36]
Based on this evaluation of section 12022.53, we conclude subdivision (d) of that section meets the strict scrutiny test in that there are compelling state interests for the provision and such interests could not be addressed by less restrictive means. The provision only applies to certain specified serious felonies committed by use of a firearm, and the length of the sentence is based on the gravity of the harm. The Martinez court scrutinized section 12022.53 and concluded that the provision was reasonably written in furtherance of its purpose of deterring gun use in the commission of serious crimes.
The Martinez case is further instructive in addressing the same comparison argument raised in the instant case. In Martinez the defendant argued that the provision was unconstitutional based on "a comparison of the punishment for this offense with the statutory punishment in California for other offenses."[37] The Martinez defendant noted that, "if he had committed this offense with a knife, rather than a gun, the enhancements for knife use and inflicting great bodily injury would be only four years ( §§ 12022, subd. (b), 12022.7, subd. (a)) rather than 25 years to life."[38] This is, in essence, the basis of defendant's equal protection argument in the instant case, although the Martinez defendant complained that such inequity constituted cruel and unusual punishment, rather than violation of equal protection rights.
The Martinez court rejected the defendant's contention, stating that other enhancement provisions, such as section 12022 (committing a felony with a firearm or deadly weapon) and section 12022.7 (infliction of great bodily harm), "may not be compared to section 12022.53, because they enhance the sentence for `any felony,' whereas section 12022.53 is limited to designated felonies of a very serious type.... More significantly, the Legislature determined in enacting section 12022.53 that the use of firearms in commission of the designated felonies is such a danger that, `substantially longer prison sentences must be imposed ... in order to protect our citizens and to deter violent crime.' The ease *454 with which a victim of one of the enumerated felonies could be killed or injured if a firearm is involved clearly supports a legislative distinction treating firearm offenses more harshly than the same crimes committed by other means, in order to deter the use of firearms and save lives."[39]
Likewise, we conclude here that the distinction between the firearm enhancement under section 12022.53, subdivision (d), and other less harsh enhancements punishing offenders for using weapons, is justified and does not violate defendant's equal protection rights. Section 12022.53, subdivision (d) targets more serious offenses than those included in the other enhancement provisions.
Defendant requests judicial notice of the Attorney General's official crime statistics showing that violent crime has decreased since the early 1990's. Defendant seeks to introduce these statistics to show that there was no compelling need to enact tougher weapon use enhancements, such as section 12022.53, subdivision (d). We deny defendant's judicial notice request on the ground such statistics are not necessary or relevant to the resolution of this case. Serious felonies committed by firearms continue to be committed, as in the instant case, and thus there continues to be a need to deter such crimes. Section 12022.53, subdivision (d) serves that compelling purpose, and it has not been established that there is any less restrictive provision that would as effectively target the type of crime specified in section 12022.53, subdivision (d). We thus conclude the firearm enhancement under section 12022.53, subdivision (b) is not violative of defendant's constitutional equal protection rights.

4. Disposition

The judgment is affirmed.
McKINSTER, Acting P.J., and RICHLI, J., concur.
NOTES
[*]   Pursuant to California Rules of Court, rules 976(b) and 976.1, this opinion is certified for publication with the exception of part 2.
[**]   George, C.J., and Werdegar, J., did not participate therein.
[1]  Penal Code section 187. Unless otherwise noted, all statutory references are to the Penal Code.
[2]  Section 245, subdivision (a)(2).
[3]  Section 148.
[4]  Sections 12022.53, subdivision (d) and 1192.7, subdivision (c)(8).
[5]  Sections 12022.5, subdivision (a) and 1192.7, subdivision (c)(8).
[***]   See footnote *, ante.
[14]  Brown v. Merlo (1973) 8 Cal.3d 855, 861, 106 Cal.Rptr. 388, 506 P.2d 212.
[15]  In re Eric J. (1979) 25 Cal.3d 522, 531, 159 Cal.Rptr. 317, 601 P.2d 549.
[16]  People v. Bell (1996) 45 Cal.App.4th 1030, 1046, 53 Cal.Rptr.2d 156, citing People v. Barrera (1993) 14 Cal.App.4th 1555, 1565, 18 Cal.Rptr.2d 395.
[17]  People v. Silva (1994) 27 Cal.App.4th 1160, 1167, 33 Cal.Rptr.2d 181; see also People v. Bell, supra, 45 Cal.App.4th at pp. 1046-1047, 53 Cal.Rptr.2d 156.
[18]  People v. Olivas (1976) 17 Cal.3d 236, 131 Cal.Rptr. 55, 551 P.2d 375.
[19]  People v. Bell, supra, 45 Cal.App.4th at pp. 1047-1048, 53 Cal.Rptr.2d 156.
[20]  People v. Bell, supra, 45 Cal.App.4th 1030, K53 Cal.Rptr.2d 156.
[21]  People v. Bell, supra, 45 Cal.App.4th at p. 1048, 53 Cal.Rptr.2d 156.
[22]  People v. Hernandez (1979) 100 Cal.App.3d 637, 160 Cal.Rptr. 607.
[23]  People v. Hernandez, supra, 100 Cal.App.3d at p. 644, fn. 2, 160 Cal.Rptr. 607.
[24]  People v. Flores (1986) 178 Cal.App.3d 74, 223 Cal.Rptr. 465.
[25]  People v. Flores, supra, 178 Cal.App.3d at p. 88, 223 Cal.Rptr. 465.
[26]  People v. Silva, supra, 27 Cal.App.4th 1160, 33 Cal.Rptr.2d 181.
[27]  People v. Silva, supra, 27 Cal.App.4th at p. 1168, 33 Cal.Rptr.2d 181; see also People v. Perez (2001) 86 Cal.App.4th 675, 678-680, 103 Cal.Rptr.2d 533.
[28]  People v. Olivas, supra, 17 Cal.3d 236, 131 Cal.Rptr. 55, 551 P.2d 375.
[29]  People v. Williams (1983) 140 Cal.App.3d 445, 450, 189 Cal.Rptr. 497.
[30]  People v. Jacobs (1984) 157 Cal.App.3d 797, 801, 204 Cal.Rptr. 234.
[31]  People v. Martinez (1999) 76 Cal.App.4th 489, 493, 90 Cal.Rptr.2d 517.
[32]  People v. Martinez, supra, 76 Cal.App.4th at p. 493, 90 Cal.Rptr.2d 517, quoting Statutes 1997, ch. 503, § 1.
[33]  People v. Martinez, supra, 76 Cal.App.4th 489, 90 Cal.Rptr.2d 517.
[34]  People v. Martinez, supra, 76 Cal.App.4th at p. 497, 90 Cal.Rptr.2d 517.
[35]  People v. Martinez, supra, 76 Cal.App.4th at p. 494, 90 Cal.Rptr.2d 517.
[36]  People v. Martinez, supra, 76 Cal.App.4th at p. 495, 90 Cal.Rptr.2d 517.
[37]  People v. Martinez, supra, 76 Cal.App.4th at p. 497, 90 Cal.Rptr.2d 517.
[38]  People v. Martinez, supra, 76 Cal.App.4th at p. 497, 90 Cal.Rptr.2d 517.
[39]  People v. Martinez, supra, 76 Cal.App.4th at pp. 497-98, 90 Cal.Rptr.2d 517.
