Appeal by the defendant from a judgment of the County Court, Nassau County (Boklan, J.), rendered May 7, 1990, convicting him of attempted criminal possession of a controlled substance in the third degree, upon his plea of guilty, and imposing sentence.
Ordered that the judgment is affirmed.
We disagree with the defendant’s assertion that the trial court erred in denying his application at sentencing to with*458draw his plea of guilty based upon claims of coercion and innocence. The determination of whether to allow a defendant to withdraw a plea of guilty rests within the sound discretion of the trial court (see, CPL 220.60 [3]; 380.30 [3]; People v Howard, 138 AD2d 525; People v Melendez, 135 AD2d 660; People v Stubbs, 110 AD2d 725). The defendant knowingly and voluntarily pleaded guilty in the presence of competent counsel after the court had advised him of the consequences of his plea during a thorough and meticulous plea allocution. The defendant’s protestations at sentencing that he was coerced into pleading guilty and that he was innocent are refuted by the record of the plea proceedings, in which he stated under oath that he was not being coerced, into pleading guilty, that he possessed cocaine with the intent to sell it, and that he was satisfied with the representation being given by his counsel (see, People v Brownlee, 158 AD2d 610). Thus, the defendant’s protestations at sentencing did not provide a basis for withdrawing his pleas (see, People v. Latimer, 176 AD2d 350; People v Williams, 183 AD2d 866). Moreover, since the defendant was given an ample opportunity to state the basis for his application to withdraw , his plea, and the basis given by him was facially without merit, no formal evidentiary hearing was necessary (see, People v Morris, 118 AD2d 595). Rosenblatt, J. P., Ritter, Pizzuto and Santucci, JJ., concur.