Ordered that the judgment is modified, on the law, by vacating the sentence imposed on the conviction of criminal possession of a weapon in the third degree; as so modified, the judgment is affirmed, and the matter is remitted to the County Court, Suffolk County, for resentencing on that count.
As the People correctly concede, the determinate sentence of seven years of imprisonment with five years of postrelease supervision, imposed on the defendant as a second felony offender upon his conviction of criminal possession of a weapon in the third degree under Penal Law § 265.02 (1), a nonviolent class D felony, was illegal ( see Penal Law § 70.06 [d]; [4] [b]). Thus, we vacate the sentence imposed on that conviction, and remit the matter to the County Court, Suffolk County, for resentencing thereon ( see People v Jackson, 65 AD3d 1164, 1165; People v Switzer, 55 AD3d 1394, 1395; People v Penna, 47 AD3d 844, 845).