On or about June 28, 1989, the defendant was charged with one count of criminal sale of a controlled substance in the first degree and one count of criminal possession of a controlled substance in the first degree in connection with the sale of cocaine to an undercover police officer. On December 4, 1989, after lengthy plea negotiations in which the defendant endeavored to secure the District Attorney’s recommendation for a sentence of lifetime probation, he agreed to plead guilty to the reduced charge of criminal sale of a controlled substance in the second degree in exchange for a commitment to impose sentence of an indeterminate term of three years to life imprisonment, the minimum period of incarceration permitted upon a conviction of a class A-II felony.
During the plea allocution, the defendant admitted that he *672had, while acting with another, sold a quantity of cocaine in excess of two ounces to an undercover police officer. The defendant’s attorney asked the court to defer formal acceptance of the plea because he wished to have his client continue cooperating with law enforcement authorities, and wanted to leave open the possibility that the District Attorney would recommend a sentence of lifetime probation. Since all believed that formal acceptance of the plea required the revocation of the defendant’s bail status pursuant to CPL 530.40 (3), the court, with the consent of the People, agreed to defer formal acceptance of the plea in order to give the defendant the opportunity to continue providing assistance to the police. The matter was adjourned to January 9, 1990, to allow the People to monitor the level of assistance provided by the defendant.
On January 9, 1990, the District Attorney advised the court and the defendant that the level of cooperation had been insufficient and would not result in a recommendation of lifetime probation (see, People v D’Amico, 147 Misc 2d 731, 734). At this time, the defendant requested an adjournment to put his affairs in order but did not move to vacate his plea. Prior to sentencing on July 2, 1990, the undercover officer involved in the sale with the defendant was murdered. The defendant then took the position that a valid plea was never entered and that he was entitled to a trial of the original charges. Alternatively, he moved to vacate the plea in the interests of justice. By decision and order dated May 17, 1990, the court denied the motion, concluding that a valid plea had been offered. The plea was thereupon formally accepted. On July 2, 1990, the court imposed sentence in accordance with the plea agreement (see, People v D’Amico, supra).
The defendant waived his claim that there was a defect in the proceedings, since the formal acceptance of his plea was deferred at his specific request (cf., People v D’Amico, 150 AD2d 276, 279-280, affd 76 NY2d 877). In any event, the totality of the circumstances demonstrates that the plea was validly offered at the plea allocution on December 4, 1989. At that time, the defendant expressly agreed to plead guilty to the reduced charge of criminal sale of a controlled substance in the second degree based upon a commitment to impose sentence of an indeterminate term of three years to life imprisonment. At his lawyer’s request, formal acceptance of the plea was deferred so that the defendant might remain at liberty in the hope that he would be able to assist the police in such a significant manner that a sentence of lifetime proba*673tion would be recommended. The court’s action in temporarily deferring formal acceptance of the plea was for the limited purpose of giving the defendant the additional time at liberty that he sought. It did not vitiate the validity and enforceability of the plea agreement. The defendant received the benefit of the promises that were made on December 4, 1989. After the defendant failed to meet the condition for imposition of a sentence of lifetime probation, the court properly acted to formally accept his plea, and thereupon to impose a sentence of three years to life imprisonment in accordance with the original plea agreement (cf., People v Gordon, 162 AD2d 343). The court properly exercised its discretion in denying the defendant’s motion to withdraw the plea (see, People v Jones, 44 NY2d 76, 81, cert denied 439 US 846). Kunzeman, J. P., Sullivan, Eiber and Ritter, JJ., concur.