
    The People of the State of New York, Respondent, v Thomas Tubbs, Appellant.
   Harvey, J.

Appeal from a judgment of the Supreme Court (Traficanti, Jr., J.), rendered October 18, 1988 in Albany County, convicting defendant upon his plea of guilty of the crimes of conspiracy in the second degree and attempted criminal sale of a controlled substance in the second degree.

In September 1987, defendant was indicted by a Grand Jury for the crimes of criminal sale of a controlled substance in the second degree (two counts), criminal sale of a controlled substance in the third degree (four counts) and conspiracy in the fourth degree. Following plea-bargaining negotiations, defendant pleaded guilty to attempted criminal sale of a controlled substance in the second degree and conspiracy in the second degree. Defendant was then sentenced upon his plea to the recommended indeterminate prison terms of 3 to 9 years on the conviction for attempted criminal sale of a controlled substance and 3 to 9 years on the conviction for conspiracy. The terms were to run concurrently.

Thereafter, it was discovered that the original sentence imposed for the crime of attempted criminal sale of a controlled substance was not made in accordance with law. Specifically, the imposed sentence was based upon the parties’ mistaken belief that a conviction for attempted sale resulted in the reduction of the charge from a class A-II to a class B felony. As a result, defendant was given the opportunity on two separate occasions to withdraw his previous plea or to replead to a lesser crime, but defendant refused to do so. Ultimately, upon defendant’s repeated refusal to withdraw his plea, Supreme Court vacated the original sentence of 3 to 9 years on defendant’s plea of guilty to attempted criminal sale of a controlled substance in the second degree and resentenced defendant to an indeterminate term of three years to life on that crime, again to run concurrently with the conspiracy conviction. Following the imposition of this sentence defendant then attempted to withdraw his plea and the court refused. Defendant now appeals.

We affirm. Under the circumstances of this case, it was within Supreme Court’s discretion to resentence defendant to a term of imprisonment greater than that for which he had originally plea bargained. It is undisputed that the original sentence of 3 to 9 years imposed by the court for attempted criminal sale of a controlled substance in the second degree was illegal since, as a class A-II felony (see, Penal Law § 110.05 [2]; § 220.41), the maximum term mandated by law for that crime is life imprisonment (see, Penal Law § 70.00 [2] [a]). As a result, the sentence could not stand by operation of law (see, People v Beach, 152 AD2d 772). While such a situation entitles the defendant to vacatur of the sentence and the opportunity to withdraw the guilty plea (see, supra; People v Shelton, 100 AD2d 775), defendant chose not to withdraw his plea despite several documented opportunities for him to do so. Defendant even declined the People’s offer to allow him to plead to a lesser count of the indictment which would support the originally agreed-upon sentence. Since only the sentence and not the underlying plea was illegal, the proper curative course, in the absence of defendant’s consent to do otherwise, was to resentence him in accordance with law (see, Matter of Kisloff v Covington, 73 NY2d 445, 450). The sentence imposed by the court was the lowest legal sentence that could be given and, accordingly, we find no abuse of discretion or other grounds for reversal.

Judgment affirmed. Mahoney, P. J., Kane, Casey, Weiss and Harvey, JJ., concur. 
      
       Supreme Court first mistakenly vacated defendant’s valid guilty plea sua sponte and then realized its error and let the plea stand (see, Matter of Kisloff v Covington, 73 NY2d 445, 450).
     