—Appeal by the People (1) as limited by their brief, from so much of an order of the Supreme Court, Kings County (Gorges, J.), dated July 22, 1992, as, upon denying the defendant’s motion to dismiss Kings County Indictment No. 2440/91, provided that the defendant would be permitted to enter a plea of guilty to the indictment in return for a sentence of probation, and (2) from a sentence of the same court, imposed July 23, 1992, upon the defendant’s conviction of robbery in the first degree (two counts), criminal possession of a weapon in the second degree, grand larceny in the fourth degree, and criminal possession of stolen property in the fifth degree, upon his plea of guilty, the sentence being a term of five years probation.
Ordered that the appeal from the order is dismissed, as no appeal by the People lies from such an order (see, CPL 450.20); and it is further,
Ordered that the sentence is vacated, on the law, and the matter is remitted to the Supreme Court, Kings County, for further proceedings in accordance herewith before a different Justice.
The defendant was charged with two counts of robbery in the first degree, criminal possession of a weapon in the second degree, and related offenses arising out of his alleged gunpoint robbery of a grocery store in Brooklyn. He subsequently moved to dismiss the indictment in the furtherance of justice pursuant to CPL 210.40, claiming, inter alia, that he had no prior criminal convictions, he suffered from a gambling addiction, and he was in the process of rehabilitating himself through his membership and participation in Gamblers Anonymous. The People opposed the motion. After a lengthy hear*591ing, the Supreme Court denied the defendant’s motion to dismiss, but stated that it would permit him to plead guilty to the entire indictment in return for a promised sentence of five years probation. Over the strenuous objections of the People, the defendant entered his plea of guilty and the court sentenced him in accordance with its promise. We now vacate the sentence and remit the matter for further proceedings before a different Justice.
As the People accurately observe, the challenged sentence of five years probation is patently illegal (see, Penal Law § 70.02 [1] [a]; [2] [a]; [3] [a]; [4]; see generally, People v Garcia, 143 AD2d 842; People v Royster, 96 AD2d 519). Moreover, the Supreme Court had no authority under CPL 210.40 to fashion what it perceived to be a less drastic alternative to dismissal by imposing a sentence which it acknowledged is not authorized by law. The statute does not expressly or impliedly confer upon the courts the discretion to impose illegal sentences. Similarly, the Supreme Court’s reliance upon the decision in Matter of Vega v Bell (47 NY2d 543) is misplaced, as that decision merely interpreted CPL 210.40 to afford superior criminal courts the implicit power to remove juvenile offender cases to the Family Court over the District Attorney’s objection, thereby filling a void in and preserving the integrity of the statutory scheme governing such removals. Matter of Vega v Bell (supra) does not authorize the Supreme Court, as was done in this case, to ignore the clearly expressed and unequivocal mandatory sentencing provisions of the Penal Law. Accordingly, the probationary sentence must be vacated and the matter remitted to a different Justice so that the defendant may withdraw his plea or accept a lawful sentence.
We have considered the defendant’s remaining contentions and find them to be without merit. Bracken, J. P., Sullivan, Copertino and Pizzuto, JJ., concur.