Individuals authorized under this part to detain a person for 72-hour treatment and evaluation pursuant to Article 1 (commencing with Section 5150) or Article 2 (commencing with Section 5200), or to certify a person for intensive treatment pursuant to Article 4 (commencing with Section 5250) or Article 4.5 (commencing with Section 5260) or Article 4.7 (commencing with Section 5270.10) or to file a petition for post-certification treatment for a person pursuant to Article 6 (commencing with Section 5300) shall not be held either criminally or civilly liable for exercising this authority in accordance with the law.
Ca. Welf. and Inst. Code § 5278