—Appeal by the defendant from two judgments of the Supreme Court, Kings County (Beldock, J.), both rendered March 15, 1993, convicting him of attempted criminal sale of a controlled substance in the third degree under Indictment No. 1397/92, and attempted robbery in the second degree under Indictment No. 3230/92, upon his pleas of guilty, and imposing sentences.
Ordered that the judgments are reversed, on the law, and the matter is remitted to the Supreme Court, Kings County, for further proceedings consistent herewith.
The transcript of the defendant’s pleas of guilty does not indicate that he was informed that he would be subjected to an enhanced sentence and would not be permitted to withdraw his pleas in the event that he failed to cooperate in the prosecution of a codefendant. Under these circumstances, the court could not impose an enhanced sentence for a violation of this condition without first affording the defendant an opportunity to withdraw his pleas and stand trial (see, Innes v Dalsheim, 864 F2d 974, cert denied 493 US 809; see generally, People v Arbil C., 190 AD2d 856; People v White, 144 AD2d 711; cf., People v Johnson, 187 AD2d 532; People v Gibbs, 161 AD2d 661). Accordingly, we remit the matter to the Supreme Court so that it may either impose the sentence originally promised or permit the defendant an opportunity to withdraw his pleas rather than receive an enhanced sentence. In this regard, we further note that at sentencing the defendant challenged the constitutionality of a prior conviction set forth in the People’s predicate felony statement. Should this issue arise again, the court should conduct an inquiry into the matter and, if warranted, afford the defendant an opportunity to adduce evidentiary support for his claim (see generally, CPL 400.21; People v Chestnut, 188 AD2d 480; People v Davis, 144 AD2d 688). Sullivan, J. P., Lawrence, Pizzuto, Joy and Goldstein, JJ., concur.