Appeal from a judgment of the County Court of Broome County (Smith, J.), rendered March 25, 2005, convicting defendant upon his plea of guilty of the crime of attempted burglary in the second degree.
Defendant and two codefendants were charged in a multiple-count indictment with various crimes after they unlawfully entered a residence and tried to take property. Defendant pleaded guilty to attempted burglary in the second degree in full satisfaction of the indictment. In accord with the plea agreement, County Court sentenced defendant as a second felony offender to three years in prison, to be followed by three years of postrelease supervision. Thereafter, upon realizing that the sentence was illegal and that the mandatory period of postrelease supervision was five years, County Court gave defendant the opportunity to withdraw his plea or accept the new sentence. In response, defendant expressed his desire for new counsel and the matter was adjourned. After new counsel was appointed, defendant agreed to accept the plea with the new sentence and he was sentenced accordingly. He appeals.
Defense counsel seeks to be relieved of his assignment of representing defendant on appeal on the ground that there are no nonfrivolous issues to be raised. We agree based upon our review of the record, which discloses that defendant entered a knowing, voluntary and intelligent plea of guilty and adhered to the plea while accepting the new sentence, which was the minimum that could be imposed (see Penal Law § 70.45 [2]; § 70.06 [6] [c]; § 70.00 [6]). Accordingly, the judgment is affirmed and defense counsel’s application for leave to withdraw is granted (see People v Cruwys, 113 AD2d 979 [1985], lv denied 67 NY2d 650 [1986]; see generally People v Stokes, 95 NY2d 633 [2001]).
Mercure, J.P., Crew III, Carpinello, Mugglin and Lahtinen, JJ., concur. Ordered that the judgment is affirmed, and application to be relieved of assignment granted.