
195 Cal.App.3d 863 (1987)
241 Cal. Rptr. 169
RUTH L. YOUNG, Plaintiff and Appellant,
v.
COUNTY OF MARIN et al., Defendants and Respondents.
Docket No. A035320.
Court of Appeals of California, First District, Division Five.
October 26, 1987.
*867 COUNSEL
H. Sinclair Kerr, Jr., Stephen Kaus, A. Megan Madden, James M. Wagstaffe and Kaus & Kerr for Plaintiff and Appellant.
Douglas J. Maloney, County Counsel, and Dorothy R. Jones, Deputy County Counsel, for Defendants and Respondents.
[Opinion certified for partial publication.[*]]
OPINION
HANING, J.
Ruth L. Young, the former appointed public defender of Marin County, appeals a judgment of dismissal of her complaint for, inter alia, wrongful termination and libel, after the trial court sustained the county's demurrer without leave to amend.[1] The rules for review of demurrers are well known and need not be exhaustively recited. (See, e.g., Dale v. City of Mountain View (1976) 55 Cal. App.3d 101, 103 [127 Cal. Rptr. 520].) To summarize, we are required to regard the material allegations of the complaint as true, and must assume that plaintiff can prove them. Thus, we consider only the complaint and those matters which may be judicially noticed to determine whether plaintiff is entitled to any relief.
On her claim for wrongful termination appellant has alleged that she was discharged from her office "[b]ecause of [her] commitment to vigorously discharge her ethical and legal obligations as Public Defender to protect the Constitutional rights of her clients (especially their Sixth Amendment rights), and to support her staff attorneys in performing their duties as defense attorneys;" and "[b]ecause [she] exercised her First Amendment rights to speak out on behalf of her clients and to publicly support her staff when they took unpopular positions or actions." Within the parameters of *868 these allegations we review to determine whether appellant has alleged facts entitling her to relief.[*]

I
(1a) On appeal, appellant does not urge that her status was other than that of an at-will appointee. However, in reliance on Bogacki v. Board of Supervisors (1971) 5 Cal.3d 771 [97 Cal. Rptr. 657, 489 P.2d 537], appellant contends that even an at-will employee or officer may not be terminated merely for reasonably exercising his or her constitutional rights. Respondents contend that the Bogacki rationale does not apply to public "officers,"[2] as opposed to public "employees," that Government Code section 815 precludes public-entity liability for claims not specifically authorized by statute, and that Government Code section 820.2 protects public entities for the discretionary act of terminating at-will officers and employees.
The plaintiff in Bogacki was a building inspector in the county department of building and safety who alleged he was terminated because of his membership and activities in an organization of building inspectors. (2) Although the Bogacki plaintiff lost his suit for failure to meet his burden of proof, the California Supreme Court stated: "It is now well-settled that even a probationary public employee or one serving at the pleasure of the appointing authority may not be dismissed from his employment for the exercise of constitutional rights absent a showing that the restraints which the employing body would impose on those rights are justified by a compelling public interest. [Citations.]" (Id., at p. 778; see also, Bagley v. Washington Township Hospital Dist. (1966) 65 Cal.2d 499 [55 Cal. Rptr. 401, 421 P.2d 409]; Ball v. City Council (1967) 252 Cal. App.2d 136 [60 Cal. Rptr. 139].)
The United States Supreme Court has also confirmed this principle. (3) "It is clearly established that a State may not discharge an employee on a basis that infringes that employee's constitutionally protected interest in freedom of speech. [Citation.]" (Rankin v. McPherson (1987) 483 U.S. 378, 383 [97 L.Ed.2d 315, 324, 107 S.Ct. 2891]; Perry v. Sindermann (1972) 408 U.S. 593, 597 [33 L.Ed.2d 570, 577, 92 S.Ct. 2694]; Pickering v. Board of Education (1968) 391 U.S. 563, 568 [20 L.Ed.2d 811, 817, 88 S.Ct. 1731]; Bogacki v. Board of Supervisors, supra, 5 Cal.3d 771, 778.) While it is permissible for public employers to impose reasonable restraints on certain officers and employees as a condition of service or employment, and in many situations the public employer can justify the imposition of greater *869 restrictions on high level or policymaking officers and employees than it can on the rank and file (Rankin v. McPherson, supra, 483 U.S. at p. ___ [97 L.Ed.2d at pp. 328-329, 107 S.Ct. at p. 2900]; Branti v. Finkel (1980) 445 U.S. 507, 513-518 [63 L.Ed.2d 574, 580-584, 100 S.Ct. 1287]; Elrod v. Burns (1976) 427 U.S. 347, 360-373 [49 L.Ed.2d 547, 558-559, 96 S.Ct. 2673]), the determination of reasonableness in each instance is dependent upon the facts and circumstances attendant to the particular office or job, the content of the speech and the context in which it was made. (Rankin v. McPherson, supra, 483 U.S. at p. ___ [97 L.Ed.2d at pp. 326-329, 107 S.Ct. at pp. 2898-2900]; Connick v. Myers (1983) 461 U.S. 138, 147-148, 150-151 [75 L.Ed.2d 708, 720, 722, 103 S.Ct. 1684].) Reasonableness is generally a question of fact and cannot normally be resolved by demurrer, although "[t]he ultimate issue  whether the speech is protected  is a question of law. [Citation.]" (Rankin v. McPherson, supra, 483 U.S. 378, 386, fn. 9 [97 L.Ed.2d 315, 325, 107 S.Ct. 2891, 2897]; Connick v. Myers, supra, 461 U.S. at p. 150, fn. 10 [75 L.Ed.2d at p. 722].)
(4) It is also established that the exercise of First Amendment rights is not dependent upon one's tenure or status as an at-will officer or employee. (Mt. Healthy City Board of Ed. v. Doyle (1977) 429 U.S. 274, 283 [50 L.Ed.2d 471, 481, 97 S.Ct. 568]; Perry v. Sindermann, supra, 408 U.S. at pp. 597-598 [33 L.Ed.2d at pp. 577-578].) Nor do the cases suggest that public "officers" are absolutely devoid of First Amendment rights. Rather, in resolving these issues the courts engage in a balancing process between the individual's right of free expression and the state's interest in maintaining efficiency and order in the distribution of its public services. "The determination whether a public employer has properly discharged an employee for engaging in speech requires `a balance between the interests of the [employee], as a citizen, in commenting upon matters of public concern and the interest of the State, as an employer, in promoting the efficiency of the public services it performs through its employees.' [Citations.].... [¶] The threshold question in applying this balancing test is whether [the employee's] speech may be `fairly characterized as constituting speech on a matter of public concern.' [Citation.]" (Rankin v. McPherson, supra, [97 L.Ed.2d at pp. 324-325, 107 S.Ct. at pp. 2896-2897].)
(5) Thus, it is clear that although Government Code section 815 provides that public entities are not liable for injuries "[e]xcept as otherwise provided by statute," they are not immune from constitutionally created claims.[3] (6) Both the state and federal Constitutions require the state to *870 provide legal counsel for indigent persons accused of crimes. (Gideon v. Wainwright (1963) 372 U.S. 335 [9 L.Ed.2d 799, 83 S.Ct. 792, 93 A.L.R.2d 733]; People v. Lanigan (1943) 22 Cal.2d 569 [140 P.2d 24, 148 A.L.R. 176].) In California, the primary obligation of providing defense counsel rests with the county in which the accused has been charged. (See, e.g., Pen. Code, § 987.2, subd. (a).) The public defender is a statutory county officer whose primary function is to provide such legal representation. (Gov. Code, §§ 27700, 27706.) (7) Regardless of the public defender's administrative duties as head of a department of county government, when functioning in the role of attorney his or her sole duty is to represent and defend the client, and so long as he or she functions competently, lawfully, ethically and within the bounds of legitimate advocacy, the county has no right of control and may not interfere. (See, e.g., In re Hochberg (1970) 2 Cal.3d 870, 878 [87 Cal. Rptr. 681, 471 P.2d 1]; In re Hough (1944) 24 Cal.2d 522, 528-529 [150 P.2d 448]; People v. Chacon (1968) 69 Cal.2d 765, 773-775 [73 Cal. Rptr. 10, 447 P.2d 106, 34 A.L.R.3d 454]; DeLuca v. Whatley (1974) 42 Cal. App.3d 574, 576 [117 Cal. Rptr. 63]; Mowrer v. Superior Court (1969) 3 Cal. App.3d 223, 230-231 [83 Cal. Rptr. 125].)
This is not to suggest that public defenders are free to act in total disregard of county policies. In their administrative role as head of a department of county government there are many areas in which they must work cooperatively with other agencies and with the board of supervisors to achieve and implement county goals and objectives. If they fail to perform in this role, the county has a legitimate interest in reviewing their performance and replacing them, if necessary. (8) "`[T]he Government, as an employer, must have wide discretion and control over the management of its personnel and internal affairs. This includes the prerogative to remove employees whose conduct hinders efficient operation and to do so with dispatch. Prolonged retention of a disruptive or otherwise unsatisfactory employee can adversely affect discipline and morale in the work place, foster disharmony, and ultimately impair the efficiency of an office or agency.'" (Connick v. Myers, supra, 461 U.S. at p. 151 [75 L.Ed.2d at pp. 722-723]; citing Arnett v. Kennedy (1974) 416 U.S. 134, 168 [40 L.Ed.2d 15, 41, 94 S.Ct. 1633] [conc. opn. of Powell, J.].)
In this regard the dual role of the public defender as head of a county department and as counsel for the accused, and the conflicting demands imposed as a natural consequence thereof, must be considered. (9) The public defender's role as defense counsel imposes a solemn obligation to zealously safeguard the rights and privileges of the accused (Ferri v. Ackerman (1979) 444 U.S. 193 [62 L.Ed.2d 355, 100 S.Ct. 402]; People v. McKenzie *871 (1983) 34 Cal.3d 616 [194 Cal. Rptr. 462, 668 P.2d 769]; Maxwell v. Superior Court (1982) 30 Cal.3d 606 [180 Cal. Rptr. 177, 639 P.2d 248, 18 A.L.R.4th 333]), an obligation which occasionally brings defense counsel into sharp conflict with the county. (See, e.g., Corenevsky v. Superior Court (1984) 36 Cal.3d 307 [204 Cal. Rptr. 165, 682 P.2d 360]; Keenan v. Superior Court (1982) 31 Cal.3d 424 [180 Cal. Rptr. 489, 640 P.2d 108].) Under such circumstances the public defender's primary responsibility is to the client.
(1b) In resolving such issues the courts have recognized the difficulty of attempting to formulate a specific standard or guideline applicable to all cases. Rather, they have left resolution to a case by case analysis. (See, e.g., Pickering v. Board of Education, supra, 391 U.S. at pp. 569-575 [20 L.Ed.2d at pp. 817-821].) In the instant case appellant's complaint can be construed as alleging that she was discharged from her office merely for advocating the rights of her clients and for supporting her staff attorneys in discharging their legal and ethical obligations as defense counsel. In other words, she claims she was fired for discharging the duties and delivering the legal services she was hired to perform and the county is constitutionally obligated to provide. This is obviously a matter of public concern insofar as appellant's speech is concerned. With regard to respondents' right to terminate appellant, they may not accomplish indirectly what they are forbidden directly  the curtailment or cessation of reasonable defense services. (Branti v. Finkel, supra, 445 U.S. 507, 515 [63 L.Ed.2d 574, 582]; Perry v. Sindermann, supra, 408 U.S. at p. 597 [33 L.Ed.2d at p. 577].)
Consequently, we conclude that for purposes of testing appellant's complaint against a demurrer, she has sufficiently alleged that she was terminated from her office merely as a consequence of her reasonable exercise of her First Amendment rights, and thereby has stated a cognizable cause of action.

II
(10a) In her cause of action for libel against respondent Barrows, the Marin County Administrator, appellant alleges that he released to the press a memorandum addressed to the board of supervisors regarding appellant's performance as public defender, and which contained the following statements alleged to be false and defamatory: "[Appellant] has not adapted effectively to the responsibilities of department head and lacks necessary management skills. She does not make decisions readily or consistently. Her management is uneven and sometimes capricious. One former subordinate said, `We try to get our instructions in writing so she won't forget or change her mind.' She does not manifest the strong personality and self-confidence required to deal, on a face-to-face basis, with subordinates and others ... [¶] In summary, the strong and effective management your Board requires *872 of major department heads is lacking in this department. In a department where we can normally expect assertive, zealous attorneys, an effective manager is essential and [appellant] has simply not demonstrated, to my satisfaction, that she can provide management on a par with County expectations ... [¶] Those inside and outside the office acknowledge that [appellant] has often been absent which has led to further deterioration of her leadership in the department. Although I have taken account of her illness, the leave requests filed with the County do not indicate extensive medical absences."
(11) In New York Times Co. v. Sullivan (1964) 376 U.S. 254 [11 L.Ed.2d 686, 84 S.Ct. 710, 95 A.L.R.2d 1412], the United States Supreme Court held that the First Amendment requires public officials asserting libel claims to establish by clear and convincing evidence that the allegedly libelous publication was false and that it was made with "actual malice," which is defined as knowledge that the statement was false or reckless disregard of its falsity. New York Times also required the courts reviewing libel cases to independently examine the entire record to assure "that the judgment does not constitute a forbidden intrusion on the field of free expression." In Bose Corp. v. Consumers Union of U.S., Inc. (1984) 466 U.S. 485, 505 [80 L.Ed.2d 502, 519, 104 S.Ct. 1949] the high court further defined the reviewing courts' role: "In such cases, the Court has regularly conducted an independent review of the record both to be sure that the speech in question actually falls within the unprotected category and to confine the perimeters of any unprotected category within acceptably narrow limits in an effort to ensure that protected expression will not be inhibited." Our review is conducted pursuant to this standard.
(12) Fair comment, or statements of opinion concerning public officials are recognized as privileged against claims of libel. (Gregory v. McDonnell Douglas Corp. (1976) 17 Cal.3d 596 [131 Cal. Rptr. 641, 552 P.2d 425].) "[D]ebate on public issues should be uninhibited, robust, and wide-open, and[] may well include vehement, caustic, and sometimes unpleasantly sharp attacks on government and public officials." (New York Times Co. v. Sullivan, supra, 376 U.S. at p. 270 [11 L.Ed.2d at p. 701].) "[T]he First Amendment protects even sharp attacks on the character, motives, or moral qualifications of [public officials.]" (Okun v. Superior Court (1981) 29 Cal.3d 442, 451 [175 Cal. Rptr. 157, 629 P.2d 1369].)
(13) In addition to the fair comment, or opinion, privilege, Civil Code section 47, subdivision 2 establishes an absolute privilege for any publication made "in any other official proceeding authorized by law." Such official proceedings include proceedings "which resemble judicial and legislative proceedings" such as those within and before county boards of supervisors. (Tiedemann v. Superior Court (1978) 83 Cal. App.3d 918, 924 [148 *873 Cal. Rptr. 242]; see also, Williams v. Taylor (1982) 129 Cal. App.3d 745 [181 Cal. Rptr. 423]; Brody v. Montalbano (1978) 87 Cal. App.3d 725 [151 Cal. Rptr. 206]; Imig v. Ferrar (1977) 70 Cal. App.3d 48 [138 Cal. Rptr. 540]; Martin v. Kearney (1975) 51 Cal. App.3d 309 [124 Cal. Rptr. 281].) "In order that the privilege apply it is unnecessary that the defamatory matter be relevant or material to an issue before the tribunal but need only have some proper connection or relation to the proceeding and in achieving its objectives. [Citations.]" (Tiedemann v. Superior Court, supra, 83 Cal. App.3d at pp. 924-925.) The privilege extends to preliminary communications to such boards or agencies designed to induce or influence their actions. (Imig v. Ferrar, supra, 70 Cal. App.3d at p. 55.)
(10b) We have taken judicial notice, as did the trial court, that the county administrator was recommending to the board of supervisors that appellant be discharged as public defender. Our review of the challenged publication convinces us it was privileged both under Civil Code section 47, subdivision 2 as part of an official proceeding, and also as a constitutionally protected criticism or statement of opinion concerning a public official, and cannot constitute a basis for a cause of action for libel. Appellant was obviously a public official, and the statements attributed to respondent Barrows consist of no more than legitimate criticism and opinion. (See e.g., Grillo v. Smith (1983) 144 Cal. App.3d 868 [193 Cal. Rptr. 414]; Desert Sun Publishing Co. v. Superior Court (1979) 97 Cal. App.3d 49 [158 Cal. Rptr. 519].)

III-IV[**]
.... .... .... .... .... .

Conclusion
The judgment is reversed and the matter remanded with instructions to vacate the order sustaining the demurrer and to enter a new order overruling it.
Low, P.J., and King, J., concurred.
A petition for a rehearing was denied November 13, 1987, and respondents' petition for review by the Supreme Court was denied January 20, 1988.
NOTES
[*]   See footnote, post, page 868.
[1]  Additional defendants/respondents are the individual members of the Marin County Board of Supervisors, and the Marin County Administrator.
[*]   Pursuant to rule 976.1, California Rules of Court, this opinion is certified for publication except for parts III and IV.
[2]  Respondents define an "officer" as a public official at the policymaking level. We use the term accordingly.
[3]  That the Legislature recognized this is made clear by the Legislative Committee comment to section 815: "This section abolishes all common law or judicially declared forms of liability for public entities, except for such liability as may be required by the state or federal constitution.... In the absence of a constitutional requirement, public entities may be held liable only if a statute ... is found declaring them to be liable." (Italics added.) (See Fenton v. Groveland Community Services Dist. (1982) 135 Cal. App.3d 797 [185 Cal. Rptr. 758].)
[**]   See footnote, ante, page 868.
