Appeal by the People from a sentence of the Supreme Court, Queens County (Browne, J.), imposed November 22, 1991, the sentence being a lifetime term of probation, upon the defendant’s conviction of attempted criminal possession of a controlled substance in the first degree, after a plea of guilty.
Ordered that the sentence is reversed, on the law, and the matter is remitted to the Supreme Court, Queens County, for further proceedings consistent herewith.
The defendant pleaded guilty to attempted criminal possession of a controlled substance in the first degree, an A-I felony (see, Penal Law § 110.05 [1]). The plea agreement, initially struck between the defendant and the People, and accepted by the court, included a promise by the court to sentence the *753defendant to an indeterminate term of four years to life imprisonment. This sentence could not have been legally imposed, as the minimum term could be no less than 15 years (see, Penal Law § 70.00 [3] [a] [i]). The People correctly argue that the lesser sentence of lifetime probation ultimately imposed was illegal, but it was no more illegal than the sentence to which the People initially had agreed. Consequently, the matter not only must be remitted for resentencing, but both parties must be given an opportunity to withdraw from the original plea agreement (see, People v Farrar, 52 NY2d 302, 307-308).
We have examined the defendant’s contentions and find them to be without merit. Mangano, P. J., Balletta, Miller, Copertino and Santucci, JJ., concur.