Appeal from a judgment of the County Court of Rensselaer County (McGrath, J.), rendered November 8, 1996, which revoked defendant’s probation and imposed a sentence of imprisonment.
*594In May 1990, defendant pleaded guilty to a charge of felony driving while intoxicated and was sentenced to five years’ probation with various conditions including refraining from the use of alcoholic beverages. Thereafter, on January 25, 1995, defendant was arrested and charged with disorderly conduct after a public fight. The arresting officer described defendant as intoxicated and reported that defendant admitted frequenting a local tavern. Thereafter, the Probation Department filed a probation violation petition on February 15, 1995. On March 3, 1995, the disorderly conduct charge was dismissed.
On August 22, 1995, defendant, represented by counsel, pleaded guilty to violating probation based on his admission of facts satisfying the elements of disorderly conduct as defined by Penal Law § 240.20. Pursuant to the plea agreement, defendant agreed to enter St. Joseph’s Substance Abuse Treatment Program. Defendant was informed that if he successfully completed the program he would be allowed to remain on probation; however, if he was unsuccessfully discharged he would be sentenced to a prison term of 1 to 3 years. Defendant agreed and County Court accepted his plea, releasing defendant on his own recognizance until sentencing. Defendant failed to complete the St. Joseph’s program and did not show up for the scheduled sentencing. County Court issued a bench warrant and, after execution, defendant appeared on November 8, 1996. At that time, defendant made a motion to withdraw his guilty plea which was denied. The court also rejected defendant’s request to continue his probation and sentenced defendant to a 1 to 3-year prison term. Defendant appeals.
We affirm. Initially, we reject defendant’s contention that his guilty plea was not knowing and voluntary. Here, prior to accepting defendant’s guilty plea, County Court thoroughly questioned him in order to ensure that defendant knowingly and voluntarily pleaded guilty to the violation of probation (see generally, People v Lopez, 71 NY2d 662).*
Furthermore, defendant contends that County Court improperly relied upon the disorderly conduct incident as the basis of his plea to the probation violation. Defendant notes that the Probation Department’s petition only alleged that defendant violated specific conditions of his probation prohibiting him from imbibing alcoholic beverages or frequenting establish*595ments where they were served. When defendant pleaded guilty to violating probation, however, he denied that he had violated those conditions but admitted committing the additional offense of disorderly conduct. County Court revoked defendant’s probation on this alternative ground based on CPL 410.10 (2), which states that commission of an additional offense “constitutes a ground for revocation of such sentence irrespective of whether such fact is specified as a condition of the sentence”. Although defendant argues that he was nevertheless required to be provided with written notice of the alternative ground, we are unpersuaded that such notice was necessary given the fact that, pursuant to the statute, noncompliance with other specified laws is always a ground for revocation of probation.
Next, defendant argues that he was not afforded effective assistance of counsel. We disagree. Examining the totality of the circumstances (see, People v Noble, 209 AD2d 735, 736, lv denied 84 NY2d 1036), we conclude that the record demonstrates that defendant received meaningful and effective assistance of counsel. Significantly, defense counsel made timely and appropriate motions, demonstrated knowledge of the relevant principles of criminal procedure and made sincere efforts to minimize the charges and persuade the court not to revoke defendant’s probation (see, People v Griffith, 239 AD2d 705). Under the circumstances, we do not accept defendant’s view that his interests were not adequately represented.
Defendant also claims that County Court’s sentence of 1 to 3 years for his violation of probation was harsh and excessive in light of his alleged substantial compliance with the spirit and intent of the plea agreement. Specifically, defendant maintains that although he did not complete the St. Joseph’s program as required by the plea agreement, County Court should have nevertheless continued his probation based upon his subsequent completion of a different substance abuse program. Defendant’s argument is unpersuasive, however, in light of the clear instructions given by County Court at the allocution which were agreed to by defendant. County Court informed defendant that as a condition of the plea agreement he was required to complete the St. Joseph’s program and, clearly concerned that defendant might try to attend a different program, specifically warned him not to do so because such action would result in the revocation of probation and the imposition of the prison term. Since defendant agreed to the conditions, accepted the benefit of the plea and violated the specific provision regarding treatment, County Court did not abuse its discretion in sentencing defendant in accordance with the *596agreement (see, People v Yusko, 222 AD2d 928, lv denied 87 NY2d 1027; People v Johnston, 186 AD2d 838).
We are similarly unpersuaded by defendant’s argument that County Court improperly revoked his probation and imposed a prison term based upon his postplea arrest in another city on different charges without affording him an opportunity to dispute the allegations in a hearing (see generally, People v Banks, 161 AD2d 957). While it is true that County Court did mention the postplea arrest while pronouncing defendant’s sentence, it is clear from the record that the revocation of his probation was based upon defendant’s failure to honor the conditions agreed to pursuant to a plea agreement, most notably defendant’s failure to complete the St. Joseph’s program.
We have examined defendant’s remaining contentions and find them to be without merit.
Mercure, White, Peters and Carpinello, JJ., concur. Ordered that the judgment is affirmed.
The only reservation expressed by defendant during the allocution was his confusion regarding how the dismissed disorderly conduct charge could form the basis of his guilty plea to a violation of probation. After County Court explained the law and again informed defendant of his right to a hearing, defendant chose to enter the guilty plea.