Appeal by the defendant from a judgment of the County Court, Suffolk County (J. Doyle, J.), rendered October 6, 2011, convicting him of attempted assault in the second degree, upon his plea of guilty, and sentencing him, as a second felony offender, to an indeterminate term of imprisonment of 2 to 4 years.
Ordered that the judgment is modified, as a matter of discretion in the interest of justice, by vacating the sentence; as so modified, the judgment is affirmed, and the matter is remitted to the County Court, Suffolk County, for further proceedings consistent herewith.
Although the defendant’s contention that he was improperly adjudicated a second felony offender is unpreserved for appellate review (see CPL 470.05 [2]), we consider the matter in the exercise of our interest of justice jurisdiction. As the People correctly concede, the sentencing court adjudicated the defendant a second felony offender (see Penal Law § 70.06) absent any indication of compliance with the procedural requirements of CPL 400.21, or any showing that the defendant was given notice and an opportunity to be heard (see People v Bouyea, 64 NY2d 1140, 1142 [1985]). Accordingly, we remit the matter to the County Court, Suffolk County, for resentencing in accord*759anee with the mandates of CPL 400.21 (see People v Feder, 96 AD3d 970, 971 [2012]; People v Favale, 77 AD3d 970, 970-971 [2010]; People v Hamdam, 58 AD3d 752, 752-753 [2009]).
The defendant’s contention that his plea should be vacated on the ground that the County Court erred in imposing an enhanced sentence without first conducting an inquiry to determine the existence of a legitimate basis for the defendant’s postplea arrest is without merit (cf. People v Outley, 80 NY2d 702, 713 [1993]; People v Newson, 81 AD3d 984, 985-986 [2011]; People v Barnes, 60 AD3d 861, 863-864 [2009]; People v Leslie, 198 AD2d 233, 234 [1993]). However, if, upon remittur for resentencing, the defendant challenges the validity of a postplea arrest, an inquiry should be conducted, and a determination made, in accordance with People v Outley (80 NY2d at 713), as to the validity of the defendant’s postplea arrest, and the defendant should be resentenced thereafter.
Accordingly, we modify the judgment so as to vacate the sentence, and remit the matter to the County Court, Suffolk County, for further proceedings consistent herewith. Skelos, J.E, Balkin, Cohen and Miller, JJ., concur.