[¶ 1.] Landowners applied for a writ of mandamus to compel County to install a 24 inch culvert in or near a certain location under a roadway to permit the natural flow of surface waters and to prevent flooding of their land. The circuit court granted County’s motion for judgment on the pleadings and motion to dismiss for failure to state a claim upon which relief could be granted. We affirm in part, reverse in part, and remand.
Facts and Procedural History
[¶ 2.] Clay County, South Dakota, recently modified an existing roadway. Sor-ensens own property on both sides of the newly constructed road. In rebuilding the new roadway, County replaced a “T” inter *268 section with a curved road. According to Sorensens, the previous intersection had a 24 inch culvert, “which permitted water to continue in the natural course of drainage.” Sorensens allege that the new road intersects the general course of natural drainage and that County has refused to reinstall the 24 inch culvert, causing flooding and irreparable damage to their land.
[¶ 3.] Following County’s denial of Sor-ensens’ request to reinstall the culvert, Sorensens filed an application for a writ of mandamus. They requested an order compelling the County to reinstall the 24 inch culvert and modify the road to permit the natural flow of water. County answered, moved for judgment on the pleadings, and moved to dismiss for failure to state a claim. The trial court granted County’s motions. Sorensens appeal.
Analysis and Decision
[¶ 4.] A trial court’s dismissal for failure to state a claim under SDCL 15 — 6— 12(b)(5) is reviewed de novo.
Fenske Media Corp. v. Banta Corp.,
[¶ 5.] Sorensens’ pleadings allege that the modified road “changes the general course of natural drainage and causes water to inundate upon [their] land.” To rectify the situation, Sorensens sought an order specifically requiring the County to reinstall a 24 inch culvert in the new highway in approximately the same location. Sorensens also generally requested the County to do the work necessary to permit the natural flow of water in the general course of drainage.
[¶ 6.] The purpose of a writ of mandamus is “to compel the performance of an act which the law specially enjoins as a duty resulting from an office.... ” SDCL 21-29-1.
The writ of mandamus may be issued by the Supreme and circuit courts, to any inferior tribunal, corporation, board, or person, to compel the performance of an act which the law specially enjoins as a duty resulting from an office, trust, or station; ....
Id.
A party may obtain mandamus only if the petitioner can show that they have a “clear legal right to performance of the specific duty sought to be compelled and the respondent must have a definite legal obligation to perform that duty.”
Willoughby v. Grim,
[¶ 7.] County concedes that SDCL 31-12-26 1 and 31-14-2 2 “clearly impose a *269 duty on counties to maintain roads, bridges, and culverts.” County, however, asserts that the manner in which this duty is performed “is within the sound discretion of [C]ounty and not subject to mandamus relief.” County also denies that the modified road prevents drainage.
[¶ 8.] In discussing a township’s analogous duties, we have stated that because “a road may alter the natural flow of surface water, townships are obliged to reasonably accommodate the area’s natural drainage.”
Knodel v. Kassel Tp.,
[I]t is the duty of highway authorities to place openings in highway grades so as to permit surface water to escape in its natural course from the higher to the lower lands.... [A]n injunction will lie to restrain highway officials from so improving a highway as to divert water from its course of natural drainage and cause it to flow upon [a property owner’s] land in an unusual and unnatural manner.
Id. ¶ 11 (internal citations omitted).
[¶ 9.] Whether mandamus is available to enforce this drainage duty is dependent on whether the act sought to be compelled is discretionary or ministerial.
Willoughby,
[¶ 10.] In Willoughby, the petitioners seeking a writ of mandamus lived at the end of a gravel township highway. After it rained, the road would turn into gumbo, and mud from the surrounding hills would fill the ditches, plug the culverts, and make the road nearly impassable. The trial court issued a writ ordering the township to remedy the problem in certain specific ways. This Court concluded that the trial court was correct in issuing the writ, but incorrect in ordering how the road should be repaired, because that latter order was beyond the scope of mandamus.
[¶ 11.] In this case, we conclude that the duty of a county to permit surface water to escape in its natural course is ministerial in nature and may be compelled by mandamus. However, how the County decides to permit the drainage is discretionary in nature and may not be enforced by mandamus. Therefore, this petition states a claim for relief to the extent that it seeks County to perform its general duty. However, the petition fails to state a claim to the extent it seeks to require the specific act of installing a 24 inch culvert in the approximate location of the previous culvert. Furthermore, there are issues of fact in existence concerning the actual drainage and flooding that preclude a judgment on the pleadings.
*270 [¶ 12.] Therefore, we hold that the trial court correctly dismissed that portion of the application seeking to have a 24 inch culvert installed in a certain location; i.e.:
Sorensen .. .makes this Application for a Writ of Mandamus to compel Clay County, South Dakota, and its Commissioners, to install a 24 inch in diameter culvert ... as constructed in generally the same location as the 24 inch in diameter culvert existed in the old public highway prior to its removal....
However, we hold that the trial court erred in dismissing that portion of the application seeking to have the County perform its general duty to permit surface waters to escape through their natural course so as to prevent damage to Soren-sens’ land. Sorensens may proceed on that portion of the application alleging:
The construction of the new public highway ... acts as a dike or dam and prevents the natural drainage of water ... and causes Petitioners’ land to be flooded and inundated and causes irreparable harm to Petitioners’ land.
Clay County’s construction of the new public highway, .. .will deprive Petitioners of the use of Petitioner’s land as a result of the flooding. Flooding will occur ... and said flooding will continue to occur....
WHEREFORE, Petitioner prays that this Court issue a Writ of Mandamus as provided by South Dakota State statutes requiring Clay County, South Dakota, and its Commissioners to:
.. .make any and all modifications necessary ... to permit the water to flow in its general course of natural drainage from the north to the south and southeasterly direction ....
[¶ 13.] Affirmed in part, reversed in part and remanded.
Notes
. SDCL 31-12-26 provides:
Each board of county commissioners and county superintendent of highways in organized counties shall construct, repair, and maintain all secondary roads within the counties not included in any municipality, organized civil township, or county road district organized pursuant to chapter 31-12A.
. SDCL 31-14-2 provides:
The duty to construct and maintain all bridges and culverts throughout the county, except upon the state trunk highway sys *269 tem, is hereby imposed upon the board of county commissioners, subject to conditions relating to bridges and culverts on secondary highways in townships.
