
    The People of the State of New York, Respondent, v Christopher Maglione, Appellant.
    [759 NYS2d 174]
   —Appeal by the defendant from a judgment of the Supreme Court, Kings County (Ferdinand, J.), rendered December 14, 2001, convicting him of criminal sale of a controlled substance in the fifth degree, upon his plea of guilty, and imposing sentence.

Ordered that the judgment is modified, on the law, by vacating the sentence imposed thereon; as so modified, the judgment is affirmed, and the matter is remitted to the Supreme Court, Kings County, for resentencing in accordance herewith.

The general waiver of the right to appeal that the defendant executed does not bar his contention that he was improperly sentenced as a second felony offender, since this constitutes a challenge to the legality of the sentence (see People v Callahan, 80 NY2d 273 [1992]; People v Mann, 258 AD2d 738 [1999]; People v Pabon, 224 AD2d 721 [1996]). Moreover, this contention is meritorious.

In exchange for his plea to criminal sale of a controlled substance in the fifth degree, the defendant was promised that he could avoid jail time and would be allowed to enter a drug treatment program. This arrangement was conditioned upon, inter alia, the defendant’s successful completion of the program and his assurance that he had not previously been convicted of a felony. However, the defendant did not complete the drug treatment program, and soon after the plea was accepted, he was arrested in New Jersey for burglary. Thereafter the court learned that the defendant had five prior convictions, all in New Jersey. One of the convictions, at issue here, was pursuant to a statute entitled “Certain persons not to have weapons” (NJ Stat § 2C:39-7 [b]). This statute provides that a person who has been previously convicted of certain crimes (including burglary) is “guilty of a crime in the second degree” if he or she possesses a “firearm.”

In response to the defendant’s motion challenging predicate felony status, the sentencing court concluded that the “[d]efendant’s possession of a firearm in New Jersey qualifies as a weapon under [Penal Law] § 265.01 [and] [therefore Certain Persons Not to Have Weapons * * * is equivalent to the New York felony of Criminal Possession of a Weapon in the third degree” (see Penal Law § 265.02 [1] [a class D felony]). In pertinent part, criminal possession of a weapon in the third degree is defined as the possession of a “firearm” by one who has been previously convicted of a crime.

A foreign conviction will be considered a predicate felony conviction in New York where the foreign conviction carries with it “a sentence of imprisonment in excess of one year and for which New York law would also authorize imposition of a sentence in excess of one year” (People v Sailor, 65 NY2d 224, 237 [1985], cert denied 474 US 982 [1985]; see Penal Law § 70.06; People v Gonzalez, 61 NY2d 586, 589 [1984]). Accordingly, the foreign crime must be equivalent to a New York felony (see People v Gonzalez, supra). To determine whether a foreign crime is the equivalent of a New York felony, the court must examine the elements of the foreign statute and compare them with the analogous Penal Law felony (see People v Muniz, 74 NY2d 464 [1989]; People v Gonzalez, supra; People v Garrett, 130 AD2d 505 [1987]).

In this case the elements of the two crimes did not coincide, since New York’s definition of a “firearm” is given a more limited meaning by Penal Law § 265.00 (3) than “firearm” in New Jersey which includes any rifle or shotgun (NJ Stat § 2C:39-1 [f|). Thus, the New Jersey statute encompasses conduct which would not be considered a felony in New York (see People v Trudo, 153 AD2d 994; People v Burgos, 97 AD2d 826 [1983]). Accordingly, the New Jersey conviction cannot be used to support a finding that the defendant was a prior felony offender, and he must be resentenced. Santucci, J.P., Smith, McGinity and Schmidt, JJ., concur.  