Appeal by the People from a sentence of the County Court, Rockland County (Resnik, J.), imposed March 22, 2005, upon the defendant’s conviction of criminal sale of a controlled substance in the third degree (two counts), and criminal possession of a controlled substance in the third degree (two counts), *828upon his plea of guilty, the sentence being four concurrent determinate terms of 3V2 years, to be followed by a three-year period of postrelease supervision.
Ordered that the sentence is reversed, on the law, and the matter is remitted to the County Court, Rockland County, for resentencing in accordance herewith.
The defendant committed the crimes to which he pleaded guilty before January 13, 2005, the effective date of the Drug Law Reform Act (L 2004, ch 738; hereinafter DLRA), but was sentenced after January 13, 2005, the effective date of the statute. On February 8, 2005 the defendant entered a plea of guilty to four drug-related offenses, based on the understanding that he would be sentenced under the DLRA to four concurrent determinate terms of imprisonment of 3V2 years. The People declined to participate in the plea bargain, contending that, under the law in effect at the time the crimes were committed, the minimum legal sentence would be an indeterminate term of imprisonment of four and one-half to nine years. On March 22, 2005 the County Court sentenced the defendant in accordance with the promise made at the time of his plea of guilty.
For the reasons set forth in People v Goode (25 AD3d 723 [2006]), the sentence imposed upon the defendant was invalid as a matter of law, and the defendant must be resentenced under the law applicable at the time of the commission of the offenses (see People v Torres, 26 AD3d 398 [2006]; People v Nelson, 21 AD3d 861, 862 [2005], lv granted 6 NY3d 757 [2005]). Adams, J.P., Mastro, Fisher and Covello, JJ., concur.