The grant of a new trial on premeditation and gang enhancement allegations following conviction for attempted murder prohibited retrial as a violation of double jeopardy principles. Appellant was found guilty of two counts of attempted murder and discharging a firearm during the commission of the offenses, with gang enhancements pursuant to Penal Code section 186.22, subdivision (b)(1), and enhancements charging that the murders were premeditated, as well as several other offenses. After granting a new trial on the premeditation and gang enhancements, the trial court announced that the prosecutor would be able to set a new trial on those enhancements. Appellant asked the trial court to dismiss the action on double jeopardy grounds. The court rejected his arguments, but stayed the criminal trial until further order of the appellate court. It then sentenced appellant on the remaining counts. The appellate court issued a writ of mandate directing the trial court to enter an order dismissing the premeditation and gang enhancements. A trial court’s order granting a motion for a new trial is not an acquittal unless the record unmistakably indicates the trial court applied the substantial evidence test and concluded that no reasonable trier of fact could find guilt beyond a reasonable doubt. Despite the court’s statements regarding the weakness of the evidence, there was no such affirmative showing here. However, further prosecution was barred by Penal Code section 1023. Under section 1023, when an accused is convicted of a lesser included offense, the conviction bars a subsequent prosecution for the greater offense. Even if the court’s limited grant of a new trial was not an implied acquittal, section 1023 bars further prosecution of the greater offenses, and therefore further trial on the allegations on which the trial court granted a new trial.