Appeal from a judgment of the County Court of Albany County (Breslin, J.), rendered September 21, 2010, convicting defendant upon his plea of guilty of the crime of attempted robbery in the second degree.
In satisfaction of a five-count indictment, defendant pleaded guilty to the reduced charge of attempted robbery in the second degree in connection with his involvement in the beating and robbery of a man in the City of Albany. By the terms of the plea agreement, defendant was offered a sentence of 4V2 years in prison and the minimum period of postrelease supervision. The plea agreement generally referenced defendant’s “cooperation,” but did not specify what was required in that regard. At sentenc*1236ing, the People informed County Court that defendant had violated the plea agreement by failing to testify against his co-defendant. The court, finding that defendant had also lied to the Probation Department, imposed an enhanced sentence of 6V2 years in prison and three years of postrelease supervision. Defendant appeals, arguing, among other things, that the court improperly enhanced his sentence without giving him the opportunity to withdraw his plea.
We agree that County Court erred. Nowhere in this record did the court inform defendant that it could impose a greater sentence if defendant did not testify against his codefendant or if he lied to the Probation Department. Under these circumstances, the court could not impose an enhanced sentence without first giving defendant the opportunity to withdraw his plea, which the court failed to do (see People v Becker, 80 AD3d 795, 796-797 [2011]; People v Dunton, 10 AD3d 808, 808-809 [2004], lv denied 4 NY3d 830 [2005]). Although the record before us indicates that defendant failed to preserve this issue by moving to withdraw his plea or vacate the judgment of conviction, we exercise our interest of justice jurisdiction, modify the judgment by vacating the sentence and remit the matter for County Court to either impose the agreed-upon sentence or allow defendant to withdraw his plea (see People v Armstead, 52 AD3d 966, 967 [2008]; People v Hastings, 24 AD3d 954, 955 [2005]). In view of this disposition, defendant’s remaining argument is academic.
Her cure, J.P., Rose, Kavanagh and Egan Jr., JJ., concur. Ordered that the judgment is modified, as a matter of discretion in the interest of justice, by vacating the sentence imposed; matter remitted to the County Court of Albany County for further proceedings not inconsistent with this Court’s decision; and, as so modified, affirmed.