
170 Cal.App.3d 1238 (1985)
216 Cal. Rptr. 879
CARL FOX et al., Plaintiffs and Respondents,
v.
COUNTY OF FRESNO et al., Defendants and Appellants.
Docket No. F004312.
Court of Appeals of California, Fifth District.
August 9, 1985.
*1239 COUNSEL
Eldridge, Anderson & Weakley, James D. Weakley and Benjamin L. Ratliff for Defendants and Appellants.
James H. Flanagan, Jr., for Plaintiffs and Respondents.
OPINION
BEST, J.
Having determined that private property constitutes a nuisance, is a county liable for injury to other property caused by the failure of the county to abate the nuisance? We will conclude that it is not because a county does not have a mandatory duty to abate a nuisance.

FACTS
Plaintiffs were the owners of a residence adjoining that of William and Darlene Mattocks. In July 1981, a fire spread from the Mattockses' property and consumed plaintiffs' home and its contents.
*1240 Plaintiffs brought suit against the County of Fresno and three of its employees alleging that the county and the employees negligently failed to abate a longstanding fire hazard nuisance on the Mattockses' property which caught fire and spread to plaintiffs' home, resulting in its destruction. A jury by special verdict found that the county and its chief supervising sanitarian, John Thomas, were negligent and that that negligence was a legal cause of plaintiffs' damages.
The county had received complaints as early as 1974 describing the Mattockses' property as a junkyard. In January 1977, David Van Dyne, a registered sanitarian employed by the County of Fresno, received a complaint concerning possible building code violations existing on the Mattockses' property.
Van Dyne inspected the Mattockses' property on February 14, 1977, and on March 31, 1977, issued a notice of substandard housing. The notice listed various building code deficiencies on the Mattockses' property and required action within three months. Normally, the next and only step available if no action is taken, is to proceed with abatement before the board of review.
Mr. Mattocks obtained a permit to rehabilitate his home in April 1977.
On July 17, 1977, a five-day reminder was sent to Mr. and Mrs. Mattocks.
On July 19, 1977, Mr. Mattocks called to say that he had obtained permits from building and safety and was making progress on the repairs.
On October 17, 1977, Mr. Mattocks reported that the work had been done.
A reinspection on January 18, 1978, showed that no progress had been made respecting correction of the deficiencies listed in the notice of substandard housing.
On August 10, 1978, a complaint was received regarding abandoned vehicles on the Mattockses' property and the lack of running water in the house.
On January 29, 1979, Mr. Mattocks declared his intention to demolish the house and build a new one.
The Mattockses' property was reinspected in December 1979 and March 1980. The inspection showed no progress.
*1241 On April 4, 1980, the health department sent a second five-day reminder letter to the Mattockses.
Mr. Mattocks called the health department on April 11, 1980, stating he would tear the house down within 15 days.
Thereafter, on October 9, 1980, the department sent a new intent-to-inspect letter to the Mattockses.
On or about October 20, 1980, the new inspection was canceled since Mr. Mattocks stated he would tear down the house within 20 days and that he had made a down payment to build a new one. Mr. Mattocks was told that if he did not do so, the abatement procedure would be followed. Mr. Mattocks called asking for more time on November 12, 1980.
The fire occurred on the Mattockses' property on July 15, 1981. It apparently began in the laundry room and spread to the property owned by plaintiffs.

DISCUSSION

I

Did the County of Fresno have a mandatory duty to correct the condition of the Mattockses' property?
(1) In California, governmental tort liability must be based on statute. (Gov. Code, § 815; Cochran v. Herzog Engraving Co. (1984) 155 Cal. App.3d 405, 409 [205 Cal. Rptr. 1].) Government Code section 815.6 provides as follows: "Where a public entity is under a mandatory duty imposed by an enactment that is designed to protect against the risk of a particular kind of injury, the public entity is liable for an injury of that kind proximately caused by its failure to discharge the duty unless the public entity establishes that it exercised reasonable diligence to discharge the duty."
(2a) Since Government Code section 815.6 was the basis for liability upon which plaintiffs relied, defendants contend that the judgment below is contingent on whether duties imposed by Health and Safety Code section 17980 are mandatory and not discretionary. Plaintiffs, on the other hand, contend that any discretion defendants had had already been exercised and what followed and caused plaintiffs' damages was negligent exercise of the defendants' then mandatory duty.
*1242 (3) Whether a statute or ordinance is intended to create or impose a mandatory duty of care toward the plaintiff is a question of law. (Morris v. County of Marin (1977) 18 Cal.3d 901 [136 Cal. Rptr. 251, 559 P.2d 606].)
(4) "As used in section 815.6, the term `mandatory' refers to obligatory duty which a governmental entity is required to perform, as opposed to a permissive power which a governmental entity may exercise or not as it chooses." (Morris, supra, at p. 908.)
In the area of law enforcement, statutes containing "shall" language are sometimes interpreted as directory or permissive because discretion is inherent in the activity concerned. (State of South Dakota v. Brown (1978) 20 Cal.3d 765 [144 Cal. Rptr. 758, 576 P.2d 473]; Boyne v. Ryan (1893) 100 Cal. 265 [34 P. 707]; Taliaferro v. Locke (1960) 182 Cal. App.2d 752 [6 Cal. Rptr. 813]; see also Morris v. County of Marin, supra, 18 Cal.3d at pp. 908-909, fn. 4.)
Boyne dealt with the special duties of a district attorney to institute civil proceedings for the recovery of money illegally paid out by a board of supervisors. Despite the mandatory language, "the district attorney shall institute suit," of the statute (now Gov. Code, § 26525), the court held that the duty was discretionary.
Taliaferro dealt with the duty of a district attorney to institute proceedings to abate a nuisance. Again, despite the mandatory language of the statute (Gov. Code, § 26501), the court held that the duty was discretionary, noting: "As concerns the enforcement of the criminal law the office of district attorney is charged with grave responsibilities to the public. These responsibilities demand integrity, zeal and conscientious effort in the administration of justice under the criminal law. However, both as to investigation and prosecution that effort is subject to the budgetary control of boards of supervisors or other legislative bodies controlling the number of deputies, investigators and other employees." (Taliaferro v. Locke, supra, 182 Cal. App.2d 752, 755-756.)
Our Supreme Court has noted: "[T]here is no simple, mechanical test for determining whether a provision should be given `directory' or `mandatory' effect. `In order to determine whether a particular statutory provision ... is mandatory or directory, the court, as in all cases of statutory construction and interpretation, must ascertain the legislative intent. In the absence of express language, the intent must be gathered from the terms of the statute construed as a whole, from the nature and character of the act to be done, and from the consequences which would follow the doing or failure to do the particular act at the required time. [Citation.] When the object is to *1243 subserve some public purpose, the provision may be held directory or mandatory as will best accomplish that purpose [citation]....'" (Morris v. County of Marin, supra, 18 Cal.3d at pp. 909-910, fn. omitted.)
(2b) With that admonition in mind, an examination of the applicable statutes demonstrates that they are discretionary, not mandatory. Health and Safety Code section 17980 provides: "(a) If any building is constructed, altered, converted, or maintained in violation of any provision of, or of any order or notice giving a reasonable time to correct such violation issued by an enforcement agency pursuant to, this part, the building standards published in the State Building Standards Code, or other rules and regulations promulgated pursuant to the provisions of this part, or if a nuisance exists in any building or upon the lot on which it is situated, the enforcement agency shall, after 30 days' notice to abate such nuisance, institute any appropriate action or proceeding to prevent, restrain, correct, or abate the violation or nuisance.
"(b) Whenever the enforcement agency has inspected or caused to be inspected any building and has determined that such building is a substandard building, the enforcement agency shall commence proceedings to abate the violation by repair, rehabilitation, vacation, or demolition of the building. The enforcement agency shall not require the vacating of a residential building unless it concurrently requires expeditious demolition or repair to comply with the provisions of this part, the building standards published in the State Building Standards Code, or other rules and regulations promulgated pursuant to the provisions of this part. The owner shall have the choice of repairing or demolishing. However, if the owner chooses to repair, the enforcement agency shall require that the building be brought into compliance according to a reasonable and feasible schedule for expeditious repair. The enforcement agency may require vacation and demolition or may itself vacate the building, repair, demolish, or institute any other appropriate action or proceeding, if repair work is not done as scheduled or if the owner does not make a timely choice of repair or demolition.
"(c) Notwithstanding the provisions of subdivision (b) of this section and notwithstanding local ordinances, tenants in a residential building shall be provided notice of an order to demolish, of the enforcement agency's decision to demolish, or of the issuance of a demolition permit following upon abatement order of an enforcement agency." (Italics added.)
Although several references to "shall" are contained in Health and Safety Code section 17980, the statute taken as a whole militates against mandatory interpretation. For example, Health and Safety Code section 17980, subdivision (a), gives the enforcement agency the authority to "institute any *1244 appropriate action or proceeding to prevent, restrain, correct, or abate the violation or nuisance" and subdivision (b) expressly states "The enforcement agency may require vacation and demolition or may itself vacate the building, repair, demolish, or institute any other appropriate action or proceeding, ..." (Italics added.) These portions of the statute clearly give the enforcement authority a choice, therefore discretion, to choose which course of action would be appropriate when a violation is found.
If the statute were to be construed as mandatory, it would be very difficult, if not impossible, to reconcile that part of the statute which says that "the enforcement agency shall" with that portion which gives the agency the authority to take "any appropriate action." Furthermore, while it is true that subdivision (b) states that the enforcement agency "shall commence proceedings to abate the violation by repair, rehabilitation, vacation, or demolition," once it has been determined that a building is substandard, section 17982 of the Health and Safety Code, which applies to the commencement of the proceedings, states: "If any notice or order issued by an enforcement agency is not complied with within a reasonable time as specified in such notice or order the enforcement agency may apply to the superior court for an order authorizing it to remove any violation or abate any nuisance specified in the notice or order." (Italics added.)
Thus, it is clear from the language of Health and Safety Code section 17982 that the Legislature did not intend to compel the enforcement agency to abate the nuisance of the Mattockses' land. The language indicates that the statute is permissive and, therefore, section 17980 does not impose a mandatory duty upon the County of Fresno to implement abatement procedures. (For similar analysis, see Cochran v. Herzog Engraving Co., supra, 155 Cal. App.3d 405, 409-411; Shelton v. City of Westminister (1982) 138 Cal. App.3d 610 [188 Cal. Rptr. 205]; Curreri v. City etc. of San Francisco (1968) 262 Cal. App.2d 603 [69 Cal. Rptr. 20].)
Similarly, Fresno County Ordinance Code section 15.32.040 provides in pertinent part: "A. The director of the department of resources and development of the county or the director of the department of health of the county may determine that a building or structure or other property within the county constitutes a public nuisance. The department of health shall have primary authority for the enforcement of substandard housing violations.
"B. Upon such determination, the director of the department of resources and development or health officer shall notify, by means of certified or registered mail, the owner, as such person's name appears on the last equalized county assessment roll, mortgagees and beneficiaries under any deed of trust relating to such property of record (if such persons' addresses are *1245 known or reasonably available to him) that the building, structure or property is a public nuisance. A copy of such notice shall also be posted at conspicuous places (front and rear) on such building, structure or property.
"C. Such notice shall contain a statement describing the condition which renders such structure or property a nuisance. If, in the opinion of such official, such condition can be corrected or abated by repair or other work, such notice shall also state and describe the specific repairs or other work required to abate such condition. The notice shall order that the conditions which constitute the nuisance be abated by demolition, repair or other means within thirty days after the date such notice was mailed. Such official may further order, upon a finding that there exists extreme and imminent danger to the lives or safety of the occupants, that the building, structure or property, or any portion thereof be immediately vacated."
Fresno County Ordinance Code section 15.32.050 provides in pertinent part: "A. If, within forty-five days of the date of mailing and posting of the notice described in Section 15.32.040, the nuisance condition described in the notice has not been abated as required therein, the health officer or the building official may institute proceedings before the board of review for the abatement of such nuisance." (Italics added.)
Under these sections, the health officer or the building official may exercise discretion in instituting proceedings and is not under a mandatory duty to do so.
Since the County of Fresno was not under a mandatory duty to proceed with abatement of the nuisance, and since the judgment below was contingent upon whether the duties imposed by the Health and Safety Code and Fresno County Ordinance Code are mandatory, the judgment must be reversed.
We are not persuaded by plaintiffs' contention that the decision was already made to abate the nuisance two and one-half years prior to the fire, i.e., that the discretion had already been exercised and, therefore, defendants were then under a mandatory duty to quickly pursue the abatement action. While it is true that the various notices and orders giving a reasonable time to correct the violations threatened that if the corrections did not occur within a given time an abatement action would follow, Sanitarian John Thomas explained that this is simply a tactic used to try to get the homeowners to take care of the problems right away. Thomas testified:
"A. No, it's our experience that often times owner-occupied properties and rental-occupied properties take well beyond the minimum time limit that we place in our letter, in our standard letters that we send out.
*1246 "Q. Why do you place that in your letters?
"A. For the purpose of  of emphasizing our interests to get it done right away and hopefully that will work to  and the responsible party will respond positively and take care of the problem in the time limit that we specify. But, realistically, often times doesn't happen. So, we apply pressure and salesmanship and those kinds of techniques to resolve the problem."
Thus, it appears that the decision to abate had not already been made, but instead was being contemplated as a last resort.
Having concluded that the judgment must be reversed for the reasons stated above, we need not address the additional arguments advanced by the parties.
The judgment is reversed.
Woolpert, Acting P.J., and Ritchey, J.,[*] concurred.
A petition for a rehearing was denied August 26, 1985, and respondents' petition for review by the Supreme Court was denied October 17, 1985. Bird, C.J., was of the opinion that the petition should be granted.
NOTES
[*]   Assigned by the Chairperson of the Judicial Council.
