— Upon remittitur from the Court of Appeals, judgment unanimously modified, on the law, by vacating sentence imposed and otherwise judgment affirmed and defendant remanded to Monroe County Court for further proceedings, in accordance with the following memorandum: On remittitur from the Court of Appeals, we have examined the issues previously raised by defendant and not addressed in our prior decision (see, People v Wright, 112 AD2d 38, revd for reasons stated in the dissenting mem of Callahan, J., at App Div 67 NY2d 749). We find no error with respect to the trial court’s instructions to the jury. We conclude, however, that the defendant may have been improperly adjudicated a second felony offender.
Prior to defendant’s sentencing, the District Attorney filed a second felony offender statement pursuant to CPL 400.21 alleging that defendant had previously been convicted of a felony. Defendant controverted the validity of his prior felony conviction by alleging that he was denied the effective assistance of counsel based upon his attorney’s failure to advise him as to all the elements of the crime to which he was pleading. The sentencing court denied defendant’s challenge to the prior conviction without conducting a hearing. "A challenge to a plea based on an insufficient factual recitation is to be distinguished from a challenge based on constitutional grounds, which may be sustained even if raised for the first time at a second felony offender hearing” (People v Perkins, 89 AD2d 956; CPL 400.21 [7] [b]; cf. People v Grimes, 94 AD2d 957). Here, defendant’s moving papers clearly raise a claim that his prior felony conviction was unconstitutionally ob*974tained because he was denied the effective assistance of counsel. Thus, the sentencing court’s refusal to conduct a hearing on defendant’s claim before sentencing him as a second felony offender was improper (People v James, 109 AD2d 1095) as it prevented exploration of the circumstances of defendant’s prior representation (see, People v Baldi, 54 NY2d 137, 146; People v James, supra). Therefore, a hearing is required prior to imposition of sentence. Present. — Callahan, J. P., Doerr, Denman, Boomer and O’Donnell, JJ.