OPINION OF THE COURT
Memorandum.
The order of the Appellate Division should be affirmed.
Defendant was indicted on nine separate counts, and was convicted of two — burglary in the second degree and resisting arrest. Defendant’s motion to vacate his conviction under CPL 440.10 for ineffective assistance of counsel was granted. Thereafter, over objection by the People, the trial court accepted defendant’s plea of guilty to burglary in the second degree and resisting arrest.
The District Attorney moved for a writ of prohibition to prohibit the enforcement of the plea agreement, claiming that it violated CPL 220.10 (4) (a), which provides that the People must consent to a plea to less than the full indictment. The *792Appellate Division denied the District Attorney’s application for a writ of prohibition and granted the Attorney-General’s cross motion to dismiss the petition. The District Attorney appealed to this Court, but his appeal was dismissed as moot since the defendant had already been sentenced in accordance with the plea agreement (Matter of Gentile v Cohen, 73 NY2d 917).
The People then brought an appeal to the Appellate Division, ostensibly from the sentence imposed. The court agreed that vacatur of the defendant’s conviction had revived all of the counts in the indictment and that the District Attorney was therefore required to consent to a plea of guilty to less than the entire indictment. The Appellate Division dismissed the appeal, however, stating that "the thrust of [the] appeal [was to] the validity of the underlying conviction, not the legality of the sentence” (169 AD2d 467).
While CPL 450.30 (2) authorizes the People to appeal from a sentence that is invalid as a matter of law, it does not similarly entitle the People to appeal from a conviction. The People do not allege that the defendant’s indeterminate sentence of four to eight years’ imprisonment, which was to run concurrently with a three-to-six-year term of imprisonment on a separate conviction, is an illegal one for second degree burglary and resisting arrest. Their challenge instead focuses upon the legality of the Trial Judge’s decision to accept the defendant’s plea over the prosecutor’s objection. Thus, in the guise of challenging the sentence imposed, the People are in essence attacking the validity of the defendant’s underlying conviction. This the statute does not permit them to do.
Chief Judge Wachtler and Judges Simons, Kaye, Titone, Hancock, Jr., and Bellacosa concur.
Order affirmed in a memorandum.