Opinion
WALLIN, J.Facts
The California Legislature enacted the Lanterman-Petris-Short Act (LPSA) in 1967. (Welf. & Inst. Code, § 5000 et seq.)1 The LPSA instituted new procedures for involuntary detention and treatment of persons who are mentally disordered, developmentally disabled or impaired by chronic alcoholism. Orange County does not have a county hospital suitable for this purpose. Therefore, private hospitals have been designated by the county to serve as evaluation and treatment facilities under the LPSA. The hospitals *1088are St. Joseph Hospital of Orange, Hoag Memorial-Presbyterian, Brea Hospital Neuropsychiatric Center and University of California Irvine Medical Center. All are petitioners in this action except U.C. Irvine, which intervened on the side of the petitioners. These hospitals customarily receive payment from patients rather than from state or county funds.
Whether a facility is publicly or privately owned, the procedure for involuntary confinement is the same. A person who is a danger to himself or herself or others, or gravely disabled may be taken into custody and placed in a designated facility for 72 hours. During the 72-hour period an evaluation is made. If the attending professional staff finds, “[t]he person is, as a result of mental disorder or impairment by chronic alcoholism, a danger to others, or to himself, or gravely disabled,” then he or she may be certified for up to 14 days of involuntary intensive treatment. (§ 5250.) The allegations of danger or disability must be set forth in a written certification notice. (§ 5252.)
Every person certified for intensive treatment has a right to judicial review by a petition for habeas corpus in the superior court. (§ 5275.) The person requesting release is entitled to a court-appointed attorney. When habeas corpus hearings under sections 5275-5276 are held in Orange County, a deputy sheriff brings the petitioner from the private hospital to the court.
The issue in these habeas corpus hearings is whether, “the person requesting release is not, as a result of mental disorder or impairment by chronic alcoholism, a danger to others, or to himself, or gravely disabled.”2 (§ 5276.) In the past the court did not require attorneys to present evidence supporting the allegations' of danger or disablement. The private hospitals simply had professional staff members present the evidence. Now the court has advised the hospitals that unless an attorney presents the evidence supporting certification the habeas petitioner will be released immediately. The respondents have refused to appear in these habeas corpus hearings when the person requesting release is confined at a private hospital. As a result, the petitioner hospitals are forced to retain private counsel to present the evidence.3
*1089The hospitals’ petition for a writ of mandate in superior court seeking to force respondents to appear and defend the certification allegations was denied. The hospitals appeal. We reverse.
Discussion
The question presented is whether respondents must appear and defend the certification allegations in habeas corpus hearings brought by persons involuntarily confined for treatment in private hospitals under the LPSA. The hospitals contend respondents are obligated to appear under section 5114. The respondents’ argument to the contrary is twofold. First, they contend habeas corpus hearings under sections 5275-5276 are not within the ambit of section 5114. Second, they contend they have no duty or authority to represent private hospitals.
I.
Section 5114 provides: “At any judicial proceeding under the provisions of this division, allegations that the person is a danger to others, or to himself, or gravely disabled as a result of mental disorder or impairment by chronic alcoholism, shall be presented by the district attorney for the county, unless the board of supervisors, by ordinance or resolution, delegates such duty to the county counsel.” In Orange County the board of supervisors has delegated the duty to the county counsel.4 The county counsel argues there are no “allegations” to be “presented” by him at these habeas corpus hearings. Therefore he concludes he is not obligated to appear. We disagree.
While it is technically true no new allegations are presented at these habeas corpus hearings it does not follow that the county counsel has no obligation to appear under section 5114. County counsel’s argument improperly characterizes these proceedings and disregards the public interests involved.
In essence these habeas corpus hearings are an independent review of the allegations set forth in the certification notice.5 Under section 5276 if the *1090court finds the allegations are unsupported by the evidence the petitioner must be released. Thus, the hearings necessarily involve review of the allegations contained in the certification notice and the evidence supporting them. It follows the certification notice allegations are the “allegations” to be “presented” by county counsel under section 5114.
The legislative intent embodied in the LPSA also demonstrates the propriety of public representation in these habeas corpus hearings. The legislative intent is expressed in section 5001: “The provisions of this part shall be construed ... (c) To guarantee and protect public safety . . . [and] (d) To safeguard individual rights through judicial review . . . .” The public has a strong interest in not releasing persons who are a danger to themselves or others before their intensive treatment is complete. This interest can only be advanced by a public advocate. The public has a right to be represented in order to guarantee public safety.
Furthermore, judicial review of decisions to deprive persons of their fundamental right to liberty will only be meaningful when the public interest is represented by an attorney whose only loyalty is to the public. An attorney cannot be devoted to two masters with conflicting interests. (Maxwell v. Superior Court (1982) 30 Cal.3d 606 [180 Cal.Rptr. 177, 639 P.2d 248].) It is unreasonable to ask hospital attorneys to represent the public interest when the outcome of the hearing will impact their client’s financial interest. This situation is inconsistent with the state’s special obligations when involuntarily confining the mentally ill. (Addington v. Texas (1979) 441 U.S. 418 [60 L.Ed.2d 323, 99 S.Ct. 1804].)
Therefore, we hold sections 5275-5276 habeas corpus proceedings are within the scope of section 5114.
II.
County counsel also argues he has no duty or authority to represent private hospitals under the LPSA. His argument is based on Government Code section 27646, which provides: “Upon designation by the board of supervisors pursuant to section 5114 of the Welfare and Institutions Code, the county counsel shall represent the county in proceedings under . . . [the LPSA].” County counsel reads the language “shall represent the county” very narrowly. They contend since the county is not technically a named party in the habeas corpus hearings no duty to participate arises. We disagree.
While the writ is nominally directed to the hospitals, the County of Orange is the real party in interest. Persons can only be detained at private *1091hospitals under the LPSA by authority of the county. The county is the actual custodian of these persons and deputy sheriffs “deliver the body” of the petitioner to the habeas corpus hearing.6 The hospitals merely provide a facility for treating LPSA patients within this county at no cost to the taxpayer. As attorney for the real party in interest county counsel has the duty and authority under Government Code section 27646 to appear and defend these habeas corpus hearings.
The judgment denying writ of mandate is reversed. The superior court is directed to issue a writ of mandate ordering the county counsel to appear and defend the petitioner hospitals in habeas corpus proceedings under sections 5275 and 5276 of the LPSA.
Trotter, P. J., and Sonenshine, J., concurred.
On September 30, 1983, the opinion was modified to read as printed above. Respondents’ petition for a hearing by the Supreme Court was denied December 21, 1983.
All code citations refer to the Welfare and Institutions Code unless otherwise noted.
Section 5276 also requires release if the person has not been advised of or accepted voluntary treatment, or if the designated facility is not equipped and staffed to provide treatment.
The State Department of Mental Hygiene requested the board of supervisors to revise any county policy refusing county counsel representation or face sanctions under section 5655. The threat was held in abeyance pending the outcome of this lawsuit. The department, represented by the Attorney General then intervened on the side of the hospitals. The Attorney General charges Orange is the only county in the state forcing private hospitals to retain private counsel to present the evidence.
On September 1, 1981, the board resolved: “The County Counsel is hereby designated to represent the County in proceedings under Part I (commencing with Section 5000 of Division 5) of the Welfare and Institutions Code.” (Res. No. B1-1311.) Therefore, the county counsel, not the district attorney, is obligated to present allegations under section 5114.
In fact independent evaluation of the determination to involuntarily confine a person is constitutionally required. (Doe v. Gallinot (9th Cir. 1981) 657 F.2d 1017.) In response to Doe the California Legislature adopted a less formal procedure for reviewing the certification determination for those who have not requested habeas corpus review. (§§ 5256-5256.8.) At the informal certification review hearings the county counsel may at his discretion elect to present evidence. (§ 5256.2.)
Penal Code section 1481 provides: “The person to whom the writ is directed . . . must bring the body of the party in his custody . . . according to the command of the writ. . . .” (Italics added.)