John J. Flynn, District Attorney, Buffalo (Michael J. Hillery of Counsel), for Appellant. Thomas J. Eoannou, Buffalo, for Defendant-Respondent. Appeal from an order of the Supreme Court, Erie County (Paul Wojtaszek, J.), dated November 29, 2022, in a proceeding pursuant to CPL 440.20. The order granted the motion of defendant to set aside the sentence imposed as a second felony offender. It is hereby ORDERED that the order so appealed from is unanimously affirmed. Opinion by Bannister, J.: The question presented on this appeal is whether defendant, who was sentenced as a second felony offender on the basis of a prior felony marihuana conviction, is entitled to resentencing after successfully moving pursuant to CPL 440.46-a to vacate the prior felony marihuana conviction and have substituted therefor a misdemeanor conviction. We conclude that defendant is entitled to be resentenced. I In August 2019, defendant entered a plea of guilty to criminal possession of a weapon in the second degree (Penal Law § 265.03 [3]) and was sentenced as a second felony offender to a determinate sentence of five years, followed by five years of postrelease supervision. His status as a second felony offender was based on a January 2013 conviction for criminal possession of marihuana in the second degree, which at that time was a felony (former § 221.25). After defendant’s sentencing, the legislature enacted the Marihuana Regulation and Taxation Act (MRTA), effective March 31, 2021, which repealed Penal Law article 221 and enacted in its place article 222 (see L 2021, ch 92, §§ 15-16). Under the newly enacted law, the conduct addressed by former section 221.25 was covered by section 222.30 (1), criminal possession of cannabis in the third degree, a class A misdemeanor. MRTA provides a procedural mechanism for a person, such as defendant, who has completed serving a sentence for a conviction under Penal Law former article 221 to petition the court of conviction for vacatur of that conviction where, as relevant here, the person would have been guilty of a lesser or potentially less onerous offense under article 222 than under former article 221 (see CPL 440.46-a [2] [a] [ii]). Under those circumstances, “the court after affording the parties an opportunity to be heard and present evidence, may substitute, unless it is not in the interests of justice to do so, a conviction for an appropriate lesser offense under article [222] of the penal law” (CPL 440.46-a [2] [b] [ii]). Defendant successfully moved to vacate his January 2013 felony conviction, and Supreme Court (Eagan, J.) replaced that conviction with a conviction under Penal Law § 222.30. Thereafter, defendant moved pursuant to CPL 440.20 to vacate the sentence imposed for his 2019 conviction. He contended that the vacatur of his prior felony marihuana conviction invalidated the enhanced sentence imposed for his 2019 conviction, which was based on the prior felony conviction. The People now appeal from an order of Supreme Court (Wojtaszek, J.) that granted defendant’s motion to set aside the sentence for his 2019 conviction and resentenced him as a first felony offender to 3 1/2 years in prison and 3½ years of postrelease supervision. II The People contend on appeal that defendant was not entitled to have his 2019 sentence set aside because defendant’s sentence on the felony marihuana conviction was legal when it was imposed in 2013 and the change in law by which his prior marihuana conviction was reduced from a felony to a misdemeanor does not apply retroactively to invalidate his second felony offender sentence. We reject the People’s assertion and conclude that MRTA does apply retroactively for predicate felony purposes when a defendant successfully uses the procedural mechanism provided under CPL 440.46-a to vacate the predicate felony conviction. Generally, nonprocedural statutes “are not to be applied retroactively absent a plainly manifested legislative intent to that effect” (People v Oliver, 1 NY2d 152, 157 [1956]). There is an exception, however, when the legislature passes an ameliorative amendment that reduces the punishment for a particular crime (see People v Behlog, 74 NY2d 237, 240 [1989]; Oliver, 1 NY2d at 159-160). This Court recently considered the possible retroactive application of other statutory provisions of MRTA and noted that “where the legislature intended for the new laws regulating marihuana to have retroactive effect, it clearly specified so” (People v Vaughn, 203 AD3d 1729, 1730 [4th Dept 2022], lv denied 38 NY3d 1036 [2022], citing CPL 440.46-a). III The legislature clearly afforded retroactive relief to certain defendants, like defendant here, when it provided a statutory mechanism for the vacatur or substitution of certain prior felony marihuana offenses (see CPL 440.46-a). Relevantly, CPL 440.46-a (3) states that “[u]nder no circumstances may substitution under this section result in the imposition of a term of imprisonment or sentencing term, obligation or condition that is in any way either harsher than the original sentence or harsher than the sentence authorized for any substituted lesser offense.” Further, CPL 440.46-a (4) (c) provides in part that “[w]hen a felony conviction is vacated pursuant to this section and a lesser offense that is a misdemeanor or violation is substituted for such conviction, such lesser offense shall be considered a misdemeanor or violation, as the case may be, for all purposes” (emphasis added). It is clear that those provisions of MRTA were intended to be ameliorative (see CPL 440.46-a [1]; see also L 2021, ch 92, § 2). Indeed, one of the stated purposes of the Cannabis Law enacted as part of MRTA was “to lower social barriers for individuals who had come into contact with the criminal justice system over their involvement in the world of cannabis during the prohibition [e]ra,” and the vacatur and resentencing provisions of CPL 440.46-a are intended to serve that goal (Sponsor’s Mem in Support of 2023 NY Senate Bill S7505, enacted as L 2023, ch 468, § 1, eff. Sept. 15, 2023, deemed eff. March 31, 2021). By providing the procedural mechanism for vacating or reducing marihuana convictions, the legislature necessarily determined that those crimes no longer serve, or that the lesser penalty sufficiently serves, the legitimate demands of the criminal law (see Behlog, 74 NY2d at 240). In turn, we conclude that one of the “purposes” (CPL 440.46-a [4] [c]) served in substituting the misdemeanor for the felony conviction is to allow for the retroactive amelioration of a predicate felony sentence. Moreover, permitting a vacated felony marihuana crime to serve as a predicate felony for the harsher penalty imposed on a second felony offender would contradict the purpose of the statutory provisions. IV Accordingly, we conclude that the court properly vacated defendant’s 2019 sentence and resentenced defendant as a first-time felony offender, and we therefore affirm the order.