*1007As correctly conceded by the People, the sentence imposed by the County Court, upon the defendant’s plea of guilty, was inconsistent with the sentence promised by the County Court at the plea proceeding. The County Court had promised the defendant that he would receive, at most, a determinate sentence of 18 years of incarceration; however, such a sentence would have been illegal (see Penal Law § 70.00 [1], [3] [a] [i]). The defendant actually received a legal sentence consisting of an indeterminate term of incarceration of 18 years to life. Accordingly, under the circumstances, the sentence imposed must be vacated, and the matter remitted to the County Court, Dutchess County, to afford the defendant the opportunity to accept the sentence that was actually imposed, or permit him to withdraw his plea of guilty (see People v Cameron, 83 NY2d 838, 840 [1994]; People v Selikoff, 35 NY2d 227, 239-240 [1974], cert denied 419 US 1122 [1975]; People v Sosa-Rodriguez, 63 AD3d 861, 863 [2009]).
In light of our determination, we need not address the defendant’s remaining contentions. Rivera, J.P, Balkin, Leventhal and Hall, JJ., concur.