Appeal by the defendant from a judgment of the County Court, Putnam County (Braatz, J.), rendered May 22, 1991, convicting him of criminal possession of a controlled substance in the third degree, upon his plea of guilty, and imposing sentence.
Ordered that the appeal is dismissed.
The defendant pleaded guilty to the crime of criminal possession of a controlled substance in the third degree. At the time of the plea, the County Court made sure that the defendant understood that, as a condition of the plea bargain, he was surrendering his right to appeal:
"Q. Do you understand that as part of this plea negotiation, that is the guilty plea to Count Four in full satisfaction of the six charges in the indictment, six B felonies and also in consideration and in exchange for the District Attorney’s position on sentencing, that is recommending a sentence of four to eight as a second felony offender and agreeing not to file a persistent felony offender statement and agreeing not to seek to have you adjudicated as a persistent felony offender and recommending a sentence of four to eight which is below the maximum, do you understand that we are asking you to give up as part of this plea and sentence your right to appeal to higher courts in New York State, do you understand that? "A. Yes. "Q. Do you understand absent giving up this right to appeal you would have the right to appeal the conviction and the sentence to the Appellate Division Second Department and possibly as well to the New York Court of Appeal[s]? "A. Yes. "Q. Do you understand that — let me withdraw that. Are you doing this freely and voluntarily? "A. Yes I am. "Q. And, have you consulted with [defense counsel] concerning your waiver of your right to appeal? "A. Yes. "Q. And, is that understood by you to be part and parcel of *571our agreement in accepting the plea and in making that sentence and recommendation? "A. Yes”. When he appeared for sentencing, the defendant, contradicting the statements made at the time of the plea, told the court, "I do wish to appeal my sentence” and "I want it appealed”. The defendant claimed that his former attorney had not told him that he had to give up his right of appeal. The defendant did not request restoration to his pre-plea status; instead, he applied to the County Court for what would have amounted to permission to appeal notwithstanding his prior waiver.
We conclude that the court did not err in denying what was, in effect, an application by the defendant for leave to withdraw the waiver of his right to appeal. The record of the plea proceeding establishes that the defendant made a knowing and voluntary waiver of his right to appeal (see, People v Seaberg, 74 NY2d 1; see also, People v Moissett, 76 NY2d 909, 911). There is no valid basis upon which to relieve the defendant of the consequences of that waiver. Mangano, P. J., Bracken, Balletta and O’Brien, JJ., concur.