
129 Cal.Rptr.2d 31 (2003)
104 Cal.App.4th 1339
In re Efren CRUZ, on Habeas Corpus.
No. B154156.
Court of Appeal, Second District, Division Six.
January 2, 2003.
Review Denied April 23, 2003.[*]
*34 Kevin G. DeNoce, under appointment by the Court of Appeal; Dunn & Sanderson and Philip R. Dunn, Thousands Oaks, for Respondent Cruz.
PERREN, J.
Efren Cruz was convicted of murder and attempted murder in 1997. At his trial, Cruz denied firing the fatal shots. Although he was corroborated by at least one other witness, an independent witness identified Cruz as the "shooter" and tests revealed the presence of gunshot residue on his hands. We affirmed his conviction on appeal, but this was the beginning of the story, not its end. Cruz challenged his conviction by filing a petition for writ of habeas corpus before the same judge who presided at the trial. Cruz asserted that newly discovered evidence establishes that he was not the shooter.
At the hearing on the habeas corpus petition, Cruz offered evidence that it was one Gerardo Reyes, and not he, who was the shooter. Reyes' involvement in the shooting was known at the time of trial, but hearsay testimony by Cruz's girlfriend that Reyes fired the shots was rejected. The newly discovered evidence offered in the habeas corpus proceeding, however, was testimony from an informant and a recorded statement from Reyes himself in which he admitted that he was the shooter.
During the habeas corpus hearing, Cruz convinced the trial court that Reyes, not Cruz, fired the shots. The court vacated the murder and attempted murder convictions and ordered further sentencing proceedings on another count in the underlying case. At the sentencing hearing in the murder case, the People, at the court's invitation, dismissed the murder and attempted murder charges against Cruz pursuant to Penal Code section 1385.[1]
On this appeal, the People do not challenge the findings made in the habeas corpus proceeding. Rather, the People appeal from the trial judge's order, made two days after the charges were dismissed, that principles of collateral estoppel barred retrial of Cruz on the theory that he was the shooter.
We hold that, based on both law and logic, the factual findings made in an order in a habeas corpus proceeding have no collateral estoppel effect limiting a subsequent retrial of the criminal charges. Accordingly, we reverse the order barring retrial of Cruz on a theory that he fired the lethal shots, but do not otherwise disturb the orders of the trial court.

FACTS AND PROCEDURAL HISTORY
After a 1997 jury trial, Cruz was convicted of the second degree murder of Michael Torres (§§ 187/189), the attempted murder of James Miranda (§§ 187/664), and possession of a dirk or dagger (§ 12020, subd. (a)). Torres was killed and Miranda was wounded by gunshots fired during a confrontation between two gangs in a Santa Barbara parking structure (Lot 10). Cruz *35 was tried and convicted on the theory that he was the one who fired the gun. The jury made true findings on allegations that he used a firearm in committing the murder and attempted murder (§ 12022.5, subd. (a)), and that commission of the crimes was for the benefit of, at the direction of, and in association with, a criminal street gang (§ 186.22, subd. (b)(4)). This court affirmed that conviction.
In January 2001, Cruz filed a petition for writ of habeas corpus alleging that new evidence would prove that Cruz's cousin, Gerardo Reyes, was the shooter. The new evidence focused on a conversation between Reyes and an informant that was secretly recorded while both were in jail in Ventura County. During the conversation, Reyes stated that he, not Cruz, fired the shots in the Lot 10 shooting. This evidence was given to the Santa Barbara District Attorney by the Ventura County District Attorney. Cruz filed his petition when Santa Barbara authorities declined to seek court intervention.
After an 18-day evidentiary hearing, the trial court granted a writ of habeas corpus, vacating the murder and attempted murder convictions and the firearm enhancements. In a decision and order filed on October 12, 2001, the court stated that Cruz had "met his burden of proving by a preponderance of the substantial credible evidence that Gerardo Reyes was the shooter. . .."
On October 22, 2001, after the proceedings on the habeas corpus petition had been concluded, the trial court conducted a new sentencing hearing on the remaining conviction arising from the murder prosecution. During the sentencing hearing, the prosecution asserted that the effect of the orders made at the hearing on the writ of habeas corpus was to vacate the conviction and reinstate the murder and attempted murder charges. The prosecutor then moved to dismiss the charges pursuant to section 1385, stating that "we believe our only viable option at this time is to dismiss those [charges] and not reinstate charges against the defendant. . .." The court granted the motion.
On October 24, 2001, the trial court issued its order after hearing formalizing its October 22 sentencing orders and purporting to construe the res judicata effect of the decision made by the court in the habeas corpus proceeding. The October 24 order stated that the "People are precluded by the collateral estoppel aspect of res judicata, based upon the double jeopardy clause of the Fifth Amendment, from re-litigating in any new proceeding the factual issues actually and necessarily determined in the habeas proceeding. . .. The fact that Mr. Cruz was not the shooter was a factual issue necessarily and actually determined on its merits in the habeas proceedings."
The notice of appeal states that the People appeal from the order and judgment in the habeas corpus proceeding but that the People "intend to focus our appeal on the propriety of so much of the judgment as is articulated in the court's `Order After Hearing,' filed October 24, 2001, ordering that `further prosecution based upon the factual issues determined in these proceedings is precluded.'" The People do not challenge the factual finding that Cruz was not the shooter or the vacating of his conviction as discussed in the October 12 decision.

DISCUSSION

Collateral Estoppel Does Not Bar Retrial on the Theory that Cruz was the Shooter
The "Great Writ" of habeas corpus has been called "the safe-guard and the palladium of our liberties." (In re Begerow *36 (1901) 133 Cal. 349, 353, 65 P. 828.) It is "`regarded as the greatest remedy known to the law whereby one unlawfully restrained of his liberty can secure his release. . ..'" (In re Clark (1993) 5 Cal.4th 750, 764, 21 Cal.Rptr.2d 509, 855 P.2d 729, quoting Matter of Ford (1911) 160 Cal. 334, 340, 116 P. 757.) The facts of this case demonstrate how apt that description continues to be; but no matter how "great" its scope may be, the relief granted in a habeas corpus proceeding is not without limitation.
A conviction may be challenged by a petition for writ of habeas corpus based on newly discovered evidence. (In re Clark, supra, 5 Cal.4th at p. 766, 21 Cal.Rptr.2d 509, 855 P.2d 729.) To warrant issuance of a writ, the new evidence must not merely weaken the prosecution's case. It must create fundamental doubt in the accuracy of the proceedings and "point unerringly to innocence or reduced culpability." (People v. Gonzalez (1990) 51 Cal.3d 1179, 1246, 275 Cal.Rptr. 729, 800 P.2d 1159; In re Hall (1981) 30 Cal.3d 408, 417, 179 Cal.Rptr. 223, 637 P.2d 690.) Here, Cruz satisfied that heavy burden by offering new evidence that Reyes, not Cruz, was the Lot 10 shooter. Following a thorough 61-page discussion of the evidence presented at the hearing, the trial court granted the writ. But, after issuing its decision, the trial court went further and ruled that principles of collateral estoppel preclude a retrial of Cruz on the theory that he was the shooter. As we shall discuss, this ruling was error.
In criminal cases, the doctrine of collateral estoppel is derived from the double jeopardy clause in the Fifth Amendment. (Ashe v. Swenson (1970) 397 U.S. 436, 445, 90 S.Ct. 1189, 25 L.Ed.2d 469.) Double jeopardy bars successive trials for the same offense, but allows retrial of a defendant whose first conviction is set aside through direct appeal or collateral attack for reasons other than legal insufficiency of the evidence. (E.g., Lockhart v. Nelson (1988) 488 U.S. 33, 38, 109 S.Ct. 285, 102 L.Ed.2d 265; United States v. DiFrancesco (1980) 449 U.S. 117, 131, 101 S.Ct. 426, 66 L.Ed.2d 328.)
Although analytically distinct from double jeopardy, the doctrine of collateral estoppel is an equitable component of it, and bars relitigation of previously determined issues. (People v. Santamaria (1994) 8 Cal.4th 903, 912, fn. 3, 35 Cal. Rptr.2d 624, 884 P.2d 81.) Collateral estoppel prohibits the same parties from retrying an "issue of ultimate fact" identical to an issue actually and necessarily decided in a prior proceeding that resulted in a final judgment on the merits. (Ashe v. Swenson, supra, 397 U.S. at p. 443, 90 S.Ct. 1189; Santamaria, at pp. 912, 916, 35 Cal.Rptr.2d 624, 884 P.2d 81.) An "issue of ultimate fact" is a fact that must be proven beyond a reasonable doubt at trial, including each of the essential elements of the charged offense. (Santamaria, at p. 921, 35 Cal.Rptr.2d 624, 884 P.2d 81; U.S. v. Bailin (7th Cir.1992) 977 F.2d 270, 280.)
In Santamaria, a jury convicted the defendant of murder by stabbing, but found an allegation that he personally used a knife to be untrue. The conviction was reversed and our Supreme Court held that the defendant could be retried on the theory that he himself stabbed the victim because personal use of a knife was not an ultimate issue of fact in proving the murder. (People v. Santamaria, supra, 8 Cal.4th at pp. 918, 922, 35 Cal.Rptr.2d 624, 884 P.2d 81.) Evidence proving that the defendant was an aider and abettor would also be sufficient for a conviction. "Murder . . ., like any substantive offense, need not be personal; an aider and abettor of the actual killer is equally guilty." (Id. at *37 p. 918, 35 Cal.Rptr.2d 624, 884 P.2d 81; see also Santamaria v. Horsley (9th Cir. 1998) 133 F.3d 1242, as mod. 138 F.3d 1280, 1281 [rejected federal habeas corpus writ in Santamaria, agreeing with California Supreme Court's ultimate fact analysis in concluding that defendant could be retried on the theory that he was the stabber].)
Similarly, the order in Cruz's habeas corpus proceeding did not decide an issue of ultimate fact in a trial of the murder and attempted murder charges. The court hearing the habeas corpus petition concluded that Cruz was not the Lot 10 shooter but made no factual finding that would affect a conviction on an aider and abettor theory. Therefore, the doctrine of collateral estoppel does not preclude retrial on any theory, including the theory that Cruz fired the shots himself. To conclude otherwise would deny the prosecution a fair opportunity to prosecute Cruz. (People v. Santamaria, supra, 8 Cal.4th at p. 926, 35 Cal.Rptr.2d 624, 884 P.2d 81.)
Cruz asserts that the habeas court's finding should have greater collateral estoppel effect than the jury verdict in Santamaria, As Cruz points out, the not true finding on the enhancement in Santamaria did not determine that someone else stabbed the victim, only that the jury did not believe that the defendant's personal use of the knife had been proven beyond a reasonable doubt. Here, the habeas corpus court concluded that based on the preponderance of evidence before the court, Gerardo Reyes, not Cruz, fired the shots in the Lot 10 shooting.
We do not discount the differences between this case and Santamaria, but reject Cruz's contention. First, Cruz misconceives the requirement that collateral estoppel applies only to issues of ultimate fact decided in a prior proceeding. The identity of the shooter is not an "issue of ultimate fact," whether his identity is established or remains in doubt. A jury could have convicted Cruz in either event, and the habeas corpus court did not bar retrial on an aider and abettor theory.
Second, Cruz misperceives the nature and purpose of the writ of habeas corpus. Although the finding of the habeas corpus court in this case was unequivocal, a habeas corpus proceeding is not a trial of guilt or innocence and the findings of the habeas corpus court do not constitute an acquittal. The scope of a writ of habeas corpus is broad, but in this case, as in most cases, it is designed to correct an erroneous conviction. It achieves that purpose by invalidating the conviction and restoring the defendant to the position she or he would be in if there had been no trial and conviction. (In re Crow (1971) 4 Cal.3d 613, 620, 94 Cal.Rptr. 254, 483 P.2d 1206; see also In re Hall, supra, 30 Cal.3d at p. 435, 179 Cal.Rptr. 223, 637 P.2d 690.)
Thus, the conviction is set aside but the prosecution is not ended. Delay in discovering material evidence does not unseat the jury as the ultimate arbiter of guilt or innocence. By analogy, if the evidence presented at the habeas corpus hearing had been presented at trial, the jury might have acquitted Cruz, but it might also have convicted him. The totality of the evidence would present the trier of fact with the question of what happened. The fact that some evidence may point toward innocence while other and substantial evidence would justify a conviction is a scenario common to a criminal trial. The essence of the jury's task is to resolve precisely such conflicts. The order of the habeas corpus court vacating the conviction is justified because the newly discovered evidence was not presented at trial for the jury's consideration, not because the evidence would have compelled an acquittal had it been presented.
*38 Moreover, Cruz cites no authority, and we have found none, giving collateral estoppel effect in a subsequent trial to a factual finding made in a habeas proceeding. Nor is there authority preventing a retrial after a writ of habeas corpus is issued on the ground of newly discovered evidence, and no authority preventing retrial when the writ is issued for any reason except in very unusual circumstances.[2]
To the contrary, a successful habeas corpus petition necessarily contemplates and virtually always permits a retrial. (See In re Martin (1987) 44 Cal.3d 1, 53, 241 Cal.Rptr. 263, 744 P.2d 374; People v. Kasim (1997) 56 Cal.App.4th 1360, 1388, 66 Cal.Rptr.2d 494.) The possibility of a retrial is often assumed without discussion. (See In re Hall, supra, 30 Cal.3d at p. 435, 179 Cal.Rptr. 223, 637 P.2d 690 [remand after writ granted based on newly discovered evidence of factual innocence]; see also People v. Garcia (1993) 17 Cal. App.4th 1169, 1186, 22 Cal.Rptr.2d 545.)
As we have previously noted, giving the habeas corpus order collateral estoppel effect would eviscerate the People's right to a jury trial and conflict with the strong public policy favoring determination of guilt or innocence in a trial. As the People point out, this policy is the basis for the Supreme Court's holding in Lucido v. Superior Court (1990) 51 Cal.3d 335, 339-342, 272 Cal.Rptr. 767, 795 P.2d 1223, that collateral estoppel does not preclude prosecution of an offense after the People failed to prove a probation violation based on the same conduct. The court concluded that probation hearings and criminal trials serve different public interests (id. at p. 347, 272 Cal.Rptr. 767, 795 P.2d 1223), and that preempting trial by a decision to revoke probation, a decision which is designed to perform a different legal task, would undermine the function of the criminal trial process as the exclusive forum for determining guilt or innocence. (Id. at pp. 349-350, 272 Cal.Rptr. 767, 795 P.2d 1223.) We do not suggest that a habeas corpus proceeding resembles a probation revocation hearing, but Lucido is instructive in protecting the trial process as a matter of fundamental public policy even where other factors may favor application of principles of collateral estoppel.
By analogy, a petition for a writ of habeas corpus based on newly discovered evidence resembles a motion for a new trial based on newly discovered evidence. (§ 1180.) In order to grant a motion for new trial, the court must conclude that a different result is probable on retrial. (See People v. Beeler (1995) 9 Cal.4th 953, 1004, 39 Cal.Rptr.2d 607, 891 P.2d 153.) But such a finding compels a retrial; it does not bar one. Collateral estoppel applies to a final decision on the merits (Maddern v. Superior Court (1972) 22 Cal.App.3d 998, 1004, 99 Cal.Rptr. 832), and, similar to an order granting a new trial, the habeas order in this case signals that, despite the passage of time, the case against Cruz is not final. The court ruling on the petition in the instant matter weighed the newly discovered evidence and concluded that a conviction without jury consideration of the new evidence was an injustice.
*39 Trial courts have the power to acquit for legal insufficiency of the evidence at trial. (§ 1118.1; see People v. Hatch (2000) 22 Cal.4th 260, 268-269, 92 Cal.Rptr.2d 80, 991 P.2d 165.) But, here, the habeas corpus court did not find that the evidence at trial was insufficient to support a conviction, or that a reasonable jury could not convict Cruz based on consideration of the newly discovered evidence along with other evidence. In fact, the record includes substantial evidence that Cruz was the shooter, which a jury could consider persuasive in a second trial. While evidence that Reyes fired the shots may make a conviction on retrial more difficult or unlikely, this evidence does not bar retrial because there is no basis to conclude that the evidence as a whole is insufficient to support a conviction. (See In re Darr (1983) 143 Cal.App.3d 500, 515, 191 Cal.Rptr. 882.)
Finally, Cruz's reliance on In re Crow, supra, 4 Cal.3d at pages 621-623, 94 Cal. Rptr. 254, 483 P.2d 1206, is misplaced. In Crow, after the habeas corpus court issued an order granting the defendant a new trial, the prosecution attempted to disregard the order and proceed as if the original judgment remained in effect. The Supreme Court held that the new trial order was essentially an order setting aside the defendant's conviction and, once it became final, was entitled to res judicata effect.
Crow does not stand for the proposition that the factual findings in a writ of habeas corpus have any collateral estoppel effect. Rather, as applied to this case, Crow merely stands for the undisputed proposition that the order vacating Cruz's conviction and releasing him from custody cannot be relitigated in a subsequent proceeding.

Double Jeopardy
Cruz contends that, apart from collateral estoppel, principles of double jeopardy prevent the People from retrying him on any theory of guilt. He argues that the habeas order and the dismissal of the murder and attempted murder charges after the order preclude retrial. Again, we disagree.
As we have previously stated, except for reversals based on the legal insufficiency of the evidence at trial, it is established that the double jeopardy clause in the federal and state Constitutions does not prevent the People from retrying a defendant whose conviction is set aside through direct appeal or collateral attack. (See, e.g., People v. Santamaria, supra, 8 Cal.4th at pp. 910-911, 35 Cal.Rptr.2d 624, 884 P.2d 81; Lockhart v. Nelson, supra, 488 U.S. at p. 38, 109 S.Ct. 285; United States v. DiFrancesco, supra, 449 U.S. at p. 131, 101 S.Ct. 426.)
Cruz claims that the trial court's granting of the prosecution's motion to dismiss the charges in the sentencing hearing should be treated as a dismissal based on the insufficiency of the evidence as a matter of law. A section 1385 dismissal for the legal insufficiency of the evidence is tantamount to an acquittal, and retrial would unconstitutionally place the defendant in double jeopardy. (People v. Hatch, supra, 22 Cal.4th at p. 273, 92 Cal.Rptr.2d 80, 991 P.2d 165.) But, a dismissal is not deemed to be based on legal insufficiency unless the record clearly shows that the court applied the substantial evidence standard of review and concluded that no reasonable trier of fact could find guilt beyond a reasonable doubt. (Ibid.)
There is no such showing here. On October 22, 2001, the prosecutor moved to dismiss the murder and attempted murder charges, stating that "we believe our only viable option at this time is to dismiss those [charges] and not reinstate charges against the defendant. . .." The court granted the motion without comment. *40 There is no indication that the trial court considered the evidence offered at trial or at the hearing on the habeas corpus petition to be legally insufficient to convict. Also, if the court intended to dismiss for legal insufficiency of the evidence, this determination must "be set forth in an order entered upon the minutes." (§ 1385, subd. (a); People v. Orin (1975) 13 Cal.3d 937, 944,120 Cal.Rptr. 65, 533 P.2d 193.)
Two days after the district attorney's motion, the court issued its order after hearing stating that on October 22, 2001, "the prosecutor moved to dismiss . . . the original murder and attempted murder charges. The Court understood the motion to be a conciliatory gesture without any legal impact. The Court granted the motion on the prosecutor's representation that the People would not reinstate the charges. The motion was made after jeopardy attached and the matter had been conclusively determined on the merits and does not place the charges in any position analogous to dismissal by a magistrate or by a superior court following an order setting aside the information or indictment. (In re Russell (1974) 12 Cal.3d 229, 115 Cal.Rptr. 511, 524 P.2d 1295.)"
This order did not convert the dismissal into a dismissal for legal insufficiency of the evidence. The trial court's statement that it dismissed the charges based on the People's "representation" that the People would not reinstate the charges is not a finding that the evidence at trial was insufficient to support a conviction. In addition, the writ of habeas corpus vacating Cruz's conviction placed the parties in the same position as if Cruz had not been tried and convicted. (In re Crow, supra, 4 Cal.3d at p. 620, 94 Cal.Rptr. 254, 483 P.2d 1206.) Cruz was not in jeopardy, and the People's dismissal of a newly revived information does not bar a later refiling of charges. (§ 1387; People v. Orin, supra, 13 Cal.3d at pp. 945-947, 120 Cal.Rptr. 65, 533 P.2d 193; Paredes v. Superior Court (1999) 77 Cal.App.4th 24, 28, 91 Cal. Rptr.2d 350.) Nothing in the Russell case dictates or supports a contrary conclusion. (In re Russell, supra, 12 Cal.3d at p. 233, 115 Cal.Rptr. 511, 524 P.2d 1295.)
Cruz also argues that the People waived their right to challenge the effect of the dismissal by not objecting to the October 24, 2001, order in the trial court. Since neither the prosecutor's comment regarding the present status of the case nor the court's interpretation of the comment determines the legal effect of the dismissal, there is no issue for the People to have waived. Moreover, there can be no waiver unless the parties are clearly apprised of the order the court intends to impose. (People v. Scott (1994) 9 Cal.4th 331, 356, 36 Cal.Rptr.2d 627, 885 P.2d 1040.) Here, the prosecution had no opportunity to object because the written order was made two days after the hearing.

DISPOSITION
The People do not challenge the order of October 12, 2001, and it is, therefore, affirmed. The order of October 24, 2001, is reversed to the extent that it purports to preclude the People from relitigating at retrial the habeas corpus court's determination that Cruz did not fire the shots in Lot 10. We express no opinion whether there should be such a retrial. That is a decision properly addressed to the "objective and impartial consideration" of the district attorney. (Gov.Code, § 26500; People v. Superior Court (Greer) (1977) 19 Cal.3d 255, 267, 137 Cal.Rptr. 476, 561 P.2d 1164.)
We concur: YEGAN, Acting P.J., and COFFEE, J.
NOTES
[*]   Kennard, J., Werdegar, J., and Morano, J., dissented.
[1]  All statutory references are to the Penal Code unless otherwise indicated.
[2]  Cruz cites In re Pfeiffer (1968) 264 Cal. App.2d 470, 70 Cal.Rptr. 831, but that case highlights the fact that the granting of a writ of habeas corpus will result in a dismissal of charges only under unusual circumstances. In Pfeiffer, the writ was granted due to inadequacies in a juvenile court proceeding. A remand to juvenile court was impossible because the defendant had reached the age of 27 by the time the proceedings were concluded. (Id. at pp. 476-477, 70 Cal.Rptr. 831.) Under those circumstances, a dismissal was the only possible remedy.
