delivered the opinion of the Court.
Michael E. was charged in the Circuit Court for Talbot County, sitting as a juvenile court, with being a delinquent, having committed an arson of a dwelling house.
"That MICHAEL E. on or about the 5th day of April, 1980, in Talbot County, Maryland, did maliciously set fire to and burn the dwelling house of William Henry Cecil, Jr. in violation of Article 27, Section 6 — Arson.”
Although Md. Ann. Code art. 27, § 6 addresses primarily arson to a "dwelling house,” it also alternatively proscribes burning certain outbuildings:
"... dwelling house, or any kitchen, shop, barn, stable or other outhouse that is a parcel thereof or belonging to or adjoining thereto.. . .” (Emphasis added).
At trial the State’s evidence established that which was burned was a "well house” or "pump house.” After the first witness, a police officer, had concluded his testimony of the charring on the door of the pump house, etc., the assistant state’s attorney addressed the court saying:
"the State confesses not guilty to the crime.”
Her concern was that appellant had not been charged with violation of the proper section because:
"The evidence would show that the pump house is three feet from the dwelling house.”
Perhaps because the State had confessed not guilty only to the underlying crime charged, rather than having confessed that Michael E. was not delinquent, the judge simply "discharged” appellant and the case was entered on the docket as "dismissed.”
*290Presumably the prosecutor’s spontaneous confession occurred because of her belief that the burning of any outbuilding should be charged under § 7 of Article 27, which proscribes among other objects the burning of
"any barn, stable, garage or other building ... not a parcel of a dwelling house....”
The following month, appellant was so charged:
"That MICHAEL E. on or abou [sic] the 5th day of April, 1980, in Talbot County, Maryland, did willfully and maliciously set fire to and burn a building, to wit: a pump house, not a parcel of a dwelling house, being the property of Pinkey Lee Murphy1, in violation of Article 27, section 7 (Arson).”
Appellant filed a Motion to Dismiss the subsequent petition, claiming it violated the guarantee against double jeopardy. The motion was denied after argument, and this appeal was taken from the court’s ruling.
Sensing the inherent injustice of his plight in light of the Fifth Amendment’s Double Jeopardy Clause,
"nor shall any person be subject for the same offense to be twice put in jeopardy of life or limb,”
appellant cautiously seeks the path to freedom through the interpretative maze adorning that sacred ground by venturing first upon one path, then the other. He argues first that:
"ARTICLE 27 §§ 6 AND 7 EACH DO NOT REQUIRE PROOF OF AN ADDITIONAL FACT WHICH THE OTHER DOES NOT AND THEREFORE BOTH STATUTORY OFFENSES ARE THE SAME FOR PURPOSES OF DOUBLE JEOPARDY.”
*291Seeing but little light ahead he then contends that:
"WHERE THERE HAS BEEN BUT A SINGLE DELINQUENT ACT COMMITTED MULTIPLE PROSECUTIONS BASED ON THAT ACT ARE BARRED BY DOUBLE JEOPARDY.”
Hoping that if err he must, he will do so on the side of prudence, appellant even ventures upon two divergent paths that wander a bit but arrive at the same destination: res judicata,
"LITIGATION OF ISSUES THAT COULD HAVE BEEN DECIDED IN A FORMER PROCEEDING BETWEEN THE SAME PARTIES CONCERNING THE IDENTICAL SUBJECT MATTER IS BARRED BY RES JUDICATA;”
and collateral estoppel,
"COLLATERAL ESTOPPEL BARS THE STATE FROM ATTEMPTING TO PROVE THE OPPOSITE OF A FACT WHICH IT HAS ADMITTED IN A FORMER PROCEEDING BETWEEN THE SAME PARTIES.”
We agree with appellant that the Fifth Amendment precludes his retrial, and may even have reached that result upon the routes he points out to us. But there is within most of us (according to Poe) a degree of perversity, which we note to be most apparent among the judiciary. Our route through the maze2 is one not suggested by appellant, perhaps because we are more concerned with that which the judge permitted, rather than being preoccupied with that which the prosecutor sought to do. It was ironically the State’s brief which brought the key to the case to our attention.
"In the instant case, although the prosecutor confessed not guilty at the hearing on the petition alleging a violation of Article 27 Section 6, that *292admission did not technically constitute a judgment of acquittal because it was not done by the trier of fact [either the judge or a jury]. Pugh v. State, 271 Md. 701 (1974).”
After proper analysis, acquittal appears to have been exactly what the judge was compelled to do, whatever his desire may have been. Precisely what the court did was to "discharge” the appellant by "dismissing” the case, which action under the circumstances was functionally indistinguishable from declaring a mistrial. Lee v. United States, 432 U.S. 23, 31 (1977).
The policy underlying the Double Jeopardy Clause is that
"the State with all its resources and power should not be allowed to make repeated attempts to convict an individual for an alleged offense, thereby subjecting him to embarrassment, expense and ordeal and compelling him to live in a continuing state of anxiety and insecurity, as well as enhancing the possibility that even though innocent he may be found guilty.” Green v. United States, 355 U.S. 184, 187-88 (1957).
These considerations have led to the conclusion that a defendant is placed in jeopardy in a criminal proceeding once he is put to trial before the trier of fact — that being either when the judge receives the first piece of evidence in a non-jury trial or when the jury is selected and sworn in a jury trial, Blondes v. State, 273 Md. 435, 444-45 (1975), whether the proceeding involves an adult or a juvenile. Swisher v. Brady, 438 U.S. 204 (1978). If that trial is aborted without the consent of the defendant, the doctrine of "manifest necessity” expressed in United States v. Perez, 9 Wheat 579, 580 (1820), stands as a command to trial judges not to foreclose "the defendant’s valued right to have his trial completed by a particular tribunal” unless the ends of justice would be defeated by continuing the proceedings. United States v. Dinitz, 424 U.S. 600, 607 (1976); United States v. Jorn, 400 U.S. 470, 485 (1971); see also Wade v. Hunter, 336 U.S. 684, 689 (1949).
*293The case before us seems first to fall under the admonition of the Supreme Court espoused in Downum v. United States, 372 U.S. 734 (1963), reiterated in Dinitz, supra at 611, and quoted with approval by the Court of Appeals in Bell v. State, 286 Md. 193, 204 (1979), i.e., that a trial may not be terminated so as to afford the prosecution a more favorable opportunity to convict.
In Downum, the situation presented was simply one where the district attorney had entered upon the trial of the case without sufficient evidence to convict. Id. at 737. In the case at bar the situation presented was simply one where the assistant state’s attorney’s evidence caused her prematurely to believe that it would be insufficient to convict the defendant as he was charged. Whether appellant had been charged under the wrong statute is neither decided nor material.3 What is important is that the abortion was permitted because the state prosecutrix believed appellant had been wrongly charged, yet it is apparent from the record that no consideration was given either to the possibility of an amendment or a continuance. See United States v. Jorn, supra at 487. Whether the prosecutrix was right or wrong, the trial judge should have recognized that lack of preparedness by the State to continue the trial implicated the policies underpinning not only the double jeopardy provision but the speedy trial guarantee as well. Id. at 486.
Whichever path we follow through the maze, we arrive at the same destination. United States v. Jorn noted that Gori v. United States, 367 U.S. 364 (1961), while adhering to the Perez theme of requiring "manifest necessity” as the appellate standard of review of precipitous terminations subsequently to be retried, "suggested] the possibility of a variation on that theme according to a determination by the appellate court as to which party to the case was the beneficiary of the mistrial ruling.” 400 U.S. at 482. In Gori it was found to have been "in the sole interest of the defendant.” 367 U.S. at 369. In Jorn the judge was motivated by a desire to protect the witnesses rather than the defendant. But in *294the present case, the only beneficiary was the State, and the expressed reason for seeking the ruling was the prosecutorial advantage of conforming the allegations of the petition to the evidence that had been elicited, before a decision on the merits when the change would be too late.
The interruption of a proceeding once jeopardy had attached for reasons factually similar to those before us has been at' least twice addressed by the Supreme Court of the United States. In Lee, supra, the defendant moved for dismissal after the prosecutor’s opening statement because of a defective charge of theft. The trial judge deferred his ruling and proceeded with the case. Instead of ruling on the merits, the judge then granted the motion to dismiss the information, expressing his view that the evidence clearly showed culpability although the charge was technically in error. In permitting a retrial on the new charges using the same evidence, the Supreme Court relied heavily upon the fact that a motion to dismiss (which the Court equated to a motion for mistrial)- had been granted at the behest of appellant.
In Illinois v. Somerville, 410 U.S. 458 (1973), a state prosecutor made a similar mistake in drafting an indictment for theft. Discovery of the defect in the course of trial led the court to grant the State’s motion for mistrial over the defendant’s objection. The Supreme Court held that termination of the trial was dictated by "manifest necessity” under the Perez standard. Id. at 469. Parenthetically, the distinction between mistrial and dismissal would have made no difference there in the Perez analysis. See Lee, supra, at 31 n.9.
This factually apposite case seems to set the tone and establish some guidelines for situations such as we have before us. The Court pointed out that such "formula” as may be applied under the term "manifest necessity” was not an inflexible one, but rather one in which the court should take " 'all circumstances into account.’ ” Id. at 462, citing Wade v. Hunter, supra at 691.
"While virtually all of the cases turn on the particular facts and thus escape meaningful *295categorization, see Gori v. United States, supra, Wade v. Hunter, supra, it is possible to distill from them a general approach, premised on the 'public justice’ policy enunciated in United States v. Perez, to situations such as that presented by this case. A trial judge properly exercises his discretion to declare a mistrial if an impartial verdict cannot be reached, or if a verdict of conviction could be reached but would have to be reversed on appeal due to an obvious procedural error in the trial. If an error would make reversal on appeal a certainty, it would not serve 'the ends of public justice’ to require that the Government proceed with its proof when, if it succeeded before the jury, it would automatically be stripped of that success by an appellate court. This was substantially the situation in both Thompson v. United States, supra, and Lovato v. New Mexico, supra. While the declaration of a mistrial on the basis of a rule or a defective procedure that would lend itself to prosecutorial manipulation would involve an entirely different question, cf. Downum v. United States, supra, such was not the situation in the above cases or in the instant case.” Illinois v. Somerville, supra at 464. (Emphasis added.)
Noting that Downum, supra, also pointed out that "[e]ach case must turn on its facts,” 372 U.S. at 737, the Court drew from the Downum holding, a significance in the fact of the absent witness and reason therefore, i.e., the prosecutor’s prior knowledge of that fact and lack of trial preparation in addressing it. Illinois v. Somerville, supra at 465. The Court noted similar significant circumstances in Jorn. There it was apparent from the record that no consideration had been given to the possibility of a trial continuance. Jorn, supra at 487. The Court then pointed out that:
"In the instant case, the trial judge terminated the proceeding because a defect was found to exist in *296the indictment that was as a matter of Illinois law, not curable by amendment. [Emphasis added.]
This situation is thus unlike Downum, where the mistrial entailed not only a delay for the defendant, but also operated as a post-jeopardy continuance to allow the prosecution an opportunity to strengthen its case. Here, the delay was minimal, and the mistrial was, under Illinois law, the only way in which a defect in the indictment could be corrected.” Illinois v. Somerville, supra at 468-69.
When we analyze the circumstances of the case at bar it is of more than passing interest that the prosecutrix’s chosen language to abort the proceeding, which was in her opinion liable to be lost because of a defect in the information, left the trial judge but very little option. She confessed "not guilty” in open court to the crime of arson to a dwelling house. Although we recognize that in most instances when a judge grants a mistrial over a defendant’s objection, he all but invariably contemplates that the prosecutor will be permitted to proceed anew, Bell v. State, 41 Md. App. 89, 91 (1979), aff'd, Bell v. State, supra, a dismissal from a confession by the State of "not guilty” does not lead to the same conclusion.
The reason given by the prosecution — i.e., that the burned pump house was "three feet” from the dwelling — may or may not have indicated that appellant had been charged under the wrong section. That which is the significant circumstance here is that she believed her case to be in trouble and aborted the proceeding to avoid losing the conviction.4
*297Assuming without deciding that her precipitous concern was correct, she gave the judge no opportunity to consider permitting her to amend, nor even to weigh a continuance or mistrial. See Downum, supra. Whether the amendment or other alternatives would have been permitted has no more bearing on the present considerations than whether her initial concern was an accurate judgment. What is important for this analysis is that she did not seek nor permit the court to seek a means of overcoming the technical deficiency as she perceived it. She took it upon herself to compel an abortion by confessing not guilty, rather than reflecting upon her seeming dilemma or permitting the judge to consider the other alternatives, including whether there was a "manifest necessity” to interrupt the proceedings. As pointed out in Illinois v. Somerville:
"The determination by the trial court to abort a criminal proceeding where jeopardy has attached is not one to be lightly undertaken, since the interest of the defendant in having his fate determined ... is itself a weighty one. United States v. Jorn, supra. Nor will the lack of demonstrable additional prejudice preclude the defendant’s invocation of the double jeopardy bar in the absence of some important countervailing interest of proper judicial administration.” Id. at 471.
We conclude by pointing out that although whether the label of "dismissal” or "mistrial” is used to terminate a proceeding is not significant, that which is critical is whether the order contemplates an end to all prosecution of the defendant for the offense charged. Lee v. United States, supra at 30. In light of the State’s confession of "not guilty,” the dis*298missal hard on its heels without exploring alternatives clearly indicates that the court intended that the proceeding be terminated in the defendant’s favor. See United States v. Jenkins, 420 U.S. 358, 365 n. 7 (1975). In Lee, supra at 30, the court explained that
"A mistrial ruling invariably rests on grounds consistent with reprosecution [citation omitted] while a dismissal may or may not do so. Where a mistrial dismissal is granted on the ground, correct or not, that the defendant simply cannot be convicted of the offense charged, Jenkins establishes that further prosecution is barred by the Double Jeopardy Clause. ”
Despite his expressed uncertainty whether double jeopardy would bar subsequent prosecution, we can hardly interpret Judge North’s dismissal following a confession of not guilty by the State other than as having concluded that the defendant simply could not be convicted of the offense charged. At the time, the Assistant State’s Attorney even expressed her own doubt about later prosecution. The judge, however, was left no alternative.
Judgment reversed.
Costs are not reallocated as part of the judgment of this court pursuant to Md. Rule 1082 f.
. Although the two petitions alleged ownership in different individuals, it is conceded by the State that they both refer to the same building, which is owned by William Henry Cecil, Jr. and occupied by Pinkey Lee Murphy.
. The obvious common-sense approach that when the judge acted on the not guilty confession "the fat lady had sung” is too simple a process for our complex legal thinking.
. It appears at first blush, however, that the original charge was the correct one.
. And she did so while fully cognizant of a double jeopardy problem.
"MS. O’CONNOR: The State confesses not guilty to the crime. The evidence would show that the pump house is three feet from the dwelling house. He’s not charged with the proper section.
THE COURT: Very well. Do you [wish] to file an amended petition?
*297MS. O’CONNOR: Well, I’m not sure that we can with the jeopardy problem.
THE COURT: Well, that’s one that you will have to research and resolve in your own mind.
MS. O’CONNOR: Yes.
THE COURT: In any event, since you have offered a confession of not guilty to the instant charge, your client is discharged, Mr. Pullen.”