This case raises an issue not considered in Wiley v. County of San Diego (1998) 19 Cal.4th 532 [79 Cal.Rptr.2d 672, 966 P.2d 983] (Wiley), Coscia v. McKenna & Cunio (2001) 25 Cal.4th 1194 [108 Cal.Rptr.2d 471, 25 P.3d 670] (Coscia) or Sangha v. LaBarbera (2006) 146 Cal.App.4th 79 [52 Cal.Rptr.3d 640] (Sangha). The court in Sangha specifically left open the issue raised in this case. (Sangha, supra, at p. 90, fn. 8.) I believe the trial court erred in determining that plaintiff and appellant Jaleh Wilkinson (Wilkinson) could not plead a cause of action for malpractice. I would reverse the judgment to allow Wilkinson the opportunity to attempt to plead facts sufficient to state such a cause of action.
A jury convicted Wilkinson of one felony (Pen. Code, § 243.1 [felony battery on a custodial officer]) and two misdemeanors (Veh. Code, §§ 23152, subd. (a) [driving under the influence], 20002, subd. (a) [failing to stop at the scene of an accident]). Wilkinson was represented at her criminal trial by defendant and respondent Garrett Jason Zelen and the Law Offices of Garrett J. Zelen (collectively Zelen). Although the California Supreme Court affirmed Wilkinson’s convictions on direct appeal (People v. Wilkinson (2004) 33 Cal.4th 821 [16 Cal.Rptr.3d 420, 94 P.3d 551]), the Court of Appeal issued an order to show cause returnable in the trial court on Wilkinson’s petition for a writ of habeas corpus. Wilkinson alleged in her petition that Zelen had provided ineffective representation at her trial. The prosecution did not oppose the habeas corpus petition. The trial court granted Wilkinson a writ of habeas corpus and vacated her convictions on all three counts. Pursuant to a plea agreement, Wilkinson subsequently entered no contest pleas to two misdemeanor counts. (Veh. Code, § 23152, subd. (a) [driving under the influence]; Pen. Code, § 148 [resisting, delaying or obstructing a public officer, peace officer, or emergency medical technician].)
Wilkinson sued Zelen for legal malpractice and breach of contract. The trial court sustained Zelen’s demurrer to Wilkinson’s first amended complaint without leave to amend on the basis that Wilkinson had not been exonerated by postconviction relief and could not plead that she was actually innocent, citing Coscia, supra, 25 Cal.4th 1194, and Wiley, supra, 19 Cal.4th 532.
I would reverse the judgment. Wilkinson obtained postconviction relief by obtaining a writ of habeas corpus. Although Wilkinson subsequently pleaded no contest to two misdemeanor counts, she should have the opportunity to attempt to plead actual innocence as to the felony conviction that was vacated by the writ of habeas corpus and that formed the gravamen of her malpractice claim against Zelen, and to plead that the felony conviction was unrelated to the two counts to which she pleaded no contest.
*51DISCUSSION
A. Exoneration
In Coscia, supra, 25 Cal.4th 1194, the Supreme Court held that a plaintiff alleging malpractice against an attorney who represented the plaintiff in criminal proceedings resulting in a conviction must allege facts showing that the plaintiff obtained postconviction relief for that conviction “in the form of a final disposition of the underlying criminal case—for example, by acquittal after retrial, reversal on appeal with directions to dismiss the charges, reversal followed by the People’s refusal to continue the prosecution, or a grant of habeas corpus relief.” (Id. at p. 1205.) Wilkinson alleged such facts. The trial court granted a habeas corpus writ, and Wilkinson’s three convictions were vacated. The felony count was dismissed on the People’s motion. Wilkinson’s claim for malpractice relates only to her conviction on the felony count.
Sangha, supra, 146 Cal.App.4th 79, is distinguishable. In that case, the plaintiff originally pleaded guilty to felony vandalism. The plea was later set aside, and the plaintiff pleaded guilty to the lesser included offense of misdemeanor vandalism, based on the same conduct charged in the felony. (Id. at pp. 82-83.) As a result, the final disposition of the crime that was the basis of the plaintiff’s malpractice complaint (the felony vandalism conviction) was not exoneration, but a conviction on a lesser included offense and a sentence of probation. The court in Sangha therefore held that the plaintiff had not obtained a final disposition of the vandalism charge that exonerated him. (Id. at p. 90.) The court appeared to conflate the requirements for actual innocence and those for exoneration.
Unlike in Sangha, supra, 146 Cal.App.4th 79, the plaintiff here, Wilkinson, may be able to allege in an amended pleading that her misdemeanor convictions are based on criminal conduct separate and distinct from the conduct that gave rise to her conviction for felony battery of a custodial officer. As described by the California Supreme Court, the crimes of which Wilkinson originally was convicted arose from two distinct courses of conduct—her conduct in driving under the influence and fleeing from police, on the one hand, and her conduct after she had been arrested, transported to the jail and booked, on the other hand. (People v. Wilkinson, supra, 33 Cal.4th at pp. 828-829.)
Whether two crimes are transactionally related is a factual determination requiring consideration of all the circumstances relating to the admitted offense. (People v. Calhoun (2007) 40 Cal.4th 398, 406-407 [53 Cal.Rptr.3d 539, 150 P.3d 220]; People v. Harvey (1979) 25 Cal.3d 754, 758-759 [159 Cal.Rptr. 696, 602 P.2d 396]; People v. Beagle (2004) 125 Cal.App.4th 415, *52421-422 [22 Cal.Rptr.3d 757]; People v. Guevara (1979) 88 Cal.App.3d 86, 92-94 [151 Cal.Rptr. 511].) Crimes are transactionally related only if they involve “facts from which it could ... be inferred that some action of the defendant giving rise to the dismissed count was also involved in the admitted count.” (People v. Beagle, supra, 125 Cal.App.4th at p. 421.) Here, Wilkinson’s malpractice complaint is based on her conviction for the felony charge of battery of a custodial officer, which occurred after she had been arrested and transported to the jail. One misdemeanor count of which Wilkinson now stands convicted—driving under the influence—necessarily was based on her conduct prior to her arrest, and thus separate from that involved in the felony battery charge. If the other misdemeanor count of which she stands convicted—obstructing a peace officer—also is not factually related to the felony battery charge, then those offenses are not transactionally related. Nothing in Coscia, supra, 25 Cal.4th 1194, requires that a plaintiff obtain postconviction exoneration for crimes different than those that underlie her malpractice action. Even assuming that Wilkinson had not adequately pleaded exoneration by alleging the granting of a writ of habeas corpus, she should be given the opportunity to plead that she has satisfied the exoneration requirement by not entering a plea of no contest to the felony battery crime or any crime transactionally related to that crime.
In addition to whether the charges were transactionally related, it might be relevant to the issue of exoneration whether Wilkinson pleaded no contest to the misdemeanor charge of obstructing a peace officer in exchange for the People’s agreement not to pursue the felony battery count. Neither the complaint nor the matters subject to judicial notice conclusively establish that she did so. If the existence of such a plea bargain is determinative, Wilkinson should be given the opportunity to plead that her plea of no contest was not given in exchange for the People’s agreement not to proceed on the felony charge.
B. Actual Innocence
The court in Sangha, supra, 146 Cal.App.4th 79, a case that arose on summary judgment, raised the following point: “The parties disagree on the scope of the actual innocence requirement. Does it apply only to specific offenses that are the subject of a plaintiff’s malpractice action? Does this requirement encompass lesser included offenses? Or, more broadly, does it apply to all related offenses that were or might have been charged? (Wiley, supra, 19 Cal.4th at p. 547 (conc. opn. of Werdegar, J.).) Wiley does not directly address these issues.” (Sangha, supra, 146 Cal.App.4th at p. 86.) The court stated, “Our analysis is two-fold: Even assuming Sangha need only show actual innocence on the felony vandalism charge, his separate statement fails to demonstrate a triable issue of fact on this issue. And even if Sangha *53could surmount this obstacle, we conclude the rationale of Wiley and Coscia requires a plaintiff in a criminal legal malpractice case to show actual innocence and postconviction exoneration on any guilty finding for a lesser included offense, even though the plaintiff alleges he received negligent representation only on the greater offense. Because Sangha fails to make this showing, he cannot prevail on appeal.” (Sangha, supra, 146 Cal.App.4th at p. 87.)
The court in Sangha, supra, 146 Cal.App.4th 79, specified that a plaintiff asserting malpractice in a criminal matter cannot establish actual innocence if he or she was found guilty of a lesser included offense. Here, as noted above, the offenses to which plaintiff ultimately entered no contest pleas—driving under the influence and obstructing a peace officer—may be separate from and unrelated to the felony count of battery of a custodial officer. If Wilkinson can plead facts that the two misdemeanors of which she stands convicted involved conduct unrelated to the felony battery conviction (see People v. Wilkinson, supra, 33 Cal.4th at pp. 827-828), she can state a cause of action for professional negligence.1
If Wilkinson can plead such facts, the policy considerations upon which the court in Wiley, supra, 19 Cal.4th 532, based the requirement of actual innocence would not be implicated in this case. She would not profit from the criminal conduct of which she stands convicted (id. at p. 537); she would not escape or diminish her punishment for that conduct (id. at pp. 537-538); and there would be no prospect of conflicting resolutions on the issue of whether she committed a battery against a custodial officer (id. at p. 544). Moreover, although Wilkinson has obtained postconviction relief on her felony conviction, she has not been afforded full relief for her attorney’s alleged negligence. She allegedly suffered damages resulting specifically from her conviction on the felony count, including the loss of her job and denial of her petition for naturalization, that are readily compensable in money damages. (Id. at pp. 542-543.)
The difference between this case and both Wiley, supra, 19 Cal.4th 532, and Sangha, supra, 146 Cal.App.4th 79, is illustrated by a troubling hypothetical raised by plaintiff’s attorney in the trial court. “Suppose a defendant is convicted of a multi-count indictment and one of the convictions is first degree murder and another conviction is trespass, and a habeas corpus petition is granted, and the murder conviction is dismissed outright, yet the defendant pleads nolo contendere to the trespass, which is essentially the situation we have here, [f] And does public policy prevent that defendant *54from suing his or her attorney on the felony conviction when they have been actually innocent of that crime.” The trial court said that, although the result was “possibly unjust,” it was bound by Wiley.
The court in Wiley, supra, 19 Cal.4th 532, in quoting from a prior Court of Appeal decision, states, “In sum, ‘the notion of paying damages to a plaintiff who actually committed the criminal offense solely because a lawyer’s negligence failed to secure an acquittal is of questionable public policy and is contrary to the intuitive response that damages should only be awarded to a person who is truly free from any criminal involvement.’ ” (Wiley, supra, 19 Cal.4th at p. 539, italics added, quoting Holliday v. Jones (1989) 215 Cal.App.3d 102, 115, fn. 7 [264 Cal.Rptr. 448].) The court in Wiley also said that “ ‘allowing civil recovery for convicts impermissibly shifts responsibility for the crime away from the convict.’ ” (Wiley, at p. 537.) The court added, “If the defendant has in fact committed a crime, the remedy of a new trial or other relief is sufficient reparation in light of the countervailing public policies and considering the purpose and function of constitutional guaranties. [Citations.]” (Id. at p. 543.)
Such language, if read broadly, could support the conclusion that a malpractice plaintiff must establish actual innocence of any criminal conduct in the criminal case in which the attorney represented the plaintiff, even if the plaintiff ultimately does not stand convicted of the particular crime relied upon in the malpractice claim. But the court in Wiley, supra, 19 Cal.4th 532, did not address the situation here. And neither did the court in Sangha, supra, 146 Cal.App.4th 79. If there can be no liability for malpractice in connection with one count when there are no contest pleas as to unrelated counts, then we allow the injustice to which the trial court alluded in connection with the hypothetical. I read the court’s language in Wiley to mean that no malpractice action can be brought if the plaintiff cannot prove actual innocence of all criminal activity arising from the conduct underlying the conviction that is the subject of the malpractice action. The fact that a malpractice plaintiff committed some crime—no matter how unrelated to the crime of which the plaintiff was exonerated and is innocent—should not bar the plaintiff’s malpractice action based on the attorney’s negligence in connection with the exonerated crime.
This case arises on a demurrer. The trial court’s decision was based on the premise that under no circumstances could Wilkinson state a cause of action. As explained above, Wilkinson was exonerated on the felony battery count. She should have the opportunity to attempt to plead and establish that she was, in fact, innocent of that offense and any lesser included or related offense, and that the crimes to which she pleaded no contest involved facts *55unrelated to the felony battery count of which she was exonerated. (See Coscia, supra, 25 Cal.4th at p. 1211 [granting leave to amend to allege actual innocence].)
It is true that no court has determined that plaintiff is actually innocent of felony battery. But that is not dispositive. Indeed, the Supreme Court stated in Coscia, supra, 25 Cal.4th at page 1205, that a plaintiff may maintain a malpractice case so long as the plaintiff obtains “postconviction relief in the form of a final disposition of the underlying criminal case—for example, by . . . reversal followed by the People’s refusal to continue the prosecution, or a grant of habeas corpus relief—as a prerequisite to proving actual innocence in a malpractice action against former criminal defense counsel.” Here, plaintiff has fulfilled the prerequisite and now pleads and seeks to prove actual innocence.
I would reverse the judgment.
Appellant’s petition for review by the Supreme Court was denied December 10, 2008, S168012. Kennard, J., and Werdegar, J., were of the opinion that the petition should be granted.
The court in Sangha, supra, 146 Cal.App.4th at page 90, footnote 8 said, “Because the issue has no bearing on our decision, we do not decide whether the actual innocence requirement applies to all transactionally related offenses.”