Appeal from a judgment of the County Court of St. Lawrence County (Richards, J.), rendered February 6, 2006, convicting defendant upon his plea of guilty of the crime of sexual abuse in the first degree.
*1142Defendant waived indictment and agreed to be prosecuted by a superior court information charging him with sexual abuse in the first degree. He pleaded guilty to this charge and executed a written waiver of the right to appeal. In accordance with the terms of the plea agreement, defendant was sentenced as a second felony offender to four years in prison, to be followed by five years of postrelease supervision He now appeals.
Defense counsel seeks to be relieved of his assignment of representing defendant upon the ground that there are no nonfrivolous issues to be raised on appeal. Based upon our review of the record and defense counsel’s brief, we agree. Defendant entered a knowing, voluntary and intelligent guilty plea and waiver of his right to appeal. He was legally sentenced in accordance with the plea agreement. Consequently, 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.E, Crew III, Peters, Rose and Kane, JJ., concur. Ordered that the judgment is affirmed, and application to be relieved of assignment granted.