
    [No. S074364.
    Mar. 9, 2000.]
    PAUL HAGGIS, Plaintiff and Appellant, v. CITY OF LOS ANGELES, Defendant and Respondent.
    
      Counsel
    Hart, King & Coldren, William R. Hart, Richard P. Gerber; Berger & Norton and Pamela S. Schmidt for Plaintiff and Appellant.
    James K. Hahn, City Attorney, Patricia V. Tubert and William L. Waterhouse, Assistant City Attorneys, for Defendant and Respondent.
    Meyers, Nave, Riback, Silver & Wilson and Clifford F. Campbell for 136 California Cities and the California State Association of Counties as Amici Curiae on behalf of Defendant and Respondent.
    Bill Lockyer, Attorney General, Pamela Smith-Steward, Chief Assistant Attorney General, Margaret A. Rodda, Assistant Attorney General, Darryl L. Doke and Gordon B. Burns, Deputy Attorneys General, for the State of California as Amicus Curiae on behalf of Defendant and Respondent.
   Opinion

WERDEGAR, J.

Paul Haggis sued the City of Los Angeles (the City) on four causes of action for breach of mandatory duties (Gov. Code, § 815.6) arising out of the City’s failure to follow certain directives in its own municipal code regarding development of property in landslide zones. He seeks to impose liability on the City for damages he suffered after purchasing a developed piece of property on unstable land. The superior court sustained the City’s demurrer without leave to amend and dismissed the action; the Court of Appeal affirmed. Because we conclude that all of plaintiff’s causes of action either fail to allege a mandatory duty that may serve as a predicate for liability under Government Code section 815.6, or are barred by the inspection immunity of Government Code section 818.6, we will affirm the judgment of the Court of Appeal.

Factual and Procedural Background

On appeal from dismissal following a sustained demurrer, we take as true all well-pleaded factual allegations of the complaint. (White v. Davis (1975) 13 Cal.3d 757, 765 [120 Cal.Rptr. 94, 533 P.2d 222].) In his first amended complaint, plaintiff made the following allegations (with further allegations specifically relating to each of plaintiff’s four causes of action to be detailed later in this opinion):

Plaintiff has owned the subject property, located on a coastal bluff in Pacific Palisades, since September 1991. He lived on the property from that time until early 1994, when the City demolished his house and other improvements because of severe landslides following the Northridge earthquake.

In 1959, a City-sponsored study of landslides in Pacific Palisades showed the coastal bluff was vulnerable to further slides. In 1966, a large slide destabilized the subject property. In November 1966, pursuant to Los Angeles Municipal Code (Municipal Code) section 91.0308(d), the City issued a notice to comply to the then owner of the property, directing the owner to vacate the property and perform stabilization work by December 9, 1966. Although section 91.0308(d) also mandated that the City record, with the county recorder, a certificate of substandard condition, the City failed to do so.

In March 1970, the City determined a hazardous slide condition existed on the property and issued the owner a notice to abate, but again failed to record a certificate of substandard condition as required by Municipal Code section 91.0308(d), although the City knew the owner had not yet complied with the 1966 notice.

In October 1970, the property’s owner applied to the City for permits to demolish portions of the existing residence on the property and rebuild it farther from the landslide-damaged bluff. In October and November 1970, the City approved the project and issued the requested permits, without requiring a recorded affidavit from the owner stating the owner’s awareness of unstable soil conditions as required by Municipal Code section 91.0203(2) and without receiving a geological report and landslide stabilization plan as required by Municipal Code section 91.3011(d)(1). In April 1971, the City issued an additional permit, allowing construction of an additional room, again without complying with either section 91.0203(2) or section 91.3011(d)(1). The City issued a certificate of occupancy for the new house in December 1972.

In January 1973, a new owner of the property applied for permits to construct a carport and a swimming pool, the latter on a part of the property near the unstable bluff. The owner submitted two geologists’ reports in support of his application. Neither report, however, was based on an adequate investigation of subsurface conditions on the bluff, and neither demonstrated the 1966 slide mass had been or would be stabilized. The City nonetheless approved the construction of the swimming pool in February 1973, again without demanding a recorded owner’s affidavit as required by Municipal Code section 91.0203(2). Shortly afterward, one of the consulting geologists, William Waisgerber, informed the City that his report did not support construction of a swimming pool, because the report had not been prepared with that project in mind and adequate subsurface exploration for that purpose had not been done. The City nonetheless took no steps to stop construction of the swimming pool.

In 1977, the City issued a building permit for the addition of a bathroom and a laundry room, again without the recording of an owner’s affidavit as required by Municipal Code section 91.0203(2) or requiring any demonstration that the 1966 slide mass would be stabilized.

In 1979, the State Department of Transportation applied to the City for a grading permit to remove slide debris from the base of the coastal bluff as part of a buttress fill project. The City issued the permit without demanding a showing that the proposed buttress would stabilize the 1966 slide mass or provide adequate safety against future landslides.

When plaintiff purchased the property in 1991, its geologic instability was not apparent visually or from the title report. Because the City had never recorded a certificate of substandard condition or required the previous owners to record affidavits of awareness of slide conditions before issuing building permits in 1970, 1971, 1973, or 1977, plaintiff and his agents did not know the property was in an active landslide area or that the instability caused by landslides had never been corrected.

In January 1994, the Northridge earthquake, acting on the unstabilized condition of the property, caused massive landslides, severely damaging plaintiff’s house and destroying the property’s value, utility and marketability. In his prayer for relief, plaintiff sought compensation for property damage, and loss of use and value in excess of $3.5 million, as well as compensation for emotional distress.

The City demurred on several grounds, including that the cited Municipal Code sections did not create mandatory duties that could serve as the basis for liability under Government Code section 815.6, that the City was immune under Government Code section 818.6, and that the limitations period set out in Code of Civil Procedure section 337.15 had passed. The trial court sustained the demurrer without leave to amend as to all causes of action and dismissed the action, relying, among other grounds, on Government Code section 818.6 and Code of Civil Procedure section 337.15.

The Court of Appeal affirmed, holding the City immune under Government Code section 818.6 and the claims time-barred under Code of Civil Procedure section 337.15. The court expressly declined to reach any other issues. We granted review on plaintiff’s petition, which raised only the two issues decided by the Court of Appeal. By a later order, we requested and received briefing, as well, on the question whether the Municipal Code sections relied upon imposed mandatory duties designed to protect against the particular kind of injury plaintiff allegedly suffered, within the meaning of Government Code section 815.6. The scope of our review (Cal. Rules of Court, rules 29.2(b), 29.3(c)), therefore, encompasses three issues: use of the Municipal Code sections cited in the complaint as predicates for liability under Government Code section 815.6; immunity under Government Code section 818.6; and the time bar of Code of Civil Procedure section 337.15. As our conclusions on the first two issues dispose of the case, however, we have no occasion to discuss the third.

Discussion

Government Code section 815.6 (hereafter section 815.6), unchanged since its enactment in 1963, provides: “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.”

First and foremost, application of section 815.6 requires that the enactment at issue be obligatory, rather than merely discretionary or permissive, in its directions to the public entity; it must require, rather than merely authorize or permit, that a particular action be taken or not taken. (Morris v. County of Marin (1977) 18 Cal.3d 901, 907, 910 [136 Cal.Rptr. 251, 559 P.2d 606].) It is not enough, moreover, that the public entity or officer have been under an obligation to perform a function if the function itself involves the exercise of discretion. (Creason v. Department of Health Services (1998) 18 Cal.4th 623, 631-633 [76 Cal.Rptr.2d 489, 957 P.2d 1323] (Creason).)

Whether an enactment creates a mandatory duty is a question of law: “Whether a particular statute is intended to impose a mandatory duty, rather than a mere obligation to perform a discretionary function, is a question of statutory interpretation for the courts.” (Creason, supra, 18 Cal.4th at p. 631.) The enactment’s language “is, of course, a most important guide in determining legislative intent, [but] there are unquestionably instances in which other factors will indicate that apparent obligatory language was not intended to foreclose a governmental entity’s or officer’s exercise of discretion.” (Morris v. County of Marin, supra, 18 Cal.3d at pp. 910-911, fn. 6.)

Second, but equally important, section 815.6 requires that the mandatory duty be “designed” to protect against the particular kind of injury the plaintiff suffered. The plaintiff must show the injury is “ ‘one of the consequences which the [enacting body] sought to prevent through imposing the alleged mandatory duty.’ ” (Hoff v. Vacaville Unified School Dist. (1998) 19 Cal.4th 925, 939 [80 Cal.Rptr.2d 811, 968 P.2d 522], fn. omitted.) Our inquiry in this regard goes to the legislative purpose of imposing the duty. That the enactment “confers some benefit” on the class to which plaintiff belongs is not enough; if the benefit is “incidental” to the enactment’s protective purpose, the enactment cannot serve as a predicate for liability under section 815.6. (Nunn v. State of California (1984) 35 Cal.3d 616, 626 . [200 Cal.Rptr. 440, 677 P.2d 846].)

Preliminarily, the City and an amicus curiae coalition of local governments contend that, for local ordinances like those at issue here to serve as predicates for liability under section 815.6, the plaintiff must demonstrate not only that the duties created are obligatory and intended to protect against the type of injury suffered, but also that the ordinance expressly manifests the enacting body’s intent to create a private right of action for those situated similarly to the plaintiff. The Attorney General, appearing as an amicus curiae, argues even more broadly that health, safety and welfare regulations, whether enacted at the state or local level, should not be considered predicates for liability under section 815.6 “[a]bsent clear evidence of an intent to create a private right of action.”

We cannot agree with the City and amici curiae that liability under section 815.6 requires that the enactment establishing a mandatory duty itself manifest an intent to create a private right of action, for their position is directly contrary to the language and function of section 815.6. When an enactment establishes a mandatory governmental duty and is designed to protect against the particular kind of injury the plaintiff suffered, section 815.6 provides that the public entity “is liable” for an injury proximately caused by its negligent failure to discharge the duty. It is section 815.6, not the predicate enactment, that creates the private right of action. If the predicate enactment is of a type that supplies the elements of liability under section 815.6—if it places the public entity under an obligatory duty to act or refrain from acting, with the purpose of preventing the specific type of injury that occurred—then liability lies against the agency under section 815.6, regardless of whether private recovery liability would have been permitted, in the absence of section 815.6, under the predicate enactment alone. (See Crusader Ins. Co. v. Scottsdale Ins. Co. (1997) 54 Cal.App.4th 121, 125-126 [62 Cal.Rptr.2d 620] [distinguishing between use of enactment directly to establish private right of action, which requires legislative intent to create such a right, and use of enactment to establish one or more elements of a preexisting, independent cause of action, which does not require legislative intent to create a cause of action in the predicate enactment].)

The City and amici curiae’s theory would reduce section 815.6 to a virtual nullity and, with regard to local enactments, would have the bizarre effect of placing with local governmental entities the decision whether they will be liable or immune under state law. We have previously rejected the notion that a local government can, by its own ordinance, exempt itself from liability under the state’s Tort Claims Act, of which section 815.6 is a part. (Societa per Azioni de Navigazione Italia v. City of Los Angeles (1982) 31 Cal.3d 446, 463 [183 Cal.Rptr. 51, 645 P.2d 102] ,)

We must, therefore, examine the language, function and apparent purpose of each cited Municipal Code section to determine if any or each creates a mandatory duty designed to protect against the kind of injury plaintiff allegedly suffered here.

For his first cause of action, plaintiff alleged the City had breached its mandatory duty to record a certificate of substandard condition with the county recorder at the time the City determined the property was unstable and so notified the owner. In 1966 such duty was stated in section 91.0308(d) of the Municipal Code and, from 1987 on, in section 91.7001(i) of that code. The City allegedly violated this duty, making no reasonably diligent efforts to discharge it, in 1966 when it notified the then owner of the instability but failed to record the notice, and in March 1970, October 1970, February 1971, March 1973 and October 1979, when events connected to the various improvement projects should have reminded the City the 1966 slide condition had never been corrected. Had the City recorded the required notice, plaintiff allegedly would not have purchased the property or suffered the ensuing landslide damage and emotional distress.

At all times the City allegedly violated it, Municipal Code section 91.0308(d) provided: “Unstable Property. Whenever the Superintendent of Building determines by inspection that a property, either improved or unimproved, is unstable because of landslide, subsidence or inundation he shall give written notice to the owner that the property is substandard. Notice shall specify conditions creating substandard classification. [¶] At the time of giving the above mentioned notice, the Superintendent of Building shall also file with the office of the County Recorder a certificate that the property is substandard and that the owner thereof has been so notified. The certificate shall specify conditions creating substandard classification. [¶] Upon notice of correction of the unstable conditions due to landslide, subsidence or inundation the Superintendent of Building shall file with the office of the County Recorder a certificate specifying that the property is no longer considered substandard due to landslide, subsidence or inundation.” (Italics added.)

In describing the duty to record a certificate of substandard condition, Municipal Code section 91.0308(d) uses obligatory rather than permissive language. The City argues, nevertheless, that no mandatory duty is created, because the ordinance leaves the responsible City officer with the discretion “to initially conduct an inspection and then to make the expert determination whether land was unstable to the degree that a notice should be issued and a certificate should be recorded,” as well as the discretion to determine “what specific geological conditions caused the instability.” We agree that the determinations whether a property is unstable, and what conditions make it so and thus must be remedied, rest, under the ordinance, with the judgment and discretion of the superintendent of building or his or her staff. But once these determinations have been made—as they allegedly were in this case in 1966 and 1970—the ordinance does not contemplate any further discretionary decision as to whether to record the certificate of substandard condition; rather, the ordinance commands that such a certificate be recorded when the owner is given notice of the substandard condition. In this respect—the only respect pertinent to plaintiff’s first cause of action—Municipal Code section 91.0308(d) creates a mandatory duty. (See Thompson v. City of Lake Elsinore (1993) 18 Cal.App.4th 49, 58 [22 Cal.Rptr.2d 344] [although defendant city had discretion to issue or not issue building permit and to determine whether completed project met permit requirements, once the final determination of compliance was made city “retained no further discretion to withhold the certificate of occupancy”]; Johnson v. Mead (1987) 191 Cal.App.3d 156, 159-160 [236 Cal.Rptr. 277] [although Department of Motor Vehicles had discretion to determine whether driver’s alcoholism and drug addiction made him incapable of driving safely, once such determination was made the department had a mandatory duty not to issue or renew driver’s license].)

A more difficult question is whether Municipal Code section 91.0308(d) was “designed to protect against the risk of [the] particular kind of injury” plaintiff allegedly suffered. (Gov. Code, § 815.6.) Plaintiff alleges that, had the City recorded the required certificate of substandard condition, he would not have purchased the property and would therefore not have suffered the pled losses due to the landslide damage and ensuing emotional distress. This, plaintiff contends, was the exact injury the ordinance’s recordation requirement was designed to prevent: “The only conceivable purpose of recording that [instability] information . . . was to put future purchasers (and others involved in property purchases, such as lenders and title companies) on notice of the instability.” (See Grenell v. City of Hermosa Beach (1980) 103 Cal.App.3d 864, 870-871 [163 Cal.Rptr. 315] [city ordinances requiring city to issue report on authorized use, zoning classification, etc., of property being purchased were designed to protect against purchaser’s buying property that could not lawfully be used as the seller represented]; Bradford v. State of California (1973) 36 Cal.App.3d 16, 21 [111 Cal.Rptr. 852] [state’s mandatory duty to record dismissal of criminal charges after service of probation designed to protect against type of injury plaintiff suffered when he was arrested for failure to register as a sex offender].)

The City argues, to the contrary, that the recordation provision of Municipal Code section 91.0308(d) was designed not for the benefit of prospective purchasers, but “as leverage to compel compliance with an order to comply . . . .” Observing that the City’s building code was promulgated, according to its own terms, to protect life, limb, property and the public welfare generally “by regulating and controlling the design [and] construction” of buildings (Mun. Code, § 91.101.2), the City contends the recordation requirement is simply an enforcement tool designed as protection for the general public as a whole against the effects of improper construction, rather than as protection against economic losses by purchasers or lenders.

We agree with the City that the probable purpose of the ordinance’s recordation requirement is to encourage the landowner to undertake necessary stabilization work, for if he or she does not do so, a recorded certificate of substandard condition will seriously impair the value of the property for possible sale or security. True, the recordation also may provide warning to potential purchasers and lenders (assuming what has not been demonstrated, that the recorded notice would be disclosed by a standard title search), but that effect is aptly described as “incidental” (Nunn v. State of California, supra, 35 Cal.3d at p. 626) to the ordinance’s enforcement goals. Municipal Code section 91.0308(d) exists to protect the public against unsafe building and land conditions, not to regulate the marketing of real estate. (See Nunn, supra, at pp. 625, 626 [statute requiring armed security guards to take firearms course and state agency to prescribe standards for such a course was designed “for the purpose of protecting the public from the danger of incompetent armed private security guards” and had only incidental benefit to guards themselves]; Zolin v. Superior Court, supra, 19 Cal.App.4th at pp. 1164-1165 [requirement that Department of Motor Vehicles publish list of accredited traffic schools was designed for efficient use of courts and traffic violators, not to give schools guarantee of equal competition; school negligently omitted from list, therefore, has no cause of action under § 815.6].)

Plaintiff’s first cause of action was, in addition, barred by Government Code section 818.6 (hereafter section 818.6), which provides: “A public entity is not liable for injury caused by its failure to make an inspection, or by reason of making an inadequate or negligent inspection, of any property, other than its property (as defined in subdivision (c) of Section 830), for the purpose of determining whether the property complies with or violates any enactment or contains or constitutes a hazard to health or safety.” Construing the immunity of section 818.6 broadly to include the entire process of inspection and reporting (see Cochran v. Herzog Engraving Co. (1984) 155 Cal.App.3d 405 [205 Cal.Rptr. 1] (Cochran)), the Court of Appeal correctly held that section 818.6 immunizes the City from liability for failing, after an inspection, to take the additional step of recording with the county recorder the information so discovered.

In Cochran, the plaintiffs’ decedent had been killed in a fire at her workplace, an engraving shop. The city fire department had inspected the shop twice; the first report noted the presence of magnesium, a highly combustible substance, on the premises, but the subsequent inspection report failed to note that hazard. There was no record the fire department had informed the employer of the need for special safety precautions in the storage of magnesium. (Cochran, supra, 155 Cal.App.3d at p. 408.) The Court of Appeal held section 818.6 immunized the city against any liability for failing to inspect the property with due care or to specify needed safeguards against fire. The court interpreted section 818.6 broadly as “protect[ing] public entities from liability not only for failures to detect technical safety code violations, but for any negligence directly connected to the inspection process itself.” (Cochran, supra, at p. 412.) If the safety inspection immunity were narrowly construed to cover only the inspection per se, the court observed, municipalities would be discouraged from making diligent efforts to uncover possible hazards. (Ibid.)

The mandatory duty to record a certificate under Municipal Code section 91.0308(d) arises only if instability is discovered by inspection. The ordinance begins: “Whenever the Superintendent of Building determines by inspection that a property, either improved or unimproved, is unstable because of landslide . . . .” (Italics added.) Under section 818.6, if the city’s inspection negligently failed to identify a hazard, neither the owner nor subsequent purchasers would be able to maintain a lawsuit; nor would an action lie if the city impaired the value of the property by conducting an inspection that negligently identified a hazard that did not exist. To impose liability for failing to record the result of the inspection would frustrate the purpose of the immunity statute; we do not believe the Legislature intended such a narrow immunity.

As the court in Cochran observed: “Public safety inspection necessarily encompasses making an informed determination that given conditions are in fact hazardous or not in compliance with regulations, officially reporting these hazardous conditions, and fully disclosing them to all interested parties. Appellants’ narrow interpretation of the immunity statute would . . . encourage municipalities not to make any efforts to learn about possible . . . hazards.” (Cochran, supra, 155 Cal.App.3d at pp. 411-412, italics added.) In the present case, similarly, allowing liability for failure to fully report, by recordation, the results of an inspection, while immunizing the failure to make an inspection at all, would have the effect, contrary to the evident legislative intent, of discouraging municipal safety and health inspections. Even if plaintiff’s first cause of action stated a valid claim for breach of a mandatory duty, therefore, section 818.6 would immunize the City from liability for that breach. (See Gov. Code, § 815, subd. (b) [immunity provisions of Tort Claims Act prevail over liability provisions].)

For his second cause of action, plaintiff alleged the City had breached its mandatory duty to require, before issuing building permits in known landslide areas, that the property owner record with the county recorder an affidavit to the effect the owner is aware the property is in an area subject to sliding or unstable soil. In 1970 such duty was stated in section 91.0203(2) of the Municipal Code and, from 1989 on, in section 91.0303(a)(2) of that code. The City allegedly violated this duty, making no reasonably diligent efforts to discharge it, by issuing building permits in November 1970, April 1971, February 1973 and January 1977 without requiring that an affidavit be recorded. Had such affidavits been recorded, plaintiff would not have purchased the property or suffered the ensuing landslide damage and emotional distress.

At all times the City allegedly violated it, Municipal Code section 91.0203 provided: “(2) The Department shall have the authority to withhold a building permit where the proposed building site is in an area subject to slides or unstable soil. If the Department finds that the above hazards are not likely to be of such extent as to be an immediate hazard to occupancy of the proposed building, the Department shall issue a building permit upon receipt of a sworn affidavit which has been recorded by the County Recorder, stating that the applicant is fully aware that the site is in an area subject to slides or unstable soil. [¶] . . . [¶] Areas requiring the affidavit . . . shall be established by the Department after public hearings on the location of such areas are held by the Board of Building and Safety Commissioners.” (Italics added.) Plaintiff claims the italicized portion created a mandatory duty not to issue a building permit in a slide area without obtaining the described recorded affidavit from the property owner, a duty the City allegedly violated when it issued various permits to the subject property’s prior owners during the period 1970-1977.

For two reasons, we disagree. First, the ordinance, on its face, does not, as plaintiff claims, provide that a permit shall issue only upon receipt of a recorded affidavit. Rather, it provides that a permit shall issue “upon receipt” of a recorded affidavit. (Mun. Code, § 91.0203(2).) Reading section 91.0203(2) literally, then, the building department’s mandatory duty, if any, would be to issue a permit upon receipt of a recorded affidavit. Plaintiff, of course, does not allege the City violated such a duty.

Second, even if Municipal Code section 91.0203(2) were interpreted as impliedly providing that a permit shall issue only upon receipt of a recorded affidavit, the ordinance, read as a whole, provides the City with such significant discretion in whether to issue or withhold permits as to make Government Code section 815.6 inapplicable. The ordinance begins with a permissive statement of general authority: “The Department shall have the authority to withhold a building permit where the proposed building site is in an area subject to slides or unstable soil.” (Mun. Code, § 91.0203(2).) It then provides for two specific respects in which City officers and staff are to exercise their judgment and discretion: first, to determine the location and boundaries of the areas requiring affidavits, and, second, to decide whether the instability of a given property is of such magnitude as to cause an immediate hazard to occupancy of the proposed development. Given the pervasively discretionary nature of the City’s authority to withhold a permit for building on unstable property and to determine whether an affidavit should be required, we discern in Municipal Code section 91.0203(2), despite its use of “shall,” no clear intent to mandate that the City, without the exercise of discretion or judgment, deny a permit if no affidavit has been recorded. (See Creason, supra, 18 Cal.4th at pp. 631-633 [statutes requiring state agency to develop and implement programs for testing newborns for congenital disorders left selection of testing and reporting standards to agency’s discretion, despite inclusion of some mandatory language]; Fox v. County of Fresno (1985) 170 Cal.App.3d 1238, 1243-1244 [216 Cal.Rptr. 879] [although statute providing for agency legal action to enforce building standards included the word “shall” at points, at other points it clearly gave enforcement agency the discretionary choice whether and how to enforce standards; statute is therefore permissive rather than mandatory within the meaning of § 815.6].)

For his third cause of action, plaintiff alleged the City had breached its mandatory duty not to issue grading or building permits for property in an active landslide area unless the applicant demonstrated the proposed construction would stabilize the entire slide mass. In 1970, such duty was stated in section 91.3011(d)(1) of the Municipal Code and, from 1985 on, in section 91.7011(d) of that code. The City allegedly violated this duty, making no reasonably diligent efforts to discharge it, by issuing building or grading permits in November 1970, April 1971, February 1973, January 1977 and October 1979 without first requiring the applicants to submit maps or investigations of subsurface conditions or stability analyses or plans. The City’s negligence proximately caused plaintiff to suffer the ensuing landslide damage and emotional distress.

At all times the City allegedly violated it, Municipal Code section 91.3011(d)(1) provided: “No building or grading permits shall be issued for construction in active or historic landslide areas until, and unless, stabilization on the entire slide or soil mass on which the property lies can be satisfactorily demonstrated to the Department.” Plaintiff contends this provision created a mandatory duty on the City’s part to withhold permits until the applicant had made an adequate showing of stabilization, a duty the City allegedly breached in the period 1970-1979 by issuing to the property’s former owners various permits without first receiving adequate analyses of subsurface conditions and slope stability.

Plaintiff’s argument depends on reading the ordinance as requiring an objectively satisfactory showing of slide stabilization. It cannot, however, reasonably be so read. The demonstration referred to is to be made “to the Department.” (Mun. Code, § 91.3011(d)(1).) The ordinance contains no reference or allusion to any third party who might evaluate the applicant’s showing. The only reasonable interpretation of the ordinance, therefore, is that the applicant must demonstrate slope stabilization to the “satisfact[ion]” of the City’s staff. (Ibid.) So understood, Municipal Code section 91.3011(d)(1) explicitly calls upon the judgment, expertise and discretion of the City’s staff to evaluate the applicant’s showing. Such an enactment does not create a mandatory duty within the meaning of Government Code section 815.6. (See Cancun Homeowners Assn. v. City of San Juan Capistrano (1989) 215 Cal.App.3d 1352, 1358-1359 [264 Cal.Rptr. 288] [city building inspector did not have mandatory duty to disapprove landfill with less than 90 percent compaction where city ordinance called for that compaction standard “ ‘[u]nless otherwise approved by the Building Official,’ ” and allowed approval of even hazardous grading if hazard could be controlled “ ‘to the satisfaction of the Building Official’ ” (italics omitted)]; Gray v. State of California (1989) 207 Cal.App.3d 151, 155-156 [254 Cal.Rptr. 581] [where statute contemplated agency investigation into background of potential gun purchaser, but did not specify the type of investigation required, matter of proper investigation has been left to the agency’s discretion].)

For his fourth cause of action, plaintiff alleged the City had violated its mandatory duty to stop construction the City knew did not comply with the Municipal Code. In 1973 such duty was stated by section 91.0305 of the Municipal Code and, from 1985 on, in section 91.0202(d) of that code. The City allegedly violated this duty, mating no reasonably diligent efforts to discharge it, in March 1973, by failing to stop construction of the swimming pool, despite knowing from the Waisgerber letter that an adequate investigation of subsurface conditions had not been done and knowing that no owner’s affidavit of awareness of slide conditions had been recorded. The City’s negligence proximately caused plaintiff to suffer the ensuing landslide damage and emotional distress.

At all times the City allegedly violated it, Municipal Code section 91.0305 provided: “Whenever any construction or work is being done contrary to the provisions of any law or ordinance enforced by the Department, the Superintendent of Building shall issue a written notice to the responsible party to stop work on that portion of the work on which the violation has occurred. The notice shall state the nature of the violation and no work shall be done on that portion until the violation has been rectified and approval obtained from the Department.” Plaintiff argues this section creates a mandatory duty to stop work on nonconforming construction, a duty the City violated in 1973 by failing to stop work on the swimming pool addition.

We do not discern in Municipal Code section 91.0305 any intent to create a mandatory duty of enforcement. The title of the section is “Authority to Stop Work,” suggesting that its purpose is to describe and authorize use of a particular enforcement tool, rather than to mandate that all building laws be enforced by use of this tool at all times. Although the ordinance provides that a written stop-work notice “shall” issue to interrupt illegal construction {ibid.), it leaves to the building department staff, at least initially, the decision whether a particular project violates any law enforced by the department. Moreover, as we have just seen in addressing plaintiff’s second and third causes of action, neither of the two laws plaintiff alleges the swimming pool construction violated, Municipal Code sections 91.3011(d) and 91.0203(2), itself creates a mandatory duty of enforcement.

Conclusion

Plaintiff’s first cause of action adequately pleads, pursuant to section 815.6, the City’s violation of a mandatory duty, but the duty in question was not designed to protect against the type of injury plaintiff allegedly suffered; moreover, this cause of action is subject to the inspection immunity of section 818.6. Plaintiff’s remaining causes of action do not adequately plead the City’s violation of a mandatory duty within the meaning of section 815.6. The trial court, therefore, properly sustained the demurrer as to all causes of action.

Disposition

The judgment of the Court of Appeal is affirmed.

George, C. J., Kennard, J., Baxter, J., Chin, J., and Brown, J., concurred.

MOSK, J., Concurring and Dissenting.

The first cause of action states a valid claim for relief. Accordingly, the Court of Appeal’s judgment should be reversed in part.

Plaintiff’s first cause of action alleges failure to comply with the duty to record a certificate of substandard condition prescribed in this ordinance: “Whenever the Superintendent of Building determines by inspection that a property, either improved or unimproved, is unstable because of landslide, subsidence or inundation[,] he shall give written notice to the owner that the property is substandard. Notice shall specify conditions creating substandard classification. [¶] At the time of giving the above mentioned notice, the Superintendent of Building shall also file with the office of the County Recorder a certificate that the property is substandard and that the owner thereof has been so notified. The certificate shall specify conditions creating substandard classification. [¶] Upon notice of correction of the unstable conditions due to landslide, subsidence or inundation[,] the Superintendent of Building shall file with the office of the County Recorder a certificate specifying that the property is no longer considered substandard due to landslide, subsidence or inundation.” (L.A. Mun. Code, § 91.0308 (d).)

The ordinance’s plain language does not admit of any discretionary exercise of judgment on the part of the responsible city employee regarding whether the certificate should be recorded, even if discretion and judgment are involved in evaluating the substandard conditions to be specified in the owner’s notice and the recorded certificate. Once this work has been done, the ordinance requires that the certificate be recorded when the owner receives notice of the problem. In this respect, it creates a mandatory duty. (See Thompson v. City of Lake Elsinore (1993) 18 Cal.App.4th 49, 57-58 [22 Cal.Rptr.2d 344] [city had discretion to issue building permit or not and to determine whether completed project met permit requirements, but once the final determination of compliance was made it “retained no further discretion to withhold the certificate of occupancy”]; Johnson v. Mead (1987) 191 Cal.App.3d 156, 159-160 [236 Cal.Rptr. 277] [Department of Motor Vehicles had discretion to determine whether driver’s alcoholism and drug addiction made him incapable of driving safely, but once it decided, it had a mandatory duty not to issue or renew driver’s license].)

I also believe that the ordinance was designed to protect against the type of injury plaintiff allegedly suffered. To be sure, one evident purpose of the ordinance’s recording requirement is to encourage the landowner to undertake necessary stabilization work, lest the recorded certificate cause the property to become difficult or impossible to sell. But the warning that recording provides to potential purchasers and lenders is an integral part of the legislative scheme and, in that sense, cannot be described as “incidental.” (Nunn v. State of California (1984) 35 Cal.3d 616, 626 [200 Cal.Rptr. 440, 677 P.2d 846].) It is precisely by protecting others against unknowingly buying (or lending money on the security of) unstable property that recording serves as leverage against the current owner. Nor can the interest of a property’s future owners in knowing its stability, or lack thereof, be described as wholly economic; the warning that recording provides may prevent future owners from building unsafe improvements, or may spur them to take corrective measures. Whether recording leads to the owner’s correcting the problem or whether the owner chooses to leave the problem uncorrected and forgo future development or sale of the property, then, the effect is within the general goals of the city’s building code—to protect life, health, property and the general welfare by regulating construction.

As regards inspection immunity, I agree with plaintiff that the connection between inspection and the negligence alleged—the failure to record a certificate with the county recorder’s office—is too attenuated to call for application of Government Code section 818.6. That statute provides: “A public entity is not liable for injury caused by its failure to make an inspection, or by reason of making an inadequate or negligent inspection, of any property, other than its property ... for the purpose of determining whether the property complies with or violates any enactment or contains or constitutes a hazard to health or safety.” The inspection process was completed when the city reported the results of the inspection by notifying the property owner of the need to correct the property’s unstable condition. The city’s failure to take an additional mandated step designed for enforcement and as a warning to others—i.e., recording the notice with the county recorder—was not an integral part of the inspection. (Cf. Cochran v. Herzog Engraving Co. (1984) 155 Cal.App.3d 405, 412 [205 Cal.Rptr. 1].)

There is also the question whether Code of Civil Procedure section 337.15 bars the suit. It provides, in relevant part: “(a) No action may be brought to recover damages from any person, or the surety of a person, who develops real property or performs or furnishes the design, specifications, surveying, planning, supervision, testing, or observation of construction or construction of an improvement to real property more than 10 years after the substantial completion of the development or improvement for any of the following: [¶] (1) Any latent deficiency in the design, specification, surveying, planning, supervision, or observation of construction or construction of an improvement to, or survey of, real property, [¶] (2) Injury to property, real or personal, arising out of any such latent deficiency.”

Code of Civil Procedure section 337.15 protects only two classes of potential defendants (along with their sureties): those who have “develop [ed]” real property and those who have “perform[ed] or fumish[ed]” specified services contributing to an “improvement” to real property. The city does not contend that it developed the property. The question, therefore, is whether the negligence alleged in the first cause of action occurred in the performance or furnishing of “design, specifications, surveying, planning, supervision, testing, or observation of construction or construction” for an improvement of the property. (Ibid.) It did not. The recording of, or failure to record, a notice that land is in substandard condition because of instability, unconnected to ongoing or contemplated improvement, cannot be described as the performance or furnishing of a service for an improvement to real property.

For the foregoing reasons, I would reverse the Court of Appeal’s judgment in part and affirm it in part. 
      
       We therefore do not reach the City’s contention its alleged violation of the Municipal Code sections was, as a matter of law, not the proximate cause of plaintiff’s alleged injuries. We also do not reach the City’s contention plaintiff must show that the mandatory duties existed under the Municipal Code not only at the time the City allegedly breached them, but also at the time plaintiff purchased the property.
     
      
       To the extent Court of Appeal decisions construing section 815.6 have relied on the theory that the legislative body enacting the predicate law must have intended to create a private right of action (see Zolin v. Superior Court (1993) 19 Cal.App.4th 1157, 1164-1166 [23 Cal.Rptr.2d 871]; State of California v. Superior Court (1992) 8 Cal.App.4th 954, 958 [10 Cal.Rptr.2d 527]), we disapprove those decisions. The amicus curiae group of local governments also cites language from our decision in Creason, supra, 18 Cal.4th 623, referring to the Legislature’s probable lack of intent to create, in the predicate statutes at issue, a private right of action for those such as plaintiff. (See id. at pp. 631, 632, 633, 634.) Creason, however, involved state statutes rather than local ordinances; in that light, the language cited may be understood simply as resting on the indisputable principle that the Legislature may, by later and more specific enactments, create exceptions to the general rule of liability set forth in section 815.6. In any event, our holding in Creason was that the statutes at issue established no mandatory duty, but only a direction to the agency concerned to exercise its discretion and judgment. (Creason, supra, 18 Cal.4th at p. 635.)
     
      
       The final paragraph of the section is not quoted in the complaint, but is quoted in the City’s brief and appears in the official version of the City’s 1966 Building Code, a portion of which was attached to the demurrer. The City attached parts of several editions of the Municipal Code, from various years, to the demurrer, requesting that the trial court take judicial notice of them. The record does not contain a ruling by the trial court on that request. In this court, the City requests we take notice of (1) the code provisions just referred to, which were submitted with the demurrer, (2) various current provisions of the Municipal Code that are parallel to the former provisions upon which plaintiff relies, and (3) the entireties of the Waisgerber and John Merrill geological reports, which were cited in the complaint but not quoted there in full. Plaintiff opposes notice of the two geological reports and argues there is no need for notice of the code provisions because the provisions upon which he relies are quoted in the complaint.
      Notice of the code provisions is appropriate to ensure that the provisions upon which plaintiff relies to establish mandatory duties were in force at the times such duties were allegedly violated, and for the court to determine whether the full code provisions, each read as a whole, created actionable mandatory duties under Government Code section 815.6. (See Code Civ. Proc., § 430.30, subd. (a) [noticeable matter may be basis for demurrer]; People v. Oakland Water Front Co. (1897) 118 Cal. 234, 244-245 [50 P. 305] [proper, on demurrer, to take notice of statutes to negate allegation of complaint].) Notice of the contents, though not the truth, of the geological reports might be appropriate to fill out or qualify allegations regarding those reports in the complaint (see Pacific Employers Ins. Co. v. State of California (1970) 3 Cal.3d 573, 575, fn. 1 [91 Cal.Rptr. 273, 477 P.2d 129]), but such notice is unnecessary here because the reports are not relevant to any issue within our scope of review. We therefore grant the motion as to items (1) and (2), but deny it as to item (3).
     