—Appeal by the defendant from a judgment of the Supreme Court, Kings County (George, J.), rendered July 22, 1992, convicting him of attempted criminal sale of a controlled substance in the third degree, upon his plea of guilty, and imposing sentence.
Ordered that the judgment is modified, on the law, by vacating the sentence imposed; as so modified, the judgment is *517affirmed, and the matter is remitted to the Supreme Court, Kings County, for resentencing.
At the time of his plea agreement, the defendant was promised a sentence of 3 to 6 years imprisonment, and was warned that if he failed to appear on the date set for sentencing and failed to stay out of trouble, the court would not be bound by its promise and would consider imposing the maximum sentence. The defendant indicated that he understood these conditions. As the People concede, the defendant failed to appear on the date set for sentencing because, on May 18, 1992, he was arrested on new charges. Unaware that the defendant had been arrested for a new crime, the court sentenced the defendant in absentia to an indeterminate term of IV2 to 15 years imprisonment.
When the sentence was executed, the defendant informed the court that he had failed to appear for sentencing because he "was in the system”, but the court failed to conduct an inquiry into the matter.
Under these circumstances, we conclude that the defendant’s failure to appear was not voluntary. Thus, it was improper for the court to sentence the defendant in absentia (see, People v Parker, 57 NY2d 136; People v Stroman, 36 NY2d 939; cf., People v Harris, 169 AD2d 733, affd 79 NY2d 909; People v Stevens, 159 AD2d 662).
Additionally, the defendant was effectively precluded from challenging the validity of his May 1992 arrest at the execution of his sentence. Upon the execution of sentence, the court should have conducted a brief inquiry to determine if there was any legitimate basis for the new arrest and the enhanced sentence of IV2 to 15 years imprisonment (see, People v Outley, 80 NY2d 702). Mangano, P. J., Rosenblatt, Lawrence and Joy, JJ., concur.