
243 Kan. 315 (1988)
757 P.2d 272
L. FRANK DOUGAN, ROBERT MOHLER, LAWRENCE MOHLER, and RAYMOND MOHLER, Appellees,
v.
ROSSVILLE DRAINAGE DISTRICT, Appellant.
No. 61,600
Supreme Court of Kansas.
Opinion filed June 3, 1988.
Richard F. Hayse, of Eidson, Lewis, Porter & Haynes, of Topeka, argued the cause and was on the briefs for appellant.
J. Roger Hendrix, of Marshall, Davis, Hendrix & Schenk, of Topeka, argued the cause and was on the brief for appellees.
The opinion of the court was delivered by
PRAGER, C.J.:
This is an action brought by the plaintiffs, L. Frank Dougan and his farm tenants, the Mohlers, to recover from defendant Rossville Drainage District for damage to cropland and loss of crops caused by flooding. Plaintiffs claim that the flooding was the result of acts of the defendant which caused a diversion of natural waters through the construction of dikes and embankments and the widening of a drainage ditch.
The defendant filed a motion to dismiss the petition on the basis that the Rossville Drainage District was immune from liability under the Kansas Tort Claims Act (K.S.A. 75-6101 et *316 seq.) for any damages caused by the flooding of the Dougan property. The district court denied the motion, but found that the issue of immunity was controlling and certified the question for an interlocutory appeal. The case was then appealed and transferred to the Supreme Court.
The sole issue presented on the appeal is whether the discretionary function exception under K.S.A. 75-6104(d) provides immunity to the drainage district for damages caused by the flooding of the plaintiffs' property.
The plaintiffs' petition was as follows:
"1. Plaintiff, L. Frank Dougan, is the owner of certain real estate located in Shawnee County, Kansas, located just south of the city of Silver Lake, Kansas.
"2. Plaintiffs, Robert Mohler, Lawrence Mohler and Raymond Mohler, are the tenants for agricultural purposes on the property owned by Plaintiff, L. Frank Dougan.
"3. Defendant, Rossville Drainage District, is a duly organized Drainage District under the laws of the State of Kansas and is located in Shawnee County, Kansas....
"4. Defendant, Rossville Drainage District, has the authority and control over and the legal responsibility and obligation of the Rossville Drainage District, including the drainage ditch and channel which runs in a generally southeasterly direction from Rossville, Kansas to Silver Lake, terminating at a point on the west side of the property owned and farmed by the Plaintiffs.
"5. The drainage ditch or channel owned and operated by Defendant, Rossville Drainage District, collects the surface water drainage of an area between Rossville and Silver Lake, Kansas, and discharges such surface water drainage into Silver Lake, which is a natural water course. The land owned and farmed by the Plaintiffs is located immediately adjacent to Silver Lake, and neither the land owned and farmed by the Plaintiffs nor Silver Lake, is part of the Defendants' Drainage District.
"6. In the construction, operation and control of its drainage district, the Defendant has and does divert the natural flow of surface water drainage into its ditch or channel, thereby increasing the volume and flow of water that is deposited into the natural water course and, at times, exceeds the carrying capacity of the natural water course causing an overflow onto Plaintiffs' property.
"7. In June of 1982, Plaintiffs' property was inundated by water from the Defendants' drainage ditch or channel, causing damages of serious and sensible nature to the interests of the Plaintiffs.
"8. The proximate cause of the damages of the Plaintiffs were the acts of the Defendant in gathering and diverting surface water from its natural water course, thereby exceeding the carrying capacity of the natural water course adjacent to the Plaintiffs' property. Such excess volume of water overflowed the Plaintiffs' property causing damage to the growing crops.

*317 "WHEREFORE, Plaintiffs pray for judgment against the above named Defendant for an amount in excess of Ten Thousand Dollars ($10,000.00)...."
Most of the facts in the case are undisputed, although there is a serious factual issue as to the cause of the flooding of plaintiffs' property. Plaintiff Dougan owns a 640-acre plot of land just south of Silver Lake. A diagram of the Dougan property can be found as a part of the opinion in the case of Dougan v. Shawnee County Comm'rs, 141 Kan. 554, 557, 43 P.2d 223 (1935). The land was flooded in June 1982, following a period of heavy rain. A levee washed out at the northwest corner of the Dougan farm, inundating the land. Dougan's crops were under water for three days. He lost his crops and incurred costs of replanting his land and repairing the dike. The Rossville Drainage District is responsible for collecting and draining surface water from approximately 7,000 acres of land between Rossville and Silver Lake. The water is carried east towards Silver Lake, where the district's territory ends.
The levee which failed here was designed and constructed at a right angle by the district. While the levee can handle a normal flow of water, excess loads may cause the levee to fail. Failure occurred in 1967, 1973, and 1982. Both the district and Dougan have repaired the levee in the past but neither has changed the design. Following the 1973 flood, Dougan sued the district for the damage incurred. Dougan v. Rossville Drainage District, 2 Kan. App.2d 125, 575 P.2d 1316, rev. denied 225 Kan. 843 (1978). In that opinion, the facts setting forth the location of the Dougan land with respect to the drainage ditch are stated in some detail.
In 1979, the Kansas Tort Claims Act was enacted. The district now claims immunity under the act for any damages incurred in 1982, and based its motion to dismiss on that theory. Due to the nature of this action, the evidentiary record in the case has not been fully developed. Each side submitted to the court a report from its own expert. The plaintiff's expert concluded that "97% of the June 1982 floodwater which accumulated in the lake and on adjacent lands was conveyed to the site by the Rossville Drain. More than three-quarters of this water came from the overflowing Cross Creek."
The defendant's expert concluded otherwise. His report stated: "Our review indicates that the construction and/or *318 operation of the Rossville Drain has little impact on the flooding in the area of Silver Lake.... Although failure of the levee may affect flooding during smaller flows, when the water is 4 feet above the top of the levee, such details as alignment, design, construction and maintenance have no relationship to flooding." Thus, causation is the important fact issue if the case goes to trial.
Because the matter is before this court on a motion to dismiss, it would be helpful at the outset to note the scope of review in such cases:
"`The question for determination is whether in the light most favorable to plaintiff, and with every doubt resolved in plaintiff's favor, the petition states any valid claim for relief. Dismissal is justified only when the allegations of the petition clearly demonstrate plaintiff does not have a claim.'" Robertson v. City of Topeka, 231 Kan. 358, 359, 644 P.2d 458 (1982)."
The Kansas Tort Claims Act is considered an open-ended act, meaning that liability is the rule and immunity the exception. See K.S.A. 75-6103(a) and Jackson v. City of Kansas City, 235 Kan. 278, 286, 680 P.2d 877 (1984).
K.S.A. 75-6103(a) provides:
"(a) Subject to the limitations of this act, each governmental entity shall be liable for damages caused by the negligent or wrongful act or omission of any of its employees while acting within the scope of their employment under circumstances where the governmental entity, if a private person, would be liable under the laws of this state."
In K.S.A. 75-6102, the term "governmental entity" is defined to include a municipality, or any county, township, city, school district, or other political or taxing subdivision of the state or any agency, authority, institution, or other instrumentality thereof. The parties agree that the Rossville Drainage District is a governmental entity. It is a public corporation which was first organized in 1905. Traditionally, such districts have been considered governmental entities. State, ex rel., v. Kaw Valley Drainage District, 126 Kan. 43, 47, 267 Pac. 31 (1928), and Jefferson County v. Drainage District, 97 Kan. 302, 303, 155 Pac. 54 (1916).
The statutes governing drainage districts grant specific powers to tax, to issue bonds, and to contract. K.S.A. 24-108; K.S.A. 24-111; and K.S.A. 24-134. These powers, usually considered governmental in nature, support the finding that the district is a governmental entity for purposes of the Kansas Tort Claims Act.
*319 It is clear that defendant Rossville Drainage District, if a private person, would be liable under the law of Kansas for damages caused by flooding of land of a lower riparian landowner. This was the holding in Dougan v. Rossville Drainage District, 2 Kan. App.2d 125, Syl. ¶¶ 1, 2, and 3. Kansas has adopted the rule of law that an upper proprietor of land may not gather and divert surface water from its natural course of flowage and thereby exceed the carrying capacity of the natural watercourse in which the surface water is deposited if that action causes damages of a serious and significant nature to a lower landowner.
The holding in Dougan was based on a long line of Kansas cases which began in 1897. In Parker v. City of Atchison, 58 Kan. 29, Syl. ¶ 1, 48 Pac. 631 (1897), the court stated:
"The owner of property on the bank of a water course has a right to build barriers and confine the waters to the channel of the stream; but he cannot build and maintain a structure which will change the channel or project the waters against or upon the property of others in such a way as will result in substantial injury to such property."
For other Kansas cases recognizing the same principle, see the following: Reeder v. Board of County Commissioners, 193 Kan. 182, 392 P.2d 888 (1964); Horn v. Seeger, 167 Kan. 532, 539, 207 P.2d 953 (1949); Goering v. Schrag, 167 Kan. 499, Syl., 207 P.2d 391 (1949); Clements v. Phoenix Utility Co., 119 Kan. 190, 237 Pac. 1062 (1925); Baldwin v. Ohio Township, 70 Kan. 102, 78 Pac. 424 (1904); DeWerff v. Schartz, 12 Kan. App.2d 553, 751 P.2d 1047 (1988).
A separate line of Kansas cases hold that the damming or alteration of natural water flow may be a nuisance. For example, in State, ex rel., v. Riverside Drainage District, 123 Kan. 46, 254 P.2d 366 (1927), the court quoted the trial court's conclusion of law:
"`While the Riverside Drainage District would not be responsible for injuries occasioned by the natural flow of surface water from the land in its district upon adjacent land, yet when it caused surface water to be accumulated upon land and caused the same to be cast in a volume upon the land of others outside of the district, it then created a nuisance.'" p. 52.
It was further stated:

*320 "`While the drainage act permits and authorizes the changing of the course of natural watercourses and the building of dams, dikes, embankments and ditches, it does not authorize the commission of a nuisance.'" p. 52.
See also Union Trust Company v. Cuppy, 26 Kan. 754, Syl. (1882), where the court stated, "[T]he damming, or partial damming, of Little Creek was in the nature of a nuisance." For more recent cases, see Henderson v. Talbott, 175 Kan. 615, 622, 266 P.2d 273 (1954), and Krantz v. City of Hutchinson, et al., 165 Kan. 449, 196 P.2d 277 (1948).
In addition to these Kansas cases, the duty of a landowner or a proprietor not to obstruct or collect and discharge surface water to the damage of adjacent owners or proprietors has been recognized by the legislature since 1911. K.S.A. 24-105 now provides in part:
"It shall be unlawful for a landowner or proprietor to construct or maintain a dam or levee which has the effect of obstructing or collecting and discharging with increased force and volume the flow of surface water to the damage of the adjacent owner or proprietor; but nothing herein shall be construed as preventing an owner of land from constructing a dike or levee along the bank of a natural watercourse to repel flood waters from such natural water course if plans therefore have been approved as required in K.S.A. 24-126, as amended: Provided, That the provisions of this section shall apply only to lands used for agricultural purposes and highways lying wholly outside the limits of any incorporated city ...."
Defendant, in its brief, relies upon Sester v. Belvue Drainage District, 162 Kan. 1, 173 P.2d 619 (1946), in support of its contention that a drainage district is historically immune from liability for damages caused by flooding or erosion. The reliance upon Sester is misplaced. In Prickett v. Belvue Drainage District, 159 Kan. 136, 152 P.2d 870 (1944), there was a claim of an unconstitutional taking of land by erosion. Plaintiff contended that the drainage district had allowed flood waters to flow into the channel at a greater capacity and, as a result, soil near the banks was washed away. The issue was whether the petition stated a cause of action based on the right of a property owner to recover for loss or damage to property due to enlargement of a drainage district. It was held that a demurrer to the plaintiff's petition was properly overruled. This court rejected the contention that a drainage district is not liable for loss or damage of adjoining property caused by flooding. In the first appeal in *321 Sester v. Belvue Drainage District, 159 Kan. 143, 152 P.2d 875 (1944), the court followed the holding in Prickett and sustained the trial court's overruling of a demurrer to Sester's petition.
In the later appeal, Sester v. Belvue Drainage District, 162 Kan. 1, the case came again before this court after the case had been tried to a jury which found that the flooding was not caused by any action of the employees of the drainage district and that there had not been a showing that any erosion to plaintiff's land was caused by the action of any water running through the land. Thus, in Sester the property owner did not recover because he could not prove that there was loss or damage caused by any action on the part of the drainage district. Sester does not preclude a finding of liability in this case.
As noted heretofore, defendant drainage district claims immunity based upon the discretionary function exception under the Kansas Tort Claims Act. At the time this case arose, K.S.A. 75-6104(d) provided:
"A governmental entity or an employee acting within the scope of the employee's employment shall not be liable for damages resulting from: ...
....
(d) any claim based upon the exercise or performance or the failure to exercise or perform a discretionary function or duty on the part of a governmental entity or employee, whether or not the discretion be abused...."
The discretionary function was based upon a similar provision in the Federal Tort Claims Act, 28 U.S.C. § 2671 et seq. (1982). While there is a good deal of case law on the discretionary function exception, no clear definition of "discretionary" is available. Black's Law Dictionary 419 (5th ed. 1979) defines "discretionary acts" as those acts wherein there is no hard and fast rule as to course of conduct that one must or must not take and, if there is a clearly defined rule, such would eliminate discretion.
Kansas case law has discussed the discretionary function on several occasions. In Beck v. Kansas Adult Authority, 241 Kan. 13, 735 P.2d 222 (1987), this court stated:
"We have discussed the discretionary function exception several times. In Robertson v. City of Topeka, 231 Kan. 358, 644 P.2d 458 (1982), the issue was whether police officers were exercising a discretionary function when they refused to remove a drunken trespasser from the owner's property. We rejected *322 the `planning level-operational level test,' and held that the determining factor was the nature and quality of the discretion exercised rather than the status of the employee. We held that the decision of the officers was an on-the-spot exercise of discretion, and thus plaintiffs' claim fell within the discretionary function exception.
"In Carpenter v. Johnson, 231 Kan. 783, 649 P.2d 400 (1982), we again held that whether an act is discretionary depends upon the totality of the circumstances. We held in that case that a placement of warning signs on a roadway was an exercise of professional judgment within established guidelines, rather than the exercise of discretion, and thus the discretionary function exception was not applicable. In Cansler v. State, 234 Kan. 554, 675 P.2d 57 (1984), we considered the plaintiff's claim for injuries resulting from the escape of armed and dangerous prisoners from the penitentiary. No warning was given to law enforcement officers in neighboring communities. We held that the duties to confine and to warn were imposed by law and were ministerial, not discretionary. The plaintiff's claim was not based on how the State decided to confine or warn, but the State's failure to do so. We held the claim was not barred by the discretionary function exception. In Jackson v. City of Kansas City, 235 Kan. 278, 680 P.2d 877 (1984), we considered an action arising upon a collision between two city fire trucks on an emergency run to the same fire. We found that the duty of the fire truck drivers is set forth in various statutes, regulations, and ordinances of the city. Disregard of those statutes, departmental policies, and regulations was not within the discretionary function exception. See Fudge v. City of Kansas City, 239 Kan. 369, 720 P.2d 1093 (1986); Finkbiner v. Clay County, 238 Kan. 856, 714 P.2d 1380 (1986); Hopkins v. State, 237 Kan. 601; Toumberlin v. Haas, 236 Kan. 138, 689 P.2d 808 (1984)." pp. 30-31.
Simply stated, our more recent cases hold that the discretionary function exception is not applicable in those situations where a legal duty exists, either by case law or by statute, which the governmental agency is required to follow. The governmental agency cannot properly claim that its challenged action falls within the discretionary function exception where the action taken violated a legal duty.
In Cansler v. State, 234 Kan. 554, 675 P.2d 57 (1984), Cansler was a police officer who sustained serious injuries when he was shot by prison escapees. Although not resting its decision on the discretionary function exception, the Cansler court stated that the Kansas Tort Claims Act provides no barrier to claims based upon acts or omissions which are ministerial and not discretionary. A ministerial act is the performance of some duty involving no discretion. Cook v. City of Topeka, 232 Kan. 334, 337, 654 P.2d 953 (1982).
In Hopkins v. State, 237 Kan. 601, 610, 702 P.2d 311 (1985), *323 the court defined discretion as the power and the privilege to act unhampered by legal rule. It also defined discretion as the capacity to distinguish between what is right and wrong, lawful and unlawful, or wise or foolish sufficiently to render one amenable and responsible for his acts. The court stated:
"Discretion implies the exercise of discriminating judgment within the bounds of reason. [Citation omitted.] It involves the choice of exercising of the will, of determination made between competing and sometimes conflicting considerations. Discretion imparts that a choice of action is determined, and action should be taken with reason and good conscience in the interest of protecting the rights of all parties and serving the ends of justice." p. 610.
The Hopkins court concluded, in substance, that the discretionary function exception is available only when no mandatory duty or guidelines existed. Absent guidelines, police officers are vested with the necessary discretionary authority to act in an appropriate manner to protect the public.
In the later Kansas cases, the court has relied upon the presence or absence of a legal duty in deciding whether the discretionary function exception was applicable. Beck v. Kansas Adult Authority, 241 Kan. at 30, 33-34; Allen v. Kansas Dept. of S.R.S., 240 Kan. 620, 731 P.2d 314 (1987); and Fudge v. City of Kansas City, 239 Kan. 369, 720 P.2d 1093 (1986). The language in Allen makes it clear that illegal acts are outside the scope of the discretionary function exception and that the negligent performance of a ministerial act is not within the exception.
Although the federal cases are not consistent and are hard to distinguish, the better reasoned cases make it clear that the discretionary function exception is applicable only if there is no clearly defined mandatory duty. In Barton v. United States, 609 F.2d 977, 979 (10th Cir.1979), the court stated:
"Concisely stated, the rule is that if a government official in performing his statutory duties must act without reliance upon a fixed or readily ascertainable standard, the decision he makes is discretionary and within the exception of the Tort Claims Act. Conversely, if there is a standard by which his action is measured, it is not within the exception. The statute provides that if the act of the official is discretionary it is not actionable even though the discretion is abused."
Barton was followed in Weiss v. United States, 787 F.2d 518, 523 (10th Cir.1986), where the court concluded, "[I]t is clear *324 that if a duty is not mandatory or not clearly specified then it is discretionary."
It is the position of the defendant drainage district in this case that its actions fall within the discretionary function exception and it has no liability where it diverts additional water into a natural watercourse and floods the land of an adjacent landowner because that is its statutory function. It maintains, in substance, that it owes a duty only to the landowners within the district, and it has no responsibility for flooding the land of adjoining landowners outside the district. This same argument was made back in 1927 in the case of State, ex rel., v. Riverside Drainage District, 123 Kan. 46. There, the district argued that when public officers act within the scope of the powers conferred upon them, there can be no judicial interference with their decision and judgment. The district argued that its officers had the statutory authority to change a natural waterflow with immunity from adjoining landowners, because they were acting within their discretion. This court rejected that argument. The court held that the officers of the drainage district were not acting within the scope of the power conferred on them when they put a dike across a natural watercourse, the result of which was to prevent the water which naturally flows along and through the watercourse from entering the drainage district, without making any provision, either by contract with landowners outside the drainage district or by condemnation, which would authorize them to prevent such waters from entering the drainage district. The drainage district had authority by statute to change a natural watercourse within the drainage district. But this court clearly held that the drainage district did not have the power to violate the rights of adjacent landowners and that such acts are not within the powers conferred upon them by statute. This court stated:
"[W]here one of the plans was authorized by law and the other was not, and the one not authorized was the one adopted, and that resulted in injury and damage both to public and to private rights and property, such action cannot be justified by a claim of the exercise of discretion." pp. 54-55.
Thus, the court held, in substance, that a drainage district cannot legally claim that it has a discretionary right to alter a natural flow of a watercourse so as to cause damage to an adjacent landowner outside the district.
*325 Based upon the rationale set forth above, we have concluded that the trial court properly held in this case that the discretionary function exception provided for in K.S.A. 75-6104(d) does not apply to relieve the Rossville Drainage District from liability in this case. This is so because, under the Kansas Tort Claims Act, a governmental agency does not have a discretionary right to violate a legal duty and avoid liability. To so hold would completely nullify the purpose of the Kansas Tort Claims Act.
We hold that the trial court correctly denied defendant Rossville Drainage District's motion to dismiss. The case is remanded to the district court for trial on the evidentiary issues presented in the case. The judgment of the district court is affirmed.
