
136 Cal.App.3d 110 (1982)
186 Cal. Rptr. 21
GARRY ROBERT MOUSER, Petitioner,
v.
THE SUPERIOR COURT OF DEL NORTE COUNTY, Respondent; THE PEOPLE, Real Party in Interest.
Docket No. A017536.
Court of Appeals of California, First District, Division Two.
September 24, 1982.
*111 COUNSEL
Schafer, Cochran & Follett and Robert F. Cochran for Petitioner.
No appearance for Respondent.
George Deukmejian, Attorney General, Robert H. Philibosian, Chief Assistant Attorney General, William D. Stein, Assistant Attorney General, *112 Ann K. Jensen and Stan M. Helfman, Deputy Attorneys General, for Real Party in Interest.
OPINION
MILLER, J.
Petitioner, aggrieved by an order of respondent court rejecting his pleas of once in jeopardy (Pen. Code, § 1016, subd. 5) and former judgment of acquittal (Pen. Code, § 1016, subd. 4), petitioned this court for a writ of prohibition to prevent his retrial. We have concluded that petitioner is entitled to the relief requested.
On April 20, 1982, trial by jury commenced against petitioner and two codefendants on charges of violation of Health and Safety Code section 11358 (unlawful cultivation of marijuana) and Health and Safety Code section 11359 (unlawful possession for sale of marijuana). On April 22, 1982, at the close of the prosecution's case, all defendants, in a motion made pursuant to Penal Code section 1118.1, joined in a motion for judgment of acquittal. Respondent court granted the motion as to the two codefendants but denied it as to petitioner.
Petitioner thereupon moved for a mistrial, contending that he would be prejudiced by proceeding before the jury without the codefendants. Respondent court denied the motion for mistrial. Thereupon, the district attorney interjected, as follows:
"MR. MAHONEY: May the People have an opportunity to speak?
"THE COURT: On what?
"MR. MAHONEY: On the motion that was made.
"THE COURT: By Mr. Cochran?
"MR. MAHONEY: Yes.
"THE COURT: I am not granting his motion, but I will let you speak on it.
"MR. MAHONEY: I think his motion has some merit.
"THE COURT: I'll let you speak on it.
*113 "MR. MAHONEY: It's never the People's intention to take unfair advantage of anyone. I'm not saying what the Court's ruling should be, I just think that his motion has some merit.
"THE COURT: All right, I appreciate that, Mr. Mahoney. That's more than I can say.
"And with that, I'm going to grant the motion as to your client."
At 11:30 a.m., respondent court called in the jury and dismissed them, advising them that there was not sufficient evidence to warrant giving them the case.
At 1:35 p.m. proceedings were recommenced against petitioner, respondent court advising petitioner that he had misunderstood the district attorney's remarks to apply to the motion for judgment of acquittal rather than to the motion for mistrial. The court thereupon explained that he was correcting the record by granting the motion for mistrial and that the matter was to be reset for a new trial. Petitioner's objection that the court had lost jurisdiction was overruled.
Thereafter, the matter was reset for trial, and on April 27, 1982, petitioner filed a notice of motion and motion to enter pleas of former judgment and once in jeopardy. On May 7, 1982, respondent court rejected the pleas.
(1) Section 1118.1 provides: "In a case tried before a jury, the court on motion of the defendant or on its own motion, at the close of the evidence on either side and before the case is submitted to the jury for decision, shall order the entry of a judgment of acquittal of one or more of the offenses charged in the accusatory pleading if the evidence then before the court is insufficient to sustain a conviction of such offense or offenses on appeal...."
Section 1118.2 provides: "A judgment of acquittal entered pursuant to the provisions of Section 1118.1 or 1118.1 shall not be appealable and is a bar to any other prosecution for the same offense."
In Veitch v. Superior Court (1979) 89 Cal. App.3d 722 [152 Cal. Rptr. 822], (petn. for hg. den., U.S. cert. den., 444 U.S. 940 [62 L.Ed.2d 306, 100 S.Ct. 293]) this court examined the effect of motions for new trial (Pen. Code, § 1181) and motions for judgment of acquittal *114 (Pen. Code, § 1118.1) in light of the newly decided cases of Burks v. United States (1978) 437 U.S. 1 [57 L.Ed.2d 1, 98 S.Ct. 2141] and Greene v. Massey (1978) 437 U.S. 19 [57 L.Ed.2d 15, 98 S.Ct. 2151], as follows:
"... the statutory command of Penal Code section 1180, ... provides that `The granting of a new trial places the parties in the same position as if no trial had been had. All the testimony must be produced anew, and the former verdict or finding cannot be used or referred to, either in evidence or in argument, or be pleaded in bar of any conviction which might have been had under the accusatory pleading' (italics added). Thus, the granting of a new trial has the same effect as a mistrial.
"The granting of a motion for judgment of acquittal pursuant to the provisions of section 1118.1, on the other hand, has entirely different consequences. These consequences flow from different standards employed by the trial court in ruling upon a motion for judgment of acquittal. `The "test to be applied by the trial court under [§ 11181.1] is ... the same test applied by an appellate court in reviewing a conviction: whether from the evidence, including reasonable inferences to be drawn therefrom, there is any substantial evidence of the existence of each element of the offense charged [citations]."' (Italics added.) [Citation.] [Fn. omitted.] The People concede that the granting of a motion for judgment of acquittal pursuant to the provisions of section 1118.1 would bar another prosecution for the same offenses; indeed, such a result is compelled by statute (Pen. Code, § 1118.2; [citation]). [Fn. omitted.]" (89 Cal. App.3d at pp. 727-728.)
In their return to the alternative writ, the People contend that the court abdicated the duty conferred upon it by Penal Code section 1118.1 and in effect permitted the district attorney to make the determination whether the evidence was insufficient; thus the order was void, and petitioner may be tried anew. The record, however, does not support the contention that the district attorney made any such determination: the district attorney merely stated: "I'm not saying what the Court's ruling should be, I just think that his motion has some *115 merit." (Italics added.) Moreover, the district attorney voiced no objection as respondent court dismissed the jury as to all three defendants.[1]
It is clear from respondent court's comments to the jury that respondent court applied the test to be employed in ruling upon a motion for judgment of acquittal: "`... the same test applied by an appellate court in reviewing a conviction: whether from the evidence, including reasonable inferences to be drawn therefrom, there is any substantial evidence of the existence of each element of the offense charged.'" Veitch v. Superior Court, supra, 89 Cal. App.3d at page 727. The granting of a motion for judgment of acquittal pursuant to the provisions of Penal Code section 1118.1 bars another prosecution for the same offenses; indeed, such a result is compelled by statute. (Pen. Code, § 1118.2; Veitch v. Superior Court, supra, pp. 727-728.)
We conclude, under the circumstances shown here, that respondent court's action in rejecting petitioner's pleas of once in jeopardy and former judgment of acquittal and in setting the identical charges of which petitioner had been acquitted pursuant to Penal Code section 1118.1 for a second trial subjected petitioner to double jeopardy in violation of the Fifth Amendment to the United States Constitution, and article I, section 15 of the Constitution of the State of California.
Let a peremptory writ of prohibition issue to restrain the further prosecution of petitioner.
Rouse, Acting P.J., and Smith, J., concurred.
NOTES
[1]  In so doing, the court made the following statement:

"I have determined not to give the case to you. There is a rule of law that mere presence at the scene of a crime which does not itself assist the commission of the crime does not amount to aiding and abetting, and you were going to be given an aiding and abetting instruction. And, also, it applies that mere knowledge that a crime is being committed and failure to prevent it does not amount to aiding and abetting....
"... as far as the [defendants] were concerned, there was no residue on their hands no contraband found on them, I just did not find there was sufficient evidence to warrant the case going to you. They made a proper motion, I made my ruling, which I have the duty to do.... You are dismissed from further attendance on the court."
