This case requires us to decide a question left open in Commonwealth v. Brandano, 359 Mass. 332 (1971) (Brandano), whether art. 30 of the Declaration of Rights of the Massachusetts Constitution permits a judge (prior to verdict, finding, or plea) to dismiss a legally adequate criminal indictment in the “interests of public justice” over the Commonwealth’s objection. We conclude that it does not.
1. Background. In July, 1997, a grand jury returned four indictments charging the defendant Michael Cheney with rape of a child under sixteen years of age in violation of G. L. c. 265, § 23. The details of the alleged incidents are not relevant to our analysis, so we need not recite the specific allegations. See Commonwealth v. Tim T., 437 Mass. 592, 593 (2002) (Tim T.). *569In late 1999, Cheney was arraigned in the Superior Court. Cheney pleaded not guilty to all four indictments, and subsequently filed a “Motion for Disposition Under M.G.L. Ch. 276 Sec. 87,”1 asking the court to place him on pretrial probation and to continue the case without a change of plea or an admission to sufficient facts. The Commonwealth objected to the use of pretrial probation as a disposition, requested that the indictments proceed to trial, and, in the alternative, demanded that the judge hold a hearing pursuant to Brandano before dismissing the indictments at the end of whatever pretrial probation period she imposed. On May 18, 2000, the judge placed Cheney on pretrial probation for six months and indicated her intent to dismiss the case thereafter. The Commonwealth gave notice of its intention to appeal from the eventual dismissal of the case, and asked the judge to reconsider her ruling and allow the case to proceed to trial. That request was denied.
One day before the end of the six-month “pretrial” probationary period, the Commonwealth filed a motion for trial, which Cheney opposed. After holding a Brandano-type hearing,2 the judge dismissed the indictments, making specific written findings and concluding that the “ ‘interests of public justice’ require a dismissal.”3 The Commonwealth appealed, and we transferred the case to this court on our own motion. We now *570vacate the judge’s orders and remand the case for further proceedings.
2. Discussion. General Laws c. 265, § 23, explicitly forbids a prosecution of rape of a child from being “placed on file or continued without a finding.”4 We recently held that an indictment brought under the same statute in the Juvenile Court could not be disposed of, over the Commonwealth’s objection, through the use of the means employed by the judge here, i.e., pretrial probation and dismissal under the procedures set forth in Brandano. Tim T., supra at 596-597. We first concluded that the “use of pretrial probation under G. L. c. 276, § 87, by itself, as a disposition of a case is inconsistent with the Legislature’s intent in enacting that section,” id. at 594, but that it could be used as a step leading to the disposition of a case when done in conjunction with G. L. c. 278, § 18, the statute governing guilty pleas and dispositions in the Juvenile Court, the District Court, and the Boston Municipal Court.5 Id. at 595. We next concluded *571that G. L. c. 278, § 18, only permitted the use of pretrial probation and dismissal as a disposition after the tender of a guilty plea or an admission to sufficient facts, and, in any event, would not have permitted such a disposition to be imposed in a case involving an indictment under G. L. c. 265, § 23, where a continuance without a finding is “otherwise prohibited by law.”6 Id. at 595 & n.2. Absent compliance with G. L. c. 278, § 18, we held that the disposition imposed in Tim T. could not be undertaken over the Commonwealth’s objection. Id. at 595. Implicit in our decision is the conclusion that, as concerns cases pending in the Juvenile Court, District Court, and Boston Municipal Court, a dismissal “in the interests of public justice” is only available in compliance with the terms of G. L. c. 278, § 18,7 see Commonwealth v. Rotonda, 434 Mass. 211, 217 (2001), and Brandano is no longer available for this purpose.
The question presented here is whether an indictment brought in the Superior Court, where the provisions of G. L. c. 278, § 18, do not apply, may properly be disposed of by combining an order of pretrial probation with a dismissal under Brandano.
*572The answer turns on the outcome of the constitutional question left open in Brandano.
In Brandano, this court authorized a continuance without a finding and the ultimate dismissal, over the Commonwealth’s objection, of a prosecution of the receipt of a stolen motor vehicle brought under G. L. c. 266, § 28. At the time of the case, G. L. (Ter. Ed.) c. 266, § 29 provided:
“A complaint or indictment for the violation of any provision of section twenty-seven A or twenty-eight shall not, unless the purposes of justice require such disposition, be placed on file or disposed of except by trial and judgment according to the regular course of criminal proceedings. It shall be otherwise disposed of only upon motion in writing, stating specifically the reasons therefor and verified by affidavit if facts are relied on. If the court or justice certifies in writing that he is satisfied that the cause relied on exists and that the interests of public justice require the allowance thereof, such motion shall be allowed, and said certificate shall be filed in the case.” (Emphases added.) Brandano, supra at 334 n.2.8
In this context the court articulated the now familiar procedural requirements to be used in connection with determining whether the “interests of public justice” warrant a disposition of dismissal in the absence of a trial or a plea. Specifically:
“When dismissal of a case is proposed by the defendant or by the judge without the consent of the Commonwealth, the defendant shall file an affidavit in support of a dismissal which shall contain all the facts and the law relied upon in justification of a dismissal. The Commonwealth may file a counter affidavit, and, as to matters contained in the affidavits which are in dispute, there shall be a hearing, unless the judge concludes that on the face of the affidavits ‘the interests of public justice’ do not warrant a dismissal. If the judge concludes that the ‘interests of public justice’ require a dismissal he shall record the findings of fact and the reasons for his decision. The Commonwealth would *573have a right of appeal under G. L. c. 278, § 28E, as amended.” Id. at 337.
We stated that “we believe[d] that the procedure, utilized in this case either generally or under the statute, would not be constitutionally offensive,” implying that the articulated procedure might be permissible even in prosecutions brought under statutes other than G. L. c. 266, § 29 (emphasis added).9 Id. However, we specifically declined to decide the “ultimate question of constitutionality.” Id. at 337.10 Today, we are called on to decide that ultimate question.11
Article 30 states:
“In the government of this Commonwealth, the legislative department shall never exercise the executive and judicial powers, or either of them: the executive shall never exercise the legislative and judicial powers, or either of them: the judicial shall never exercise the legislative and executive powers, or either of them: to the end it may be a government of laws and not of men.”
*574In the context of criminal prosecutions, the executive power affords prosecutors wide discretion in deciding whether to prosecute a particular defendant, and that discretion is exclusive to them. See Commonwealth v. Taylor, 428 Mass. 623, 629 (1999); Commonwealth v. Pellegrini, 414 Mass. 402, 404-405 (1993); Shepard v. Attorney Gen., 409 Mass. 398, 401 (1991). Once commenced, “the decision to nol pros a criminal case is within the discretion of the executive branch of government, free from judicial intervention.” Commonwealth v. Gordon, 410 Mass. 498, 500 (1991). See Commonwealth v. Wheeler, 2 Mass. 172, 173 (1806). “The effect of dismissing a complaint without a trial is like that of quashing or entering a nolle prosequi of an indictment.” Commonwealth v. Bressant, 126 Mass. 246, 247 (1879). Accord Commonwealth v. Gordon, supra; Commonwealth v. Brandano, supra at 334-335. “Judicial review of decisions which are within the executive discretion of the [prosecutor] ‘would constitute an intolerable interference by the judiciary in the executive department of the government and would be in violation of art. 30 of the Declaration of Rights.’ ” Shepard v. Attorney Gen., supra, quoting Ames v. Attorney Gen., 332 Mass. 246, 253 (1955). Thus, when a judge, “[wjithout any legal basis . . . preempts] the Commonwealth’s presentation of its case [t]hat action effectively usurp [s] the decision-making authority constitutionally allocated to the executive branch.” Commonwealth v. Gordon, supra at 501. See Burlington v. District Attorney for the N. Dist., 381 Mass. 717, 721 (1980) (“virtual exclusion of judicial intervention to check or correct the district attorney in the [decision to nol pros] . . . follows from Part I, art. 30 of the Massachusetts Constitution declaring a separation of powers”); Commonwealth v. Hart, 149 Mass. 7, 8 (1889) (“Only an attorney authorized by the Commonwealth to represent it has authority to declare that he will not further prosecute a case in behalf of the Commonwealth. A court is not a prosecuting officer, and does not act as the attorney for the Commonwealth. Its office is judicial, — to hear and determine between the Commonwealth and the defendant”).
The conclusion that judicial power does not extend to authorize a judge to dismiss an otherwise legally adequate indictment, prior to verdict, finding, or plea, in the “interests of public justice” is inescapable. See Commonwealth v. Gordon, supra at 500 (judge may not “exercise[] discretionary decision-*575making power to decide whether a complaint, legally valid, should be pursued”). To conclude otherwise would be to permit judges to substitute their judgment as to whom and what crimes to prosecute, for the judgment of those who are constitutionally charged with that duty, and who are accountable to the people for doing so responsibly. The line that the principle of separation of powers requires us to draw between the exercise of judicial and executive powers could not be more clear.12
3. Conclusion. The judge’s orders continuing the prosecution without permitting a trial or requiring a plea of guilty, and dismissing the indictments over the objection of the Commonwealth are vacated, and the case is remanded for further proceedings consistent with this opinion.
So ordered.
General Laws c. 276, § 87, provides, in relevant part:
“The superior court, any district court and any juvenile court may place on probation in the care of its probation officer any person before it charged with an offense or a crime for such time and upon such conditions as it deems proper, with the defendant’s consent, before trial and before a plea of guilty, or in any case after a finding or verdict of guilty
No court reporter was present at this hearing, but the parties have stipulated that the hearing took place and that the parties presented oral arguments consistent with their written submissions.
The trial judge’s findings included: (1) that Cheney, then twenty-five years old, met the fourteen year old complainant at a family cookout on August 17, 1996; (2) that Cheney and the complainant allegedly had a sexual encounter in the bathroom that was not “unwanted” by the complainant; (3) that the complainant called Cheney a day or two later; (4) that, during the evening of August 20 and the following morning, Cheney and the complainant engaged in a number of sexual encounters that were not “unwanted”; (5) that Cheney *570did two tours of duty while in the Navy and was promoted four times, up to third class petty officer, before being honorably discharged; (6) that Cheney would like to reenlist, but any type of conviction would prevent him from doing so; (7) that Cheney has no criminal record; and (8) that Cheney intends to live with his pregnant fiancée (not the complainant) in Arizona when his criminal case is over.
General Laws c. 265, § 23, provides:
“Whoever unlawfully has sexual intercourse or unnatural sexual intercourse, and abuses a child under sixteen years of age shall, for the first offense, be punished by imprisonment in the state prison for life or for any term of years, or, except as otherwise provided, for any term in a jail or house of correction, and for the second or subsequent offense by imprisonment in the state prison for life or for any term of years, but not less than five years; provided, however, that a prosecution commenced under the provisions of this section shall not be placed on file or continued without a finding.”
The Legislature added the proviso at the end of the section in 1998, by emergency act. St. 1998, c. 194, § 238.
In relevant part, G. L. c. 278, § 18, provides:
“A defendant who is before the Boston municipal court or a district court or a district court sitting in a juvenile session or a juvenile court on a criminal offense within the court’s final jurisdiction shall plead not guilty or guilty, or with the consent of the court, nolo contendere. Such plea of guilty shall be submitted by the defendant and acted upon by the court; provided, however, that a defendant with whom the com-
*571monwealth cannot reach agreement for a recommended disposition shall be allowed to tender a plea of guilty together with a request for a specific disposition. Such request may include any disposition or dispositional terms within the court’s jurisdiction, including, unless otherwise prohibited by law, a dispositional request that a guilty finding not be entered, but rather the case be continued without a finding to a specific date thereupon to be dismissed, such continuance conditioned upon compliance with specific terms and conditions or that the defendant be placed on probation pursuant to the provisions of section eighty-seven of chapter two hundred and seventy-six. . . .”
In Commonwealth v. Pyles, 423 Mass. 717, 721-722 (1996), we held that G. L. c. 278, § 18, which permits “continu[onces] without a finding” and dismissals in certain cases over the Commonwealth’s objection, did not violate the separation of powers provision of the Massachusetts Constitution, where the “Legislature has great latitude in . . . prescribing penalties to vindicate the legitimate interests of society . . . [and] [s]ection 18 represents the delineation by the Legislature of a dispositional option . . . .”
In Commonwealth v. Pyles, supra at 723, we held that when a judge utilizes G. L. c. 278, § 18, to continue and dismiss a case over the Commonwealth’s objection the judge must make her reasons known in the record of the case so as to permit a determination on appeal that “the judge properly exercised discretion in the best interests of justice.”
In 1980, the Legislature restructured several sections of G. L. c. 266, replacing this language in § 29 with a more restrictive rule in § 28 itself: “A prosecution [commenced] under this subdivision shall not be placed on file or continued without a finding . . . .” St. 1980, c. 463, § 4.
Our decision does not apply to the disposition of criminal charges where the statutory language setting forth the offense specifically provides that it may be disposed of without a plea or trial in “the interests of public justice.” See, e.g., G. L. c. 56, § 58 (election law violation).
During the next twenty-one years, courts used the Brandano procedure without substantive challenge as a mechanism for permitting defendants (without pleading guilty or admitting to sufficient facts) to obtain continuances without findings, and dismissals of their cases, mostly, although not exclusively, in cases falling within the jurisdiction of the District, Juvenile, and Boston Municipal Courts. See Commonwealth v. Rotonda, 434 Mass. 211, 217 (2001). In 1992, the Legislature revised G. L. c. 278, § 18, as appearing in St. 1992, c. 379, § 193, to provide a statutory framework and procedure for achieving some of the objectives of this form of disposition, see Commonwealth v. Duquette, 386 Mass. 834, 843 (1982), while constraining the process. Commonwealth v. Pyles, supra at 722.
Cheney contends that the Commonwealth should not be permitted to argue that the Brandano procedure is unconstitutional because the Commonwealth did not raise the issue below, instead affirmatively requesting a Brandano hearing. We disagree. The Commonwealth repeatedly objected to the judge’s imposition of pretrial probation and filed a written request that the judge reconsider and permit the Commonwealth to proceed to trial. Near the end of the “pretrial” probationary period, the Commonwealth again moved that the case be set down for trial. By consistently expressing its desire and intent to prosecute Cheney, the Commonwealth preserved its rights to challenge the judge’s dismissal as a violation of art. 30.
Of course, a judge is not precluded from dismissing indictments that are legally invalid at any time during the pendency of a criminal case. See, e.g., Angiulo v. Commonwealth, 401 Mass. 71, 79-80 (1987) (double jeopardy principles prohibit prosecution); Commonwealth v. McCarthy, 385 Mass. 160, 163 (1982) (insufficient evidence presented to grand jury). See also Commonwealth v. Gordon, 410 Mass. 498, 502-503 (1991) (providing examples of dismissals on “legal basis”).