Appeal by the defendant, as limited by his motion, from a resentence of the Supreme Court, Kings County (Egitto, J.), imposed July 8, 1986, the resentence being an indeterminate term of imprisonment of 7 to 21 years, upon a jury verdict convicting him of attempted murder in the second degree.
Ordered that the resentence is affirmed.
The defendant was originally sentenced upon his conviction of attempted murder in the second degree to an indeterminate term of imprisonment of 10 to 20 years as an armed felon. On appeal, this court vacated the sentence upon the ground that attempted murder in the second degree is not a class B armed felony offense (see, CPL 1.20 [41]; Penal Law § 110.05 [4]; § 125.25 [1]; People v Lawrence, 97 AD2d 718, affd 64 NY2d 200), and remitted the matter for resentencing (People v Fuller, 119 AD2d 692). Upon resentencing, the court imposed an indeterminate term of imprisonment of 7 to 21 years. We affirm.
*279Contrary to defendant’s contention, in imposing a resentence following the vacatur of the original illegal sentence, the court was not barred from imposing a sentence having a maximum term of greater than 20 years. Unlike those cases which hold that following a successful appeal and retrial,, a court, absent a reasoned and legitimate justification, may not impose a greater sentence than was originally imposed (see, North Carolina v Pearce, 395 US 711; People v Miller, 65 NY2d 502, cert denied — US —, 106 S Ct 317; People v Best, 127 AD2d 671, lv denied 70 NY2d 642), at bar, there was never a prior legal sentence imposed. Once the original sentence was vacated on the ground that it was illegal, the court on resentencing was not bound by either the minimum or maximum limits of the original sentence, which had become a nullity (see, People v Harrington, 21 NY2d 61, 64; People v Garcia, 121 AD2d 465, affd 69 NY2d 903, rearg denied 70 NY2d 694; People v Gillette, 33 AD2d 587). Thus, the court was free to impose a new legal maximum term which was greater than that originally imposed.
Beyond that, we find no merit to defendant’s claim that the resentence was excessive. Mollen, P. J., Bracken, Brown and Weinstein, JJ., concur.