
    The People of the State of New York, Respondent, v Frank J. Longboat, Appellant.
   Judgment unanimously modified, on the law, and as modified affirmed and defendant remanded to Niagara County Court for further proceedings, all in accordance with the following memorandum: At defendant’s sentencing, the prosecutor filed a second felony offender statement alleging that defendant was previously convicted, when he was 16 years of age, of two counts of attempted third degree burglary. Defendant controverted the validity of that conviction by alleging that it was unconstitutional because he was denied effective assistance of counsel based upon his attorney’s failure to request that he be adjudicated a youthful offender.

The sentencing court must hold a hearing if a defendant controverts any allegation in the prosecutor’s second felony offender statement (CPL 400.21 [5]). A conviction obtained in violation of defendant’s constitutional rights cannot be considered a predicate felony for sentencing purposes (see, People v Lee, 97 AD2d 946; People v Edmond, 84 AD2d 938). Although defendant has no constitutional right to receive youthful offender treatment, he does have a statutory right to a hearing when he has challenged the constitutionality of the predicate felony conviction (CPL 400.21 [7] [b]; People v James, 109 AD2d 1095; People v Barrows, 65 AD2d 625). Thus, the sentencing court’s refusal to conduct a hearing before sentencing defendant as a second felony offender was error and prevented the "unique circumstances” of defendant’s prior representation from being explored (People v Baldi, 54 NY2d 137, 146). (Appeal from judgment of Niagara County Court, DiFlorio, J. —attempted burglary, third degree.) Present — Callahan, J. P., Boomer, Pine, Lawton and Davis, JJ.  