
    The People of the State of New York, Respondent, v Edward Davis, Appellant.
   Appeal by the defendant from a judgment of the Supreme Court, Queens County (Rotker, J.), rendered July 10, 1987, convicting him of criminal sale of a controlled substance in the third degree, upon his plea of guilty, and imposing sentence.

Ordered that the judgment is reversed, on the law, and the matter is remitted to the Supreme Court, Queens County, for further proceedings in accordance herewith; no questions of fact have been raised or considered.

We find that under the circumstances of this case, the sentencing court erred when it summarily adjudicated the defendant to be a second felony offender. At the time the predicate felony statement was filed by the District Attorney, the court inquired, "Did he [the defendant] plead knowingly and voluntarily to the facts and was he guilty of the crime as charged and did he raise any constitutional issue on appeal pending this case?”. Although the defense counsel replied, "He did, yes”, the court promptly declared the defendant to be a second felony offender without conducting further proceedings. In view of counsel’s indication that the defendant was challenging the previous felony conviction on constitutional grounds, the court was obligated to conduct a hearing thereon (see, CPL 400.21 [7] [b]; People v Owens, 58 AD2d 587; cf., People v Ross, 138 AD2d 543). Accordingly, this matter must be remitted to the Supreme Court for a hearing on the defendant’s assertions.

Moreover, in the event that after the hearing, the defendant is found to be a second felony offender, the court must afford the defendant an opportunity to withdraw his plea. It appears that at the time the defendant pleaded guilty in this case, the court failed to adequately advise the defendant that if he were found to be a second felony offender, then the promised sentence would be increased to the sentence that was actually imposed (cf., People v Da Forno, 73 AD2d 893, affd 53 NY2d 1006; see also, People v Fludd, 137 AD2d 764). Thompson, J. P., Lawrence, Rubin, Harwood and Balletta, JJ., concur.  