
951 S.W.2d 743 (1997)
PUBLIC WATER SUPPLY DISTRICT NO. 16, Appellant,
v.
CITY OF BUCKNER, Respondent.
No. WD 53493.
Missouri Court of Appeals, Western District.
September 23, 1997.
*744 Douglas J. Patterson, Leawood, KS, for Appellant.
Tammy Etem, Kansas City, for Respondent.
SPINDEN, Judge.
When Buckner annexed and rezoned a tract in 1994 which Public Water Supply District No 16 had planned to serve, the district sued, asking the circuit court to enjoin Buckner from extending the city's water service into the area without first complying with the requirements of § 247.170.[1] The circuit court dismissed the district's lawsuit on the ground that it did not state a cause of action for which relief can be granted. We reverse and remand.
The annexed land was not developed, and the district did not have any water mains or easements in the tract. The district did have a main contiguous to the tract. Buckner platted and rezoned the tract for single family dwellings and other development.
Buckner moved to dismiss the district's petition. In the alternative, the city asked for summary judgment. In support of its motion, Buckner asserted that it had a right to supply water to its citizens without regard *745 to the district's authority, that it had no obligation to "detach" the annexed area pursuant to the requirements of § 247.170 because the district did not provide water service to that area before annexation, and that the district was not entitled to injunctive relief because of the public interest involved and because the petition did not plead that the district would suffer irreparable harm. The circuit court apparently agreed and dismissed the district's petition. We reverse.
In ruling for Buckner, the circuit court said that it "dismissed for failure to state a claim upon which relief can be granted." Rule 55.27(a) says:
If, on a motion asserting the defense ... to dismiss for failure of the pleading to state a claim upon which relief can be granted, matters outside the pleadings are presented to and not excluded by the court, the motion shall be treated as one for summary judgment and disposed of as provided in Rule 74.04, and all parties shall be given reasonable opportunity to present all material made pertinent to such a motion by Rule 74.04.
Because the circuit court considered extraneous matters in deciding on the motion, we treat it as a summary judgment. The parties did not object to the circuit court's considering extraneous matters and agree that we should treat the circuit court's order as a grant of summary judgment.
Chapter 247 governs public water supply districts. When a city annexes part of a water district's service area, § 247.160.1 permits the district to contract with the city for water service to the annexed area, or to lease, sell, or convey any of its water mains, plant or equipment to the city. "The primary purpose of § 247.160 is to enable the District to transfer to the City the water distribution facilities in the annexed area under circumstances that will protect the rights of the holders of bonds of the Water District." State ex rel. Stern Brothers and Company v. Stilley, 337 S.W.2d 934, 938 (Mo.1960). If the city and the water district do not reach an agreement, § 247.170 provides for detachment of the annexed area from the water district under the circuit court's supervision.
Buckner argues that the statute is permissive, not mandatorythat compliance with the statutory procedures is optional in cases where the water district does not serve customers and owns no lines or equipment in the annexed area. We disagree. Were the provisions of § 247.170 optional, the annexing city could involuntarily acquire a water district's rights to revenuewhether fees acquired through services currently provided to the acquired area or tax revenues based on the valuation of the propertyto the detriment of the water district's other customers or water district bondholders.[2] The statute does not restrict its scope to areas having persons being served by a water district. The statute mandates consideration of annexation's effect on the entire water district. This is manifested in the statute's requirement of an approving vote of the entire water district and of supervision by the circuit court of money payments to protect the interests of the water district bondholders. The General Assembly intended to allow a city to acquire water supply rights to a tract in a district's territory, but it obligated the city to obey the procedures for acquiring those rights set out in § 247.170.
Buckner contends that any interference with its ability to provide water to its citizens violates its municipal grant of authority by the legislature. We do not dispute Buckner's authority to provide water to its citizens.[3]*746 Buckner claims, however, that it has the exclusive right to provide water service to its citizens in the disputed area and directs our attention to Mathison v. Public Water Supply District No. 2 of Jackson County, 401 S.W.2d 424 (Mo.1966).
In Mathison, Raytown annexed property which was in a water district, and property owners in the annexed area initiated a detachment action pursuant to § 247.170 against the water district in an attempt to gain service by the Raytown city water company. Id. at 425-26. The water district contended that it, and not the city, had prior exclusive rights to serve the area. The Supreme Court said that "the legislature intended that as between a Water District organized under Chapter 247 and a city owning a waterworks, the city should have the exclusive right." Id. at 430. The court further said that the General Assembly intended that water districts serve only those areas not otherwise served by water:
Otherwise the legislature would not have by implication in § 247.030 excluded from the initial territory of the district those cities having a water supply system; nor would the legislature have provided a method (§ 247.170) whereby the city could, as it grew, acquire the assets of a district lying within an area annexed by the city, without the consent or agreement of the district.
Id. at 431.
Mathison does not aid Buckner. That case involved a detachment action under § 247.170, and we do not interpret Mathison as deciding that a city can proceed at will without heeding the General Assembly's mandate in Chapter 247.
Because Buckner did not negate the water district's general claim that it was required to proceed under § 247.170, and because the district presented evidence of outstanding revenue bonds whose existence represented bondholders whose interest could be impaired in not following the procedures of § 247.170, we find that summary judgment was improper. ITT Commercial Finance Corporation v. Mid-America Marine Supply Corporation, 854 S.W.2d 371, 380-82 (Mo. banc 1993).[4] We, therefore, reverse and remand the case to the circuit court for further proceedings.
BERREY, P.J., and SMART, J., concur.
NOTES
[1]  All statutory citations refer to the 1994 Revised Statutes of Missouri. This statute says, "Whenever any city owning a waterworks or water supply system extends its corporate limits to include any part of the area in a public water supply district, and the city and the board of directors of the district are unable to agree upon a service, lease or sale agreement, or are unable to proceed under section 247.160, then upon the expiration of ninety days after the effective date of the extension of the city limits, that part of the area of the district included within the corporate limits of the city may be detached and excluded from the district in the ... manner [prescribed by the statute]."
[2]  In Jackson County Pub. Water Supply Dist. No. 1 v. Ong Aircraft Corp., 409 S.W.2d 226 (Mo.App. 1966), cert. denied, 387 U.S. 919, 87 S.Ct. 2033, 18 L.Ed.2d 973 (1967), the court considered whether or not a city had exclusive rights to supply water to an entire subdivision which was partly within a city's limits and partly within a public water supply district. In considering whether or not irreparable harm would be caused to the water district, the court noted that the disputed tract was not being annexed by the city; therefore, allowing city service would result in no loss of revenue from general taxes to the water district. In our case, such a loss would result.
[3]  Section 91.450 says, "Any city of the third or fourth class, and any town or village, and any city now organized or which may hereafter be organized and having a special charter, ... shall have power to erect or to acquire, by purchase or otherwise, maintain and operate, waterworks ... which are hereby declared public utilities[.]"
[4]  Because we reverse the summary judgment on this first issue, we need not consider the remaining issues raised by the district.
