Appeal by the defendant, as limited by her motion, from a sentence of the Supreme Court, Queens County (Corrado, J.), imposed October 25, 1988, upon her conviction of criminal possession of a controlled substance in the second degree, upon her plea of guilty, the sentence being an indeterminate term of five years’ to life imprisonment.
Ordered that the sentence is vacated, on the law, and the matter is remitted to the Supreme Court, Queens County, for resentencing.
Pursuant to a negotiated plea agreement, the defendant entered a plea of guilty to criminal possession of a controlled substance in the second degree in satisfaction of the indictment. The terms of the plea agreement called for a term of from five years’ to life imprisonment. During the plea allocution the court indicated in substance that the specified term was mandatory and it was constrained by law to impose that term. However, because the sentence promised was not the minimum permissible term for a class A-II felony offense, the court had discretion to impose a more lenient sentence than the one agreed to as part of the bargain if the facts so warranted. Due to the ambiguity in the record as to whether the court was operating under a mistaken belief as to the permissible range of sentences or its authority to impose a more lenient term than the one promised, we remit this matter for resentencing to permit the court to exercise its discretion (see, e.g., People v Graybosch, 139 AD2d 664; People v Montoya, 138 AD2d 528). Our determination should not be read as holding that the sentence imposed was excessive. If upon remittal the court should determine that a sentence *564more lenient than the one negotiated is appropriate, the court may entertain a motion by the People to withdraw their consent to the plea agreement (see, People v Farrar, 52 NY2d 302, 307-308; People v Montoya, supra). Thompson, J. P., Kunzeman, Sullivan and Miller, JJ., concur.