
    In the Matter of Edward C. Cosgrove, as District Attorney of Erie County, Appellant, v Julian F. Kubiniec, Individually and as Associate Judge of the City Court of Buffalo, et al., Respondents.
   Judgment unanimously reversed, without costs, petition granted, and matter remitted to Buffalo City Court. Memorandum: The District Attorney brings this article 78 proceeding to vacate two judgments of driving while impaired entered upon pleas of guilty by respondents McCune and Griffin before respondent City Judge. The pleas were in satisfaction of informations charging driving while intoxicated and were accepted by the court over the objection of the District Attorney, contrary to CPL 220.10 (see Matter of McDonald v Sobel, 272 App Div 455, affd 297 NY 679; People v Darling, 50 AD2d 1038; Matter of Blumberg v Lennon, 44 AD2d 769; People v Evans, 18 AD2d 1018; Matter of Stebbins v Sherwood, 148 Misc 763, affd 241 App Div 615). The court stated that it was reducing the charges because the District Attorney applied an arbitrary rule with respect to reductions in drunken driving cases. The record does not contain competent evidence that there is any such rule or that it is arbitrary. In any event, a court should not reduce charges contained in an information sua sponte to prevent discriminatory enforcement of the Vehicle and Traffic Law. The proper method by which a defendant may test such a claim is by pretrial motion (see CPL 210.20, 210.45; People v Goodman, 31 NY2d 262, 268-269; People v Utica Daws Drug Co., 16 AD2d 12). While recognizing the clear error of the City Judge and the legal right of petitioner to bring this proceeding, Special Term, nevertheless, denied the petition, holding that an article 78 proceeding was not an appropriate remedy because the People could appeal (CPLR 7801, subd 1). The right to appeal is statutory (People v Zerillo, 200 NY 443, 446), and we find no such right to appeal this case under the applicable provisions of Criminal Procedure Law. Insofar as People v Evans (18 AD2d 1018, supra) held otherwise, we note that in that case the court granted the District Attorney relief by way of direct appeal, relying primarily upon provisions of section 518 of the former Code of Criminal Procedure, provisions which have not been re-enacted in our present statute (see, also, Matter of McDonald v Sobel, supra). Prohibition is appropriate in this case because the court exceeded its powers by reducing the charges and terminating the prosecution without the consent of the District Attorney. Its action resulted in entry of a judgment from which the District Attorney may not appeal. This was not merely a legal error which affected the method of prosecution, but an act by the court in excess of its authorized powers which unlawfully terminated the entire proceeding and which was contrary to the District Attorney’s right to control prosecutions (see Matter of State of New York v King, 36 NY2d 59). (Appeal from judgment of Erie Supreme Court—art 78.) Present—Marsh, P. J., Moule, Cardamone, Simons and Goldman, JJ.  