*842Appeals by the defendant from two judgments of the Supreme Court, Westchester County (Molea, J.), both rendered July 24, 2007, convicting him of criminal possession of a controlled substance in the third degree under indictment No. 06-1193 and criminal sale of a controlled substance on or near school grounds under indictment No. 06-1299, upon his pleas of guilty, and imposing sentences.
Ordered that the judgments are affirmed.
The defendant was sentenced as a second violent felony offender based upon his prior conviction of attempted criminal possession of a weapon in the third degree, arising from his possession of a loaded semi-automatic handgun (see Penal Law § 265.02 [former (4)]). With respect to that charge, the defendant agreed to waive indictment and be prosecuted by a superior court information charging him, in count one, with criminal possession of a weapon in the third degree and charging him, in count two, with attempted criminal possession of a weapon in the third degree as a lesser included offense of count one. In that matter, the defendant pleaded guilty to attempted criminal possession of a weapon in the third degree “to cover all charges contained therein.” The County Court explained to the defendant that “you were charged with Criminal Possession of a Weapon in the Third Degree . . . you are pleading guilty to Attempted Criminal Possession of a Weapon in the Third Degree,” with a lesser prescribed term of imprisonment. The defendant acknowledged during the plea allocution in that matter that his conviction was for a class E violent felony offense.
Pursuant to Penal Law § 70.02 (1) (d), attempted criminal possession of a weapon in the third degree is a class E violent felony offense if it is “a lesser included offense,” as defined in CPL 220.20, of criminal possession of a weapon in the third degree, as defined in certain subdivisions of Penal Law § 265.02. CPL 220.20 (1) defines “lesser included offense” as “an offense of lesser grade than one charged in a count of an indictment” to which a defendant pleads guilty. Penal Law § 70.02 (1) (d) was *843enacted as part of L 1980, ch 233, in an effort to strengthen the criminal penalties for illegal handgun possession and restrict the avoidance of those increased criminal penalties by plea bargaining (see 1980 NY Legis Ann, at 105). If a defendant pleads guilty to attempted criminal possession of a weapon in the third degree to avoid the harsher penalty applicable to the class D violent felony offense of criminal possession of a weapon in the third degree, attempted criminal possession of a weapon in the third degree constitutes a violent felony offense (see People v Tolbert, 93 NY2d 86, 88 [1999]).
In People v Dickerson (85 NY2d 870, 871 [1995]), the Court of Appeals determined that a plea of guilty to attempted criminal possession of a weapon in the third degree, when charged in “the top count” of a superior court information, did not constitute a violent felony pursuant to Penal Law § 70.02 (1) (d). In its decision, the Court stated that “the plain statutory language” provides that attempted criminal possession of a weapon in the third degree is only a violent felony when the accused pleads guilty to that crime “as a lesser included offense under an indictment charging a greater offense” (People v Dickerson, 85 NY2d at 872). Accordingly, a plea of guilty to attempted criminal possession in the third degree, when the crime is charged as the top count or the only count in an accusatory instrument, is not a conviction of a violent felony offense (see People v Banuchi, 304 AD2d 402 [2003]; People v Williams, 290 AD2d 570 [2002]; People v Williams, 289 AD2d 117 [2001]).
In the instant case, the defendant pleaded guilty to attempted criminal possession of weapon in the third degree under a superior court information charging the greater offense of criminal possession of a weapon in the third degree. Although attempted criminal possession of a weapon in the third degree was charged in a separate count of the superior court information, the defendant’s argument that his prior conviction does not constitute a violent felony offense because it was charged separately is not supported by the relevant case law, the legislative purpose of L 1980, ch 233, or the statutory language. CPL 220.20 (1) defines “lesser included offense” as “an offense of lesser grade than one charged in a count of an indictment” (emphasis supplied), not of a lesser grade than all counts charged. Since attempted criminal possession of a weapon in the third degree was not charged as the only count or the top count, but rather, was a lesser-included offense of the top count, the defendant’s conviction of that offense constitutes a conviction of a class E violent felony offense. Accordingly, the defendant’s contention that he should not have been sentenced *844as a second violent felony offender is without merit. Skelos, J.P, Santucci, Covello, McCarthy and Chambers, JJ., concur.