[EDITORS' NOTE: THIS PAGE CONTAINS HEADNOTES. HEADNOTES ARE NOT AN OFFICIAL PRODUCT OF THE COURT, THEREFORE THEY ARE NOT DISPLAYED.] *Page 320 Petitioners brought this proceeding in mandamus in the superior court of the city and county of San Francisco to compel the respondent to extend its water mains and supply petitioners with water. The superior court sustained *Page 321 a demurrer to an amended petition of petitioners without leave to them to further amend and entered judgment in favor of respondent. Petitioners appealed from that judgment and it was affirmed by the district court of appeal. A further hearing was granted in this court.
The following are the principal facts alleged and relied on in the petition: The petitioners are all residents of and property owners in that portion of the city and county of San Francisco bounded on the north by Geary Street, on the south by Fulton Street, on the east by Fifteenth Avenue, and on the west by Nineteenth Avenue. Within this area is embraced a district of approximately eight blocks square intersected by Sixteenth, Seventeenth, and Eighteenth Avenues running northerly and southerly, and by Anza, Balboa, and Cabrillo streets running easterly and westerly therethrough Within this described district there are more than one hundred buildings occupied by some one hundred families, the value of said buildings aggregating an amount in excess of five hundred thousand dollars. The respondent is a corporation duly organized and existing under the laws of the state of California and the grantee and successor of the rights, franchises, duties, and responsibilities of the Spring Valley Water Works, a corporation organized about June 19, 1858, under the act of April, 1858, for the purpose of supplying the city and county of San Francisco and the inhabitants thereof with a sufficient supply of water for domestic use and other purposes. The respondent has been for a long time and is now engaged in the business of furnishing and distributing water to the greater portion of the inhabitants of the said city and county through a system of mains and lateral water-pipes which are laid in, through and along various streets, avenues, alleys, and highways of said municipality; that a large main of the respondent more than sixteen inches in diameter extends along Geary Street on the northerly line of the district heretofore described within which petitioners reside and on the avenues and streets of which they own property, and a smaller main extends along Fulton Street on the southerly line of said district; that some extensions of smaller mains or laterals have been made by respondent northerly from its main on Fulton Street along Sixteenth, Eighteenth, and Nineteenth avenues in said district for a block, and southerly from the main on Geary Street about *Page 322 two blocks along Fifteenth, Sixteenth, and Nineteenth avenues in said district, but no mains or lateral water-pipes have been yet extended to the streets in said district on which the petitioners reside and own property; that in order to supply some of the petitioners with water it would only be necessary for the respondent to extend its mains by lateral connections fifty feet southerly from the Geary Street main along the avenues on which such petitioners reside, and in order to supply all the petitioners with water respondent will be required to install lateral connections with said Geary Street main extending some two thousand feet southerly along the avenues upon which the greater number of the petitioners reside. Respondent has in its various reservoirs far more than enough water to furnish a sufficient and adequate supply of water regularly each day to each and every part of said city and county of San Francisco and to all the inhabitants and residents thereof, and could if its water mains and laterals were extended some two thousand feet as above set forth along the avenues and streets of said district readily and easily supply water to all the petitioners for all proper uses and purposes without depriving the inhabitants of any portion of said city and county of their accustomed and necessary daily supply of water. The petitioners have demanded of the respondent repeatedly that it extend its water mains into and through said streets and avenues upon which petitioners reside, and that they be served with water sufficient for domestic purposes and for protection against fire, and have offered to pay all lawful rates and charges of respondent therefor, but respondent has refused to comply with the demand of petitioners in whole or in part and refuses to do so.
The attack of respondent upon this petition by demurrer was based upon a large number of grounds but the principal one presented and relied on is that the facts alleged in the petition do not sustain any right in petitioners to be granted the relief they seek.
The predecessor and grantor of respondent, the Spring Valley Water Works, was organized under the act of 1858 which provided that "All corporations formed under the provisions of this act, or claiming any of the privileges of the same, shall furnish pure, fresh water to the inhabitants of said city and county, or city, or town, for family uses, so long as *Page 323 the supply permits, at reasonable rates, without distinction of persons, upon proper demand therefor and shall furnish water to the extent of their means to such city and county, or city, or town, in case of fire, or other urgent great necessity, free of charge." (Stats. 1858, p. 218.) It is further provided by section549 of the Civil Code "That all corporations formed to supply water to cities or towns must furnish pure, fresh water to the inhabitants thereof, for family uses, so long as the supply permits, at reasonable rates and with out distinction of persons, upon proper demand therefor; and must furnish water to the extent of their means, in case of fire or other great necessity, free of charge. The board of supervisors, or proper city or town authorities, may prescribe proper rules relating to the delivery of water, not inconsistent with the laws of the state." The constitution of the state of California — section 19, article XI, as amended on February 12, 1885, [Stats. 1885, p. 228], provided as follows: "In any city where there are no public works owned and controlled by the municipality for supplying the same with water or artificial light, any individual, or any company duly incorporated for such purpose under and by authority of the laws of this state, shall, under the direction of the superintendent of streets, or other officer in control thereof, and under such general regulations as the municipality may prescribe, for damages and indemnity for damages, have the privilege of using the public streets and thoroughfares thereof, and of laying down pipes and conduits therein, and connections therewith, so far as may be necessary for introducing into and supplying such city and its inhabitants either with gaslight or other illuminating light, or with fresh water for domestic and all other purposes, upon the condition that the municipal government shall have the right to regulate the charges thereof."
The contention of the petitioners is, and the petition was drafted upon that theory, that under the terms of the franchise by which its right to operate in the city and county of San Francisco was granted to and accepted by the respondent, as well as under the statute and constitutional provision, the duty was assumed by the company and the implied obligation was cast upon it of taking all reasonable measures to supply the entire city and its inhabitants with water and in the discharge of that obligation to lay its pipes in the streets *Page 324 thereof so as to make the supply accessible to such inhabitants.
The claim of respondent is that neither its franchise nor the provisions relied on by petitioner requires it to make any extensions of its system by the addition of water mains to districts within the city other than it may deem proper to do; that the only legal duty which it owes to such inhabitants is that when it had laid its mains or laterals along the streets of the city it must allow service connections to be made therewith for the benefit of property owners along the line of said mains and laterals.
Having stated the contentions of the respective parties, we proceed to examine their merits.
The predecessor of respondent and respondent itself was not organized and is not engaged in a private enterprise, the conduct of which is within its own control. It was organized for and is engaged in a public enterprise and its rights, duties, and responsibilities are to be determined from a consideration of the provisions of the franchise which it acquired under the act of 1858 and the obligations which it assumed when it accepted it. By incorporating under that act it unquestionably assumed the public duty of supplying the city and county of San Francisco and its inhabitants with water, which was the specific purpose for which the franchise was extended to it. Under the franchise the corporation was invested with a right of eminent domain to effect the public duty which it had undertaken and in the municipality where it undertook to carry out its assumption of this duty, and for the purpose of effectively doing so it was granted an irrevocable easement in the streets of the entire city for the purpose of laying its pipes therein and discharging the duty it had assumed. The act of 1858 in express terms confers on corporations accepting the franchise extended under it, the privilege of using the streets of the municipality in which it has undertaken to operate for laying its pipes and conduits. The respondent could acquire no right to engage in the business of supplying water to the city and county of San Francisco, with an easement over all the streets of the municipality, unless under a franchise granted by the state for that purpose and with such a right. It was for the benefit of the public that the franchise was extended; to secure to the municipality of the city and county of San Francisco and its inhabitants an adequate supply of water as the reasonable *Page 325 and necessary wants of the community in that respect might require. This was the purpose and this the condition upon which the franchise was offered and when it was accepted by the respondent it constituted a contract between the state and the respondent under which the rights, duties, and responsibilities of each were fixed and by which they were bound. The franchise was offered by the state as an entirety, and, where a corporation organizing under the act offering it undertook the public duty which such franchise contemplated of supplying water to a municipality and its inhabitants it accepted the franchise in its entirety. It was a community service which was contemplated by the extension of the franchise and which was intended should be assumed by a corporation accepting it and it was solely that this assumed duty might be properly and entirely discharged that an easement over all the streets of the municipality was granted with the franchise. The franchise was not offered, nor could it be accepted, with any limitation as to the area to be fixed by the corporation organized under the act within which in the municipality it would furnish water to its inhabitants. It was intended that the public duty assumed should be discharged for the benefit of the municipality and its inhabitants as a community; that when a water company organized under the act undertook to furnish water to the inhabitants of a city it should be charged with the obligation of taking adequate measures to supply the reasonable needs and wants of all the inhabitants as they arose. The proper discharge of this public duty required not only that the company should provide a supply of water and establish a system for its distribution to meet the reasonable needs of the municipal community as it then existed, but it was under the obligation to keep in view the prospective and probable increase in population of the municipality and the necessarily increasing demand for a water supply which would be consequent therefrom; to anticipate the natural growth of the municipality it had undertaken to serve as a whole and to take reasonable measures to have under its control a sufficient supply of water and make gradual extensions of its distributive system to meet the reasonable demands for water by the growing community. This duty the respondent assumed by accepting its franchise under the act of 1858, and as it appears from the petition that it has in its possession and under its control more than an adequate *Page 326 supply of water whereby all the inhabitants of the city and county of San Francisco may be served without at all disturbing the claims of existing consumers and that only a reasonable extension of its existing mains is required to supply the petitioners who are inhabitants of the city with the water service they have demanded, it was the legal duty of the respondent to have complied with the demand and made the extension.
We are not cited to any authority by petitioners where the precise question now under consideration was involved — the extension of a water system into new territory in a city — and to none by respondent where it is held that a corporation operating under the terms of a franchise such as is involved here is not required to do so. Our own investigation of the subject has disclosed some authorities which support the right to have such extensions made within reasonable limits. In fact, in one of them (decided after this appeal was determined by the district court of appeal) there was under consideration the rights and obligations of a public service corporation organized under the constitutional provision — section 19, article XI, as amended in 1885 — which we have quoted above and which, as far as the franchise thereby granted is concerned, is in no respect different from the franchise acquired by the respondent under the act of 1858 and the benefit of which constitutional amendment is available to respondent. That case is Russell v. Sebastian — decided by the supreme court of the United States (233 U.S. 195, [Ann. Cas. 1914C, 1282, 58 L. Ed. 912, 34 Sup. Ct. Rep. 517]). It involved the right of gas and water companies to excavate streets in municipalities for their mains under the constitutional amendment of 1885 above referred to. The Economic Gas Company had organized in 1909 for the purpose of manufacturing and delivering gas in the city of Los Angeles. It had established its works for that purpose and prior to October 10, 1911, had extended its distributing system along the streets of that city into a portion of its territory. On October 10, 1911, said section 19 of article XI of the constitution of this state was further amended to provide, among other things, that "persons or corporations may establish and operate works for supplying the inhabitants with such service (gas, water, etc.) upon such conditions and under such regulations as the municipality may prescribe under its organic law. . . ." Subsequent *Page 327 to this constitutional amendment and in 1911 the city of Los Angeles passed an ordinance providing that no one should exercise any franchise or privilege to lay or maintain pipes or conduits in the streets of the city for conveying gas, water, etc., without having obtained a grant from the city in accordance with the city charter unless entitled to do so by direct and unlimited authority of the constitution of the state of California and making it unlawful to make any excavation in a street for any purpose whatever without permission from the city, to be granted on a showing by the applicant therefor, of legal authority to use the streets for the purposes specified. In 1912 the Economic Gas Company was proceeding to open trenches in the streets of the city of Los Angeles for the purpose of extending its mains into territory in that city which it was not theretofore serving and its employee Russell was arrested at the instance of the city. The question in the case — in reality one between the gas company and the city and so presented before the supreme court — was as to the nature and extent of the right acquired by the gas company by the establishment of its works and extension of its distributing system into a portion of the city under the amendment of 1885 to the constitutional provision, and how far, having undertaken its public service prior to the amendment of 1911, it could be affected by the attempt of the city under this last amendment to the constitution to prohibit further extensions of its system through all the streets of the city without a grant or franchise from the city and permission so to do. It was held that the establishment of its plant by the gas company and the undertaking by it under the constitutional amendment of 1885 to perform the service incident to a public utility constituted a contract between the state and the company; that the actual usage of certain streets by the company did not measure the range of its acceptance of the public franchise as to streets of the city or define the limits of the operation of the company; that the offer was of a privilege to lay pipes as far as they might be required in order to effect the adequate distribution of gas and was commensurate with the requirement of the undertaking which was assumed by a public service company, — namely, of supplying such city and its inhabitants either with light or water as the case might be; that the constitutional offer of the privilege of supplying a municipality with gas *Page 328 or water was intended to be extended by the state in an entirety and to be accepted as an entirety by the company undertaking to do so and hence granted to the Economic Gas Company the right to continue to lay its pipes in the streets of the city wherever necessary to extend its service and perform the duty of supplying the service which it had undertaken by such acceptance; and that the company could not be prevented or interfered with in doing so by subsequent legislation impairing the grant.
The court after discussing the policy of the state in making the constitutional offer of such a franchise declared: "That there was no ambiguity in the scope of the (constitutional) offer. It was not simply a privilege to maintain pipes actually laid, but to lay pipes as far as they might be required in order to effect an adequate distribution. . . . The breadth of the offer was commensurate with the requirements of the undertaking which was invoked. The service to which the provision refers was a community service. It was the supplying of a municipality — which had no municipal works — with water or light. . . . In view of the nature of the undertaking in contemplation, and of the terms of the offer, we find no ground for the conclusion that each act of laying pipe was to constitute an acceptance protanto. We think that the offer was intended to be accepted in its entirety as made, and that acceptance lay in conduct committing the person accepting to the described service. . . . This construction of the constitutional provision is the only one that is compatible with the existence of the duty which it was intended, as it seems to us, that the recipient of the state's grant should assume. The service, as has been said, was a community service. Incident to the undertaking in response to the state's offer was the obligation to provide facilities that were reasonably adequate. . . . It would not be said that either a water company or a gas company, establishing its service under the constitutional grant, could stop its mains at its pleasure and withhold its supply by refusing to extend its distributing conduits so as to meet the reasonable requirements of the community. But this duty and the right to serve, embracing the right under the granted privilege to install the means of service, were correlative."
In this connection the said supreme court quoted with approval from People ex rel. Woodhaven Gas Co. v. Deehan, *Page 329 153 N.Y. 528, [47 N.E. 787], as follows: "It is well known that business enterprises such as the relator is engaged in are based upon calculations of future growth and expansion. A franchise for supplying gas not only confers a privilege, but imposes an obligation, upon the corporation to serve the public in a reasonable way. The relator is bound to supply gas to the people of the town upon certain conditions and under certain circumstances, and it would be most unjust to give such a construction to the consent as to disable it from performing its obligations. It cannot reasonably be contended that the relator is obliged to apply for a new grant whenever a new street is opened or an old one extended, as would be the case if the consent applied only to the situation existing when made. When the right to use the streets has been once granted in general terms to a corporation engaged in supplying gas for public and private use, such grant necessarily contemplates that new streets are to be opened and old ones extended from time to time, and so the privilege may be exercised in the new streets as well as in the old.'" And in the conclusion of its opinion the supreme court said with respect to the acceptance by the gas company of the franchise offered by the constitutional amendment of 1885 to supply gas to the inhabitants of the city of Los Angeles: "The company, by its investment, had irrevocably committed itself to the understanding and its acceptance of the offer of the right to lay its pipes, so far as necessary to serve the municipality, was complete."
In a comparatively recent work — Wyman on Public Service Corporations — the author says (vol. 1, sec. 797): "In most of the public employments of the modern type what is undertaken is not merely the devoting of particular equipment to public use but rather the rendering of a certain service to the community with which it professes to deal. . . . All this is particularly true of the municipal services — such as waterworks, gas plants, electric plants, and telephone systems. . . . Such companies are held to undertake the service of their communities; and they must, to speak in general, be prepared to extend this system throughout their district to meet the reasonable demands of the growing community. If this involves the acquisition of new sources of supply, or a laying of pipes in new streets, or extension of wires to other streets or the construction of new exchanges, all these new *Page 330 facilities must be provided to meet the expansion of the business within the community to the service of which the company has committed itself. But it is true of such supply as it is of other public service that the duty to give adequate service to those to whom it owes this primary duty is relative, not absolute. The service company will be held to the exercise of due foresight in anticipating the progress of the demand for its supply accompanying the growth of the community." Elsewhere in discussing this same subject the same author declares (sec. 281): "It is obvious that the problems raised in this topic have not been disposed of as yet. It is plain that the existing facilities must in many instances be further developed in readiness to give service to those beyond the present lines, since what has really been undertaken is the proper service of the whole community dependent upon the established company. This at least involves the well-settled central territory within which service is plainly demanded, whether mains have been laid in all the streets or not. Certainly all premises situated within the network of the existing mains and within convenient connecting distance of their lines should be served. All of these premises come within the sphere of influence, already established, differing slightly from premises abutting. But the law will soon require, if it does not already, that the existing mains must be gradually extended as the growth of population in the community which the corporation has undertaken to serve demands the expansion." (See, also, 2 Morawetz on Corporations, sec. 1129; Haugen v. Albina Light Water Co., 21 Or. 411, [14 L.R.A. 424, 28 P. 244]; PocatelloWater Company v. Standley, 7 Idaho, 155, [61 P. 518].)
In the case of Bothwell v. Consumers' Co., 13 Idaho, 568, [24 L.R.A. (N.S.) 485, 92 P. 533], the action was brought to compel the water company to attach its mains and connect with the water-pipe of the plaintiff on the line of his property. The court reversing a judgment entered on an order sustaining a demurrer to the complaint, in the course of its opinion said as to the extent of the implied obligation of a water company under a franchise similar in terms to that of respondent here: "The franchise for laying pipes in the streets and alleys, and maintaining and operating a water system, is granted by the municipality to the water company. The property owner has no right or franchise to dig in the *Page 331 streets or alleys and lay pipes, and if he should do so he would acquire no property right therein. The mains and all laterals, fixtures and connections within the franchise limits, belong to the water company, and all together constitute the water system. It is not the business of the citizen or consumer to construct any part of the company's system. . . . The company, in the enjoyment of its franchise privilege, is placed by the constitution under a public duty to supply water to all living within the franchise limits, on payment of the rental rates. It owes this duty to every one so long as it has water to sell, whether it be on the line of its main or at a great distance therefrom."
In addition to these cases which deal with or discuss the duty of a public service corporation to reasonably extend its service to meet the necessary wants of a community which under its franchise it has undertaken generally to serve, we are cited by counsel for petitioners to a number of cases, all of which involved directly the refusal of a water company to make service connections for the benefit of property owners whose property abutted upon streets through which the supply mains of the company were already laid and which sustain the right to have the service connections made. Counsel for respondent contends that these cases are distinguishable in principle from the case at bar. But the only difference we perceive is that the petitioners here do not reside directly on the streets through which the respondent has laid its mains. It is true that in none of the cases cited was there the question involved, nor do they declare anything as to the duty of a water company organized and chartered for the purpose of supplying all the inhabitants of a community with water to reasonably extend its mains so that all residing therein may be served. But in our judgment there is no difference in the principle applied in the cited cases and that which governs in the case at bar, which is, that where a public service water company has obligated itself under its franchise to supply the inhabitants of a community with water and has the water with which to do so, it is under legal compulsion to discharge its assumed obligations on a reasonable demand. In the cited cases the water company had actually extended its mains along the streets of a city to a point where the water supply was accessible to the property owners fronting on the mains and in the discharge of its franchise obligation was compelled *Page 332 to give them water service connections as inhabitants of the community it has undertaken to serve. In the case at bar the respondent company having under the terms of its franchise undertaken to furnish water to the inhabitants of the city and county of San Francisco of whom petitioners are a part, and having a water supply more than sufficient for that purpose which by a reasonable extension of its mains may be served to petitioners is equally legally required to make the extension in discharge of its franchise obligation.
We are of the opinion therefore for the reasons given and under the authorities we have referred to that when the respondent accepted the franchise offered by the state and undertook to supply the municipality of San Francisco and its inhabitants with water, it assumed a public duty to be discharged for the public benefit: a community service commensurate with the offer of the franchise which involved the duty of providing a service system which would be reasonably adequate to meet the wants of the municipality not only at the time it began its service but likewise to keep pace with the growth of the municipality, and to gradually extend its system as the reasonable wants of the growing community might require, and as it appears from the petition in this case that respondent is in a position to discharge this duty toward petitioners by a reasonable extension of its mains it should have done so on their demand and having refused may be compelled to do it.
In reaching this conclusion it is of course to be borne in mind that the right of an inhabitant of the municipality or the inhabitants of a particular portion of it to compel the service to them by the water company through the extension of its system, is not an absolute and unqualified right. The fact that the water company has undertaken to serve the entire municipality and that it would be of advantage to an inhabitant thereof, or a number of them, to have the water system extended to supply them would not of itself be sufficient to require or compel the company to make the extension. The duty which the water company has undertaken is of a public nature and to meet a public necessity for the supplying of water to the community. The obligation of the company is not to supply each or any number of inhabitants of the municipality on demand as an absolute right on their part but it has only assumed and become charged with the public duty *Page 333 of furnishing it where there is a reasonable demand for it and a reasonable extension of the service can be made to meet the demand. The right to require the service and the duty of furnishing it by an extension of the water system is to be determined from a consideration of the reasonableness of the demand therefor. It would hardly be claimed that the obligation of a water company exercising a public service franchise would require it on the demand of an inhabitant of the city, or even a number of them, residing at a long distance from a point in the city to which its mains are already extended, to further excavate the streets of the municipality at its own expense and extend its mains to them, where the rates to be charged for the water to be delivered would but to a slight extent compensate the company for the expenditures entailed in doing so — in fact, without any certainty that there would be a continuous consumption of water or a continuous payment of rates even after it was brought to them. On the other hand, where the extension of an existing main if made only for a few feet would supply the water service, the demand for making such an extension would obviously be a reasonable one as the rates to be charged would ordinarily compensate for the expenditure made by the company. Between these particular cases suggested there is a wide field for the play of the rule of reasonableness of demand for service and whether it does or does not exist must be determined by a court as a fact in each particular case where it is sought to compel an extension of service. Of course, the matter of expenditure to be entailed by the public service company in extending its service is not a controlling feature in determining the reasonableness of a demand for it because the water rates established as a whole between the public service corporation and the city by the public body to which that duty is committed must be sufficient to yield a fair, just, and reasonable income on the property of the company devoted to public use which would include such necessary expenditures. But additional expenditure by the company or an additional burden on the water rate payers as a whole should not be imposed for the benefit of a particular portion of the community unless a reasonable necessity for it exists. Whether it does or not is to be determined by a consideration of the facts in each particular case and, among other things, by a consideration of the duties of the company, the rights of its *Page 334 stockholders, the supply of water which the company may control for distribution, the facilities for making extensions to a locality beyond its present point of service, the rights of existing customers, the wants and necessities of the locality demanding it, and how far the right of the community as a whole may be affected by the demanded extension. We refer to this matter of reasonableness of demand to be considered in determining the right to require the extension of service on account of the general language used in the authorities cited in sustaining the implied obligation of a public service corporation under its charter to supply all the inhabitants of a municipality with water. While this is the obligation it undertakes, the right of the inhabitants of the municipality to have it discharged is, as we have said, not an absolute but a relative one which may be enforced only when conditions are such that there exists a reasonable demand for the fulfillment of the obligation. In the case at bar the facts charged in the petition show that there is such a reasonable demand for such an extension and as there is a liability on the respondent under such circumstances to comply with it, it may be compelled to do so.
The special point is made by respondent, for the first time in this case in a supplemental brief filed by it on the hearing in this court, that the petitioners, as private individuals, may not maintain this action in mandamus; that the primary right to compel respondent to extend its mains (if it exists anywhere, which respondent does not admit), rests with either the board of supervisors of the city and county of San Francisco or with the state railroad commission, and that one or the other of these bodies can alone invoke by mandamus the aid of this court to compel the extension of existing mains in compliance with the order of either requiring respondent to do so. Hence, respondent asserts that the demurrer was properly sustained by the superior court because the amended petition itself does not show a cause of action which the petitioners could assert. Counsel do not point out in which of the public bodies referred to the alleged primary or exclusive right to compel the extension of its mains is vested. It asserts after simply quoting provisions of the charter of the city and county of San Francisco, general provisions of the constitution and the special constitutional provision respecting the powers of the state railroad commission, that the right *Page 335 of compulsion exists in either the one or the other of these public bodies to the exclusion of any right in these petitioners to maintain this action.
We perceive nothing in the charter provisions nor the constitutional provision respecting the power of the board of supervisors or the state railroad commission which confers upon either of these public bodies primary and exclusive right to initiate proceedings compelling respondent to extend its water system to meet the present wants of particular inhabitants of the municipality, or anything which precludes the inhabitants of a city, or any portion thereof, which a public service corporation exercising such a franchise has obligated itself to serve with water, from applying directly to the courts to enforce the obligation to them which the corporation has undertaken to discharge. It may be assumed in the same general way that respondent asserts it (though we decline to express any opinion on the subject) that one or the other of the public bodies referred to also has the power to compel the respondent as a public service corporation to discharge the public duty assumed under its franchise to meet the public wants and necessities as they arise in the municipality. But the legislation under which these bodies are created does not pretend to interfere with the personal right of the inhabitant of a city to invoke the aid of the court to compel the respondent to enforce toward him the obligation which it has assumed for his personal benefit. It is not pretended that mandamus as invoked here is not the proper remedy if the petitioners have a remedy. The only insistence is that it is not available to them because, as asserted, the relief which they ask can only be afforded them through the medium of the public bodies referred to. But as no primary or exclusive control of this subject is vested in these bodies, the right of the petitioners to compel the discharge of its duty to them by respondent cannot be doubted. The franchise of 1858 accepted by respondent constituted, as we have said, a contract between it and the state under which the respondent undertook a public use of which the inhabitants of the city of San Francisco are the beneficiaries. The right of such inhabitants as beneficiaries of such public use was created under the franchise so accepted and the duty was then assumed by respondent of furnishing and supplying water for their personal use as their reasonable demands for it might arise. *Page 336 The right which this acceptance legally secured to each inhabitant of the municipality was in the nature of a public right accruing to him from his status as a person of the class for whose benefit the respondent obligated itself to furnish a water supply. The right was extended to and the obligation of the respondent included each and every person who might become an inhabitant of the municipality while respondent was exercising the public use that it had assumed. By such acceptance a clear and perfect legal right was created in favor of the inhabitants of the municipality to compel a water service to them and impose the clear and legal obligation upon the respondent to do so. Under such circumstances when the right and the public duty are clear mandamus is the proper remedy. (Price v. Riverside L. I.Co., 56 Cal. 431; Hildreth v. Montecito Creek Water Co., 139 Cal. 22, [72 P. 395]; Fellows v. Los Angeles, 151 Cal. 52, [90 P. 137]; South Pasadena v. Pasadena Land etc. Co., 152 Cal. 579, [93 P. 490].)
The judgment appealed from is reversed.
Melvin, J., Shaw, J., Sloss, J., Henshaw, J., and Angellotti, C.J., concurred.