Appeal by the defendant from a resentence of the County Court, Suffolk County (Efman, J.), imposed January 28, 2011, upon his conviction of criminal sale of a firearm in the third degree, criminal possession of a weapon in the third degree (two counts), criminal possession of a controlled substance in the third degree (two counts), and unlawful possession of marijuana, upon his plea of guilty, the resentence being a determinate term of imprisonment of two years followed by a term of two years of postrelease supervision on the conviction of criminal sale of a firearm in the third degree.
Ordered that the resentence is affirmed.
The defendant pleaded guilty, inter alia, to criminal sale of a firearm in the third degree, in exchange for the County Court’s promise to sentence him, among other things, to an indeterminate term of imprisonment of IV2 to 4V2 years on that count of the indictment. The County Court (Gazzillo, J.) advised the defendant, inter alia, that if he was rearrested, the court would not be bound by its promise and would impose any appropriate sentence up to 25 years of imprisonment, which was the maximum allowable sentence. After entering into his plea agreement, the defendant was arrested. The County Court sentenced the defendant, among other things, to an indeterminate term of imprisonment of 21h to 7 years on the conviction of criminal sale of a firearm in the third degree.
Subsequently, the County Court was informed that it had illegally sentenced the defendant to an indeterminate term of imprisonment on the conviction of criminal sale of a firearm in the third degree, which was a violent felony requiring a determinate sentence. The County Court (Efman, J.), over the defendant’s objection, resentenced the defendant to a determinate term of imprisonment of two years plus two years of post-release supervision on the conviction of criminal sale of a firearm in the third degree.
Under the circumstances of this case, the County Court properly resentenced the defendant. A trial court has the inher*1006ent power to correct an illegal sentence, over a defendant’s objection, where the corrected sentence falls within the range initially stated by the court (see People v DeValle, 94 NY2d 870, 871-872 [2000]; People v Williams, 87 NY2d 1014 [1996]). Here, after the County Court learned that the indeterminate sentence imposed on the defendant for the conviction of criminal sale of a firearm in the third degree was illegal, it exercised its inherent power to correct the sentence by imposing a determinate term of imprisonment of two years followed by two years of postrelease supervision. This sentence was within the range initially stated by the County Court, as it was less than the 25 years of imprisonment that could have been imposed on the defendant, since he was arrested after his plea and the County Court was no longer bound by its promised sentence.
Contrary to the defendant’s contention, under the circumstances of this case, his plea was not rendered unknowing or involuntary simply because the County Court did not advise him that the crime of criminal sale of a firearm in the third degree was a violent felony (see generally People v Brinkhuis, 44 AD3d 677 [2007]; cf. People v Catu, 4 NY3d 242 [2005]). Mastro, J.E, Hall, Lott and Sgroi, JJ., concur.