This original proceeding in mandamus was brought by relator, the St. Joseph Water Company, a corporation owning and operating a waterworks system at the city of St. Joseph, this State,, against the board of managers of State Hospital Number 2, located within the corporate limits of said city. Relator claims a balance due, for water supplied to said hospital, in the sum of $2186.33, which respondents refuse to pay, and the purpose of this suit is to coerce the payment of such claim by the writ of this court, commanding the respondents to comply with the statutory provisions in the .allowance and payment of valid claims against institutions of that class.
Upon the filing of the petition an alternative writ was issued and in due time respondents made return thereto. Relator filed a general demurrer to the re*81turn, and the canse is thus at issue.
The facts are not in dispute, and so far as material in the view we take, they are as follows:
In the year 1900 relator was granted a franchise by the pity of St. Joseph, authorizing* it to construct and operate a waterworks system in said city for a term of twenty years. A contract, by ordinance duly enacted by the city and accepted by relator, was entered into, by the terms • of which relator agreed to supply the city and the inhabitants thereof with water,- at the rates therein prescribed, during the term of said franchise. The rate for water, used in such quantity as is admitted was used by the hospital, was six cents per 1000 gallons. Sections 3, 7 and 9 of said ordinance and contract are as follows:
“Sec. 3. Said water company shall extend its mains and pipe lines within the limits of said city along and over its streets, highways and public lands, as the city may from time to time by ordinance direct, and shall for each five hundred feet of said extension or fraction thereof erect and maintain a fire hydrant at such points as may be directed by ordinance or by the city engineer, and of the kind and character prescribed by ordinance; said city hereby agrees to and does rent from said company all hydrants so erected and maintained, and agrees to pay for each hydrant so erected and maintained the sum of forty dollars per annum; said water company shall erect and maintain intermediate hydrants when directed by the city, and shall be paid by the city the actual cost of such hydrants and the cost of setting the same, but shall be entitled to no compensation for the use thereof.
“Sec. 7. It shall be the duty of said water company during the term of this contract to supply good, clear, healthful and wholesome water for private consumption by the inhabitants of the city, and the rates to be charged private consumers of water during the *82continuance of this contract shall he those named in section 10 of Special Ordinance No. 2295, approved by the mayor of said city of St. Joseph on the 27th day of January, 1899, provided that it shall be the duty of said city from time to time to raise or lower such rates when the same shall be unreasonable.
“Sec. 9. Water shall be furnished to all private consumers at the same rates, and no partiality or inequality in rates shall be permitted.”
In the year 1905> when the said State Hospital was situated a short distance outside the corporate limits of. the city of St. Joseph, relator entered into a contract with the board of managers thereof, under which relator agreed to supply the hospital with water, for the ensuing term of ten years, and the board of managers agreed to pay therefor at the rate of ten cents per 1000 gallons. Water was furnished by rela-tors under this contract, and was used and paid for by the hospital until the first day of July, 1910;, being about one-half of the full term covered by the contract. After the date last mentioned, and until the filing of this suit, relator continued to furnish water to said hospital, but respondents have refused to pay therefor in excess of the rate of six cents per 1000 gallons, the rate as fixed in the contract between relator and the city.
In the year 1909 the corporate limits of the city of St. Joseph were extended so that the territory upon which said hospital was located was included in and became a part of said city.
Among other defenses to the issuance of the writ, respondents contend that by reason of the extension of the city limits the contract of 1905 between relator and the board of managers was. abrogated and that the hospital was not bound to pay for water furnished more than the public rate of six cents per 1000 gallons. Respondents have paid relator for the water used at the public rate, but deny liability under the contract of *831905. Relator contends that it is entitled to be paid at the rate of ten cents per 1000 gallons, in accordance with the contract of 1905, and the controversy is as to which of the two contracts shall control in determining the rights of the parties in the premises. If, at the time of instituting this proceeding, the contract of 1905 was in force, then the balance claimed by relator was due and it is entitled to the relief prayed for. On the other hand, if the extension of the city limits so as to include the hospital had the legal effect of limiting relator’s charges to the rate provided by the ordinance, then the writ should be denied.
I. The business of supplying the public with water, like that of supplying gas, electricity and other similar services, is a'business impressed with a public use. This proposition is so well recognized that it is needless to cite authorities in its support. It is equally well-settled law that the fixing of rates for such a service is a governmental power.
In the absence of legislative action prescribing such rates, private parties may fix them by contract, and the rates so agreed upon will be upheld. However, rates so fixed by private contract remain in force only so long as the legislative body having authority in the premises refrains from the exercise of its powers. When public rates are established by law, rates fixed by private contract must yield. The law upon this subject is stated in 3 Thompson on Corporations (2 Ed.), Sec. 2953, as follows:
“Until the Legislature or other body having the right to prescribe the rates to be charged by corporations, whose business is affected with a public interest, has exercised this power, the rates are the subject of contract between the corporation and its patrons. And this is the case where the Constitution makes it the duty of the Legislature to prescribe reasonable maximum rates but the Legislature has failed *84to do so. Since, however, the franchise is tahen subject to regulation by the State in the exercise of its police power, the conclusion seems a sound one that the corporation cannot enter into a binding contract with a patron extending beyond the time when the Legislature or municipal council duly empowered thereto may fix the rate's. It is plain that a public service corporation able to forestall legislative action by contract for a limited time could do so for so long a time as to render futile any legislative control.”
The city of St. Joseph, in the exercise of delegated legislative power, had prescribed by ordinance the rates to be charged by relator for water furnished to consumers under its franchise and contract with the city, and that “water shall be furnished to all private consumers at the same rates, and no partiality or inequality in the rates shall be permitted.”
When the boundaries of a municipality are extended, all ordinances and contracts of a general character, in the absence of a special provision to the contrary, are simultaneously extended over and become operative in the added territory, and such territory becomes subject to the same burdens and entitled to the same privileges as that within the original limits. [St. Louis Gaslight Co. v. City of St. Louis, 46 Mo. 121; 28 Cyc. 217; 3 Dillon on Municipal Corporations (5 Ed.), Sec. 1325; Thornton on The Law Relating to Oil and Gas (2 Ed.), Secs. 405 and 419; Des Moines v. Waterworks Co., 95 Iowa, 348; Mayor, etc., of City of Birmingham v. Birmingham Water Co., 42 So. (Ala.) 10; Indiana Ry. Co. v. Hoffman, 161 Ind. 593; People v. Detroit United Ry., 162 Mich. 460.]
In the St. Louis Gaslight case, supra, a case frequently cited in the textbooks and in the decisions of courts of other States, it appears that the gas company refused to comply with its contract with the city in territory annexed to the city after the contract was entered into. Discussing that question (p. 133), this court *85said: “Tiie additional orders for lamps were all to be within the city, and the city is a unit, though with changing boundaries. There might be a question as to the extension of the exclusive rights of the plaintiff, for grants of monopolies are to be strictly construed; but there is no doubt that a city ordinance or a city contract, designed for the city at large, operates throughout its boundaries whatever their change.”
The foregoing authorities hold that when a general ordinance, fixing rates for a public service corporation, is in force in a city, such rates will apply to annexed territory, though a different rate, fixed by private contract, was in force in such territory before it was annexed. The case of Indiana Ry. Co. v. Hoffman, supra, declares the law in accordance with this rule, which is well stated in the second syllabus as follows:
“A street railroad company operating under an agreement with the city to issue transfer tickets free of charge to all passengers requesting the same who boarded its cars at any point upon its line within the limits of the city and whose destination might be any point upon any other line of the company within the city limits is bound to carry a passenger, tendering a transfer, to his destination on the company’s line, though his destination was at a point in territory annexed to the city after the contract between the city and company was made, and on the company’s interurban line on which it had a franchise entitling it to charge an additional fare outside the city as its limits were before the annexation of territory.”
The principle upon which the cases hold that the legislative rate will supersede the rate previously fixed by private contract is that the parties enter into the contract in contemplation of the superior right of the government to establish such rates, and with knowledge that “private compacts cannot derogate from public right.” [Thompson, supra, Sec. 2954.]
*86It follows that the contract of 1905* between relator and the board of managers was abrogated by the annexation to the city of the territory npon which the hospital was situated, and that the rate as fixed by. the ordinance must determine the price to be paid for water thereafter nsed by the hospital, unless a different result must be arrived at by reason of relator’s contention next to be considered.
II. It is contended by relator that, as the main through which the water was furnished to the hospital was not laid by direction of the city, with hydrants at. intervals of 500 feet, for which the city was obligated to pay relator an annual rental, as provided by section 3 of the ordinance, therefore relator would not-be governed by the ordinance rate for the water thus furnished.
Section 3 of the ordinance requires the laying of mains and the placing of hydrants by relator under the direction of the city. The requirement as to hydrants,, for which a rental is to be paid to relator by the city,, is doubtless for the protection of the public against fire, and when so directed to extend its mains then the question as to the hydrant requirement might properly be raised by relator. However, if relator should voluntarily lay a pipe or main without being directed so to do by ordinance, or use a main laid before the limits were extended, as under the facts of this case, it could not be successfully maintained that by so doing relator would be exempt from the ordinance rate for the reason that the hydrant requirement had not been complied with. Whether compulsory service within the city can be enforced against the public service corporation, by the consumer, regardless of the cost of installing mains, is a mooted question. [1 Wyman on Public Service Corporations, Sec. 278, et seq.] But if, with the consent of the consumer, it should see fit to render the service, then it must be done under the or-*87dinan.ce -winch, requires that “water shall be furnished to all private consumers at the same rates.”
III. Other defenses are made in respondents’ return, namely: (1) That the contract of 1905 was invalid for want of capacity of the hoard of managers to make it, and (2) that relator had failed to furnish water to the hospital in accordance with the terms of the contract. As we decide the case in favor of'respondents upon another ground, it is unnecessary to pass upon those defenses.
The alternative writ is quashed and the peremptory writ denied.
Valliant, G. J., Lamm and Brown, JJ., concur; 'Woodson, J., concurs in a separate opinion; Graves, J., dissents in an opinion in which Fer-riss, J., concurs.