Opinion
RAMIREZ, P. J.Valentino Bocanegra alleges that he was arrested on a warrant for a man with a similar but by no means identical name. Even though Bocanegra repeatedly told the authorities that they had the wrong man and noted that his driver’s license, Social Security number, booking photos, and fingerprints would all prove this, he remained in jail for nine days. While incarcerated, he was forcibly sodomized by another inmate.
This appeal concerns just one of the multiple defendants who Bocanegra contends were responsible for his plight: Donald Jakubowski, a deputy district attorney who, according to Bocanegra, negligently failed to determine his true identity and tried to prevent him from ultimately being released. The trial court sustained Jakubowski’s demurrer, which was based on several alternative governmental immunity statutes.
We will affirm. In the published portion of this opinion, we will hold that Bocanegra adequately alleged that Jakubowski was liable for false imprisonment; we will also hold that statutory prosecutorial immunity (Gov. Code, § 821.6) did not apply to the false imprisonment claim. However, the demurrer had to be sustained based on common law prosecutorial immunity.
I
FACTUAL BACKGROUND
Consistent with the applicable standard of review (see pt. Ill, post), the following facts are drawn from the allegations of the operative complaint.
*852On July 16, 2011, Palm Springs police officers conducted a traffic stop of a car that Bocanegra was driving. He was cooperative. He produced his driver’s license, showing his name as “Jose M. Gonzalezbocanegra.” The officers then arrested him on the theory that he was Jose Gonzalez (with no middle initial), the person named in an outstanding arrest warrant for a misdemeanor parole violation.
Bocanegra was booked into a Palm Springs holding facility, then transferred into and booked again at the Banning sheriff’s station, then transferred into and booked yet again at the Riverside County jail, and finally transferred into and booked at the Los Angeles County jail. He was repeatedly subjected to harmful and offensive touchings, in the form of painful and/or prolonged handcuffing. Throughout this process, Bocanegra protested that he was not the Jose Gonzalez named in the warrant, and that his driver’s license, Social Security number, fingerprints, and booking photos would prove this, but to no avail.
Jakubowski was a deputy district attorney for the County of Los Angeles. Starting on July 20, 2011, Jakubowski had the opportunity to free Bocanegra. Jakubowski had a file that included Bocanegra’s driver’s license, Social Security number, fingerprints, and booking photos, as well as fingerprints and booking photos of the person named in the warrant. Thus, Jakubowski was on notice that Bocanegra was wrongfully imprisoned, in that a reasonable person in his position would have inquired into the validity of the imprisonment.2 Meanwhile, Jakubowski did not promptly turn over these exculpatory items to Bocanegra’s defense counsel.
Bocanegra had a court date scheduled for July 21, 2011. His attorney was going to be there and could have secured his release. Los Angeles County Sheriff’s deputies, however, did not let him attend the hearing. Bocanegra “vociferously complained” about this.
That night, Los Angeles County Sheriff’s deputies placed Bocanegra in a cell with a violent sexual predator, who proceeded to forcibly sodomize him. These deputies were retaliating against Bocanegra for his complaints; they intended “that some unwanted sexual attack take place in the manner that it did.”
On July 25, 2011, Bocanegra finally had his first court appearance. Jakubowski was present; he argued to the court that Bocanegra was, in fact, *853the person named in the warrant and should not be released. The judge, however, examined Bocanegra’s booking photographs and fingerprints, realized he was not the person named in the warrant, and released him. The judge even apologized to Bocanegra from the bench.
II
PROCEDURAL BACKGROUND
The operative (i.e., second amended) complaint named as defendants the City of Palm Springs, the County of Riverside, a Riverside County Sheriff’s deputy named Pfeiffer, the County of Los Angeles, and Jakubowski. As against Jakubowski, it asserted causes of action for false imprisonment, assault and battery, intentional infliction of emotional distress, and negligence.
Jakubowski filed a demurrer, arguing that he was statutorily immune under Government Code sections 820.2, 820.8, and 821.6. The trial court sustained the demurrer without leave to amend. It therefore entered judgment against Bocanegra and in favor of Jakubowski.
Ill
STANDARD OF REVIEW
A demurrer should be sustained when “[t]he pleading does not state facts sufficient to constitute a cause of action.” (Code Civ. Proc., § 430.10, subd. (e).)
“Our standard of review of an order sustaining a demurrer is well settled. We independently review the ruling on demurrer and determine de novo whether the complaint alleges facts sufficient to state a cause of action. [Citation.] In doing so, we ‘give the complaint a reasonable interpretation, reading it as a whole and its parts in their context. [Citation.] Further, we treat the demurrer as admitting all material facts properly pleaded, but do not assume the truth of contentions, deductions or conclusions of law. [Citations.]’ [Citation.]” (Parthemore v. Col (2013) 221 Cal.App.4th 1372, 1378 [165 Cal.Rptr.3d 367].)
*854IV
PROSECUTORIAL IMMUNITY UNDER GOVERNMENT CODE SECTION 821.6
Bocanegra contends that Jakubowski was not immune under Government Code section 821.6, as construed in Sullivan v. County of Los Angeles (1974) 12 Cal.3d 710 [117 Cal.Rptr. 241, 527 P.2d 865] (Sullivan).
Government Code section 821.6 provides: “A public employee is not liable for injury caused by his instituting or prosecuting any judicial or administrative proceeding within the scope of his employment, even if he acts maliciously and without probable cause.”
The trial court properly sustained the demurrer to the causes of action for assault and battery, intentional infliction of emotional distress, and negligence based on Government Code section 821.6. Indeed, Bocanegra does not argue otherwise. He does argue, however, that under Sullivan, it erred by sustaining the demurrer to the false imprisonment cause of action.
In Sullivan, the plaintiff sued a county for false imprisonment, alleging that he had been held in jail for 12 days beyond the date on which he was entitled to be released. (Sullivan, supra, 12 Cal.3d at p. 714.) The trial court entered judgment on the pleadings, citing Government Code section 821.6. (Sullivan, at p. 715.)
The Supreme Court began by holding that, if the sheriff was liable for false imprisonment, then the county was derivatively liable under Government Code section 815.2. (Sullivan, supra, 12 Cal.3d at p. 717.) It also held that the plaintiff had alleged sufficient facts to hold the sheriff liable for false imprisonment — namely, that the sheriff knew or should have known that the imprisonment was unlawful. (Id. at pp. 717-719.)
Finally, the court also held that the sheriff was not entitled to immunity under Government Code section 821.6, for two reasons. (Sullivan, supra, 12 Cal.3d at pp. 719-722.) First, it relied on the “plain meaning” of Government Code section 821.6: “ ‘[institute’ means ‘to originate and get established . . . ‘to initiate,’ and ‘prosecute’ means ‘to institute legal proceedings against; esp: to accuse of some crime or breach of law or to pursue for redress or punishment of a crime or violation of law in due legal form before a legal tribunal.’ Thus, viewed literally, the language of the section does not reach the act of holding a person in jail beyond his term.” (Sullivan, at p. 719.) Second, after reviewing the legislative history of Government Code section 821.6, it concluded “that the Legislature intended the section to protect public *855employees from liability only for malicious prosecution and not for false imprisonment.” (Sullivan, at p. 719.)
Jakubowski argues that Sullivan “does not apply” because it dealt with a sheriff rather than a prosecutor.
If he is referring to Sullivan’s holding that Government Code section 821.6 does not apply to false imprisonment, this is a distinction without a difference. The court’s reasoning on this point had nothing to do with whether the defendant was a sheriff, a prosecutor, or any other particular type of public employee.
Actually, however, Jakubowski seems to be referring to Sullivan’s holding that the plaintiff there had alleged sufficient facts to hold the sheriff liable for false imprisonment. Thus, Jakubowski argues that he “did not arrest Appellant [and] he did not confine Appellant.”
Jakubowski did not demur on the ground that the complaint failed to state a cause of action for false imprisonment. Nevertheless, “[t]he failure of a pleading to state facts sufficient to constitute a cause of action is not waived by a failure to demur and may be raised for the first time on appeal. [Citations.]” (Andrews v. Mobile Aire Estates (2005) 125 Cal.App.4th 578, 585, fn. 5 [22 Cal.Rptr.3d 832]; see Buford v. State of California (1980) 104 Cal.App.3d 811, 826 [164 Cal.Rptr. 264].)
“False imprisonment involves the intentional confinement of another against the person’s will. The elements are (1) nonconsensual, intentional confinement of a person, (2) without lawful privilege, (3) for an appreciable period of time, however brief. [Citations.]” (5 Witkin, Summary of Cal. Law (10th ed. 2005) Torts § 426, pp. 642-643.) As Sullivan illustrates, it is not limited to the initial confinement of the victim. Under section 45 of the Restatement Second of Torts, “If the actor is under a duty to release the other from confinement, ... his refusal to do so with the intention of confining the other is a sufficient act of confinement to make him subject to liability.”
“Although false imprisonment is an intentional tort because it entails an intentional act resulting in confinement, it can arise through negligence.” (Lyons v. Fire Ins. Exchange (2008) 161 Cal.App.4th 880, 888 [74 Cal.Rptr.3d 649].) For example, if “a store employee honestly but mistakenly detains a customer the employee believes is a shoplifter[, negligent wrongful detention could be found if the store employee detains the customer without reasonable cause. [Citation.]” (Ibid.)
As Sullivan noted, a police officer can be liable for false imprisonment based not only on an initial arrest, but also on prolongation of the *856imprisonment after the arrest. (Sullivan, supra, 12 Cal.3d at pp. 717-719, citing Shakespeare v. City of Pasadena (1964) 230 Cal.App.2d 375, 386 [40 Cal.Rptr. 863] and Whirl v. Kern (5th Cir. 1968) 407 F.2d 781, 792.) “The test requires either that the [officer] have actual knowledge that the imprisonment of the plaintiff is unlawful or alternatively that he have some notice sufficient to put him, as a reasonable man, under a duty to investigate the validity of the incarceration. [Citation.]” (Sullivan, at p. 719.)
In Hamilton v. City of San Diego (1990) 217 Cal.App.3d 838 [266 Cal.Rptr. 215], the court recognized that the prosecutor assigned to an arrestee’s case has a similar duty. It stated; “Police officers do have affirmative duties. They must, without unnecessary delay, take the arrested person before a committing magistrate to be charged with the offense and have bail set as any unnecessary delay may amount to false imprisonment. [Citation.] There is also an affirmative duty placed on the district attorney. Once he or she has filed a complaint, it is his or her responsibility to gather and present such evidence as will both convict the guilty or exonerate the innocent. [Citation.]” (Id. at p. 846, fn. 7.) More generally, it has been stated that “[a]lthough a prosecutor ‘may strike hard blows, he [or she] is not at liberty to strike foul ones. It is as much his [or her] duty to refrain from improper methods calculated to produce a wrongful conviction as it is to use every legitimate means to bring about a just one.’ [Citation.]” (People v. Garcia (2014) 229 Cal.App.4th 302, 316-317 [177 Cal.Rptr.3d 231].) Here, the complaint alleged that Jakubowski should have known that Bocanegra was wrongfully imprisoned. If so, he had a duty to bring about his release, and his failure to do so was a tort.
We therefore conclude that the complaint adequately alleged a cause of action against Jakubowski for false imprisonment. Solely with respect to this cause of action, Jakubowski was not immune under Government Code section 821.6.
V, VI*
VII
COMMON LAW PROSECUTORIAL IMMUNITY
As noted, the demurrer was based on various statutory immunities. However, we requested further briefing on whether the complaint was subject to *857demurrer based on common law prosecutorial immunity. Having received and reviewed such further briefing, we conclude that the demurrer had to be sustained based on common law prosecutorial immunity.
“ ‘As a general rule a party is not permitted to change its position on appeal and raise new issues not presented in the trial court. [Citation.] . . . However, “a litigant may raise for the first time on appeal a pure question of law which is presented by undisputed facts.” [Citation.] A demurrer is directed to the face of a complaint [citation] and it raises only questions of law [citations]. Thus an appellant challenging the sustaining of a general demurrer may change his or her theory on appeal [citation], and an appellate court can affirm or reverse the ruling on new grounds. [Citations.]’ [Citation.]” (Sanchez v. Truck Ins. Exchange (1994) 21 Cal.App.4th 1778, 1787 [26 Cal.Rptr.2d 812]; accord, Pierce v. San Mateo County Sheriff’s Dept. (2014) 232 Cal.App.4th 995, 1006 [181 Cal.Rptr.3d 816].)
“It is well established judges are granted immunity from civil suit in the exercise of their judicial functions. [Citations.] This rule applies even where the judge’s acts are alleged to have been done maliciously and corruptly. [Citations.] . . . Judicial immunity is a principle of common law which is necessary for the welfare of the state and the peace and happiness of society. [Citations.]” (Frost v. Geernaert (1988) 200 Cal.App.3d 1104, 1107-1108 [246 Cal.Rptr. 440].)
“Almost as venerable as immunity for judges is immunity for prosecutors.” (Falls v. Superior Court (1996) 42 Cal.App.4th 1031, 1042 [49 Cal.Rptr.2d 908].) “When a gwas;-judicial officer, such as a prosecutor, acts within his official capacity he, like a judicial officer, enjoys absolute immunity.” {Id. at p. 1043.) “As with the reason for granting judicial immunity, quasi-judicial immunity is given to promote uninhibited and independent decisionmaking. [Citation.]” (Howard v. Drapkin (1990) 222 Cal.App.3d 843, 853 [271 Cal.Rptr. 893].)
We recognize that Government Code section 820, subdivision (a), enacted in 1963 as part of the Government Claims Act (Gov. Code, § 810 et seq.), provides that “[e]xcept as otherwise provided by statute . . . , a public employee is liable for injury caused by his act or omission to the same extent as a private person.” It has been held, however, that the Government Claims Act was not intended to override common law judicial immunity. (Fisher v. Pickens (1990) 225 Cal.App.3d 708, 716-718 [275 Cal.Rptr. 487] [Fourth Dist., Div. Two]; accord, Frost v. Geernaert, supra, 200 Cal.App.3d at pp. 1108-1110.) It follows that it equally was not intended to override common law quasi-judicial immunity. (See, e.g., Falls v. Superior Court, supra, 42 Cal.App.4th at pp. 1042-1046 [applying common law prosecutorial immunity].)
*858“A prosecutor acts within his official capacity when his conduct is an ‘ “integral part of the judicial process” ’ or ‘intimately associated with the judicial phase of the criminal process.’ [Citation.]” (Falls v. Superior Court, supra, 42 Cal.App.4th at p. 1044, italics omitted.) Here, all of Jakubowski’s alleged acts were part of the judicial process. Absolute prosecutorial immunity extends to false imprisonment claims. (See Alicia T. v. County of Los Angeles (1990) 222 Cal.App.3d 869, 876, 880-881 [271 Cal.Rptr. 513] [social worker who removes child from home enjoys absolute “quasiprosecutorial” immunity against claims for false imprisonment].) It also extends to claims based on the willful suppression of exculpatory information. (Imbler v. Pachtman (1976) 424 U.S. 409, 431, fn. 34 [47 L.Ed.2d 128, 96 S.Ct. 984].)
We therefore conclude that the trial court was required to sustain Jakubowski’s demurrer to the false imprisonment cause of action.
VIII
DISPOSITION
The judgment is affirmed. Jakubowski is awarded costs against Bocanegra.
McKinster, J., concurred.The complaint also alleged, alternatively, that Jakubowski had actual knowledge that Bocanegra was wrongfully imprisoned. In the trial court, however, Bocanegra’s counsel conceded that Jakubowski lacked actual knowledge and was, at most, reckless or negligent with regard to Bocanegra’s true identity.
See footnote, ante, page 848.