
673 N.W.2d 487 (2003)
NOLAN AND NOLAN, a Minnesota Partnership, Appellant,
v.
CITY OF EAGAN, Respondent,
MINNESOTA DEPARTMENT OF TRANSPORTATION, Respondent.
No. A03-616.
Court of Appeals of Minnesota.
December 30, 2003.
*490 Michael C. McCarthy, David F. Herr, Maslon Edelman Borman & Brand, LLP, Minneapolis, MN; and Howard A. Roston, Bruce D. Malkerson, Malkerson Gilliland Martin, LLP, Minneapolis, MN, for appellant.
James G. Golembeck, Jardine, Logan & O'Brien, P.L.L.P., Lake Elmo, MN, for respondent City of Eagan.
Mike Hatch, Attorney General, Marsha Eldot Devine, Ann K. Bloodhart, Assistant Attorneys General, St. Paul, MN, for respondent Department of Transportation.
*491 Considered and decided by KALITOWSKI, Presiding Judge; HALBROOKS, Judge; and STONEBURNER, Judge.

OPINION
KALITOWSKI, Judge.
Appellant challenges the district court's dismissal of both its mandamus action and its tort claims for failure to state a claim upon which relief can be granted, arguing that the district court erred by determining that: (1) appellant failed to state a takings claim; (2) appellant's mandamus action failed because appellant had an adequate remedy at law; (3) as a matter of law appellant was prohibited from pursuing mandamus and tort claims simultaneously; and (4) the statute of limitations barred appellant's trespass, nuisance, and negligent construction, design, maintenance, operation, and inspection claims.

FACTS
Appellant Nolan and Nolan, a Minnesota Partnership, owns and operates EZ Mini Storage on property abutting Sibley Memorial Highway in the City of Eagan. EZ Mini Storage rents space to tenants for the storage of personal property. Appellant has owned the property for more than 20 years. At approximately the same time appellant was constructing the storage business on its property, respondent Minnesota Department of Transportation (MnDOT) began constructing Sibley Memorial Highway. In connection with its construction, MnDOT constructed a storm sewer system.
In its complaint and petition for a writ of mandamus, appellant alleged that MnDOT and the City caused numerous incidents of flooding on appellant's property, and that the flooding has been and will continue to be frequent, regular, and permanent. Specifically, appellant alleged that MnDOT and the City's negligent design and construction of their storm sewer systems, and their failure to exercise reasonable care in the maintenance, repair, and operation of those systems caused the flooding. Appellant alleged its property most recently flooded on July 8, 2000, causing damage to its building, the building's contents, and its tenants' personal property.
On July 3, 2002, appellant filed a petition for a writ of mandamus, seeking an order requiring MnDOT and the City to initiate inverse condemnation proceedings. In the alternative, appellant filed a complaint alleging trespass, negligence, nuisance, and violation of due process. On November 27, 2002, the district court granted MnDOT's motion to dismiss all of appellant's claims against MnDOT for failure to state a claim upon which relief can be granted. The City remained a party. Subsequently, the City and appellant stipulated to dismiss the case without prejudice and this appeal followed.

ISSUES
1. Did the district court err in dismissing appellant's inverse condemnation claim on the pleadings?
A. Did appellant adequately state a takings claim?
B. Did the district court err in dismissing appellant's taking claim on the ground that appellant had an adequate remedy at law?
C. Did the district court err in concluding that appellant could not pursue tort claims and a writ of mandamus simultaneously?
2. Did the district court err in concluding the statute of limitations barred all of appellant's tort claims?


*492 ANALYSIS
When reviewing a dismissal for failure to state a claim upon which relief can be granted, an appellate court must only determine whether the complaint sets forth a legally sufficient claim for relief. Barton v. Moore, 558 N.W.2d 746, 749 (Minn.1997). This court accepts the facts in the complaint as true and makes all reasonable and favorable inferences in favor of the plaintiff. Pullar v. Indep. Sch. Dist. No. 701, 582 N.W.2d 273, 275-76 (Minn.App.1998). Whether the plaintiff can prove the facts alleged is immaterial. Stead-Bowers v. Langley, 636 N.W.2d 334, 338 (Minn.App.2001), review denied (Minn. Feb. 19, 2002). An appellate court will not uphold a dismissal for failure to state a claim "if it is possible on any evidence which might be produced, consistent with the pleader's theory, to grant the relief demanded." Martens v. Minnesota Mining & Mfg. Co., 616 N.W.2d 732, 739-40 (Minn.2000) (citing N. States Power Co. v. Franklin, 265 Minn. 391, 395, 122 N.W.2d 26, 29 (1963)).

I.
The Minnesota Constitution requires the government to compensate a property owner when it takes the owner's property. Minn. Const. art. 1, § 13. A "taking" is any interference "with the possession, enjoyment, or value of private property." Minn.Stat. § 117.025, subd. 2 (2002). When the government has taken property without formally using its eminent domain powers, the property owner has a cause of action for inverse condemnation. Alevizos v. Metro. Airports Comm'n of Minneapolis & St. Paul, 298 Minn. 471, 477, 216 N.W.2d 651, 657 (1974).
Actions for inverse condemnation must be brought to the court through an action in mandamus. Thomsen v. State, 284 Minn. 468, 474, 170 N.W.2d 575, 580 (1969). A district court reviewing a petition for a writ of mandamus must decide whether a taking of property has occurred in the constitutional sense. Gibson v. Comm'r of Highways, 287 Minn. 495, 498-99, 178 N.W.2d 727, 730 (1970). While either party may request a jury trial on the issues of fact, the court ultimately decides whether a taking has occurred. Alevizos v. Metro. Airports Comm'n, 317 N.W.2d 352, 359-60 (Minn.1982).
A. Did appellant adequately plead a takings claim?
Appellant argues that the district court erred by concluding it failed to state a takings claim. Appellant contends that its claim of frequent, regular, and permanent flooding in its complaint was sufficient to survive a motion to dismiss on the pleadings. We agree.
"Whether occasional flooding is of such frequency, regularity, and permanency as to constitute a taking and not merely a temporary invasion for which the landowner should be left only to a possible recovery of damages is a question of degree, and each case must stand on its own peculiar facts." Nelson v. Wilson, 239 Minn. 164, 172, 58 N.W.2d 330, 335 (1953) (concluding that a taking occurred where state's construction of dams resulted in periodic flooding and land remained wet and flooded for several years). Flooding is permanent if it imposes "a servitude of indefinite duration," even if intermittent. Spaeth v. City of Plymouth, 344 N.W.2d 815, 822 (Minn.1984) (citations omitted). Thus, intermittent flooding may, under some circumstances, constitute a taking. See id. (concluding that flooding by construction of storm water holding pond constituted a taking where landowner's property had remained flooded for past three years and it appeared likely flooding would continue); Caponi v. Carlson, 392 N.W.2d 591 (Minn.App.1986) (concluding that a *493 taking occurred where city utilized landowner's land as a storm water holding pond, land was permanently flooded, and landowner had no use of property), reviewed denied (Minn. Oct. 29, 1986); see also Wilson v. Ramacher, 352 N.W.2d 389, 394-95 (Minn.1984) (allowing landowner to amend complaint to include inverse condemnation claim where landowner claimed the city's diversion of surface waters rendered his land unfit to use).
Other cases have concluded that intermittent flooding did not constitute a taking. See Vern Reynolds Constr., Inc. v. City of Champlin, 539 N.W.2d 614, 619 (Minn.App.1995) (concluding that because evidence indicated all parties viewed drainage easement as temporary, landowner had tort claim rather than inverse condemnation claim), review denied (Minn. Dec. 20, 1995). But, significantly, this case was decided on summary judgment and judgment on mandamus, not on the pleadings. Id. at 615.
Here, the district court concluded that appellant's claims of flooding failed to rise to the level of a taking. But the district court's conclusion is not supported by the pleadings, which must be accepted as true. The pleadings allege: (1) MnDOT and the City caused numerous incidents of flooding; (2) the flooding has and will be frequent, regular, and permanent; and (3) the last incident of flooding occurred on July 8, 2000. Because it is possible that appellant could produce some evidence consistent with appellant's theory to grant the relief demanded, we conclude that the district court erred in finding that appellant failed to state a takings claim.
B. Must appellant's mandamus action be dismissed because appellant had an adequate remedy at law?
Appellant also argues that the district court erred in dismissing its petition for a writ of mandamus on the ground that appellant's alternative tort claims indicated that appellant had an adequate remedy at law. We agree.
"Mandamus is an extraordinary legal remedy awarded, not as a matter of right, but in the exercise of sound judicial discretion and upon equitable principles." County of Swift v. Boyle, 481 N.W.2d 74, 77 (Minn.App.1992) (quoting State ex rel. Hennepin County Welfare Bd. v. Fitzsimmons, 239 Minn. 407, 422, 58 N.W.2d 882, 891 (1953)), review denied (Minn. Mar. 26, 1992). On appeal, this court will reverse a district court's order on an application for mandamus relief "only when there is no evidence reasonably tending to sustain the trial court's findings." Coyle v. City of Delano, 526 N.W.2d 205, 207 (Minn.App.1995). When the district court's decision on a petition for a writ of mandamus is based solely on a legal determination, this court reviews that decision de novo. Demolition Landfill Servs., LLC v. City of Duluth, 609 N.W.2d 278, 280 (Minn.App.2000), review denied (Minn. July 25, 2000).
Appellant argues that the district court erred in dismissing the mandamus action on the pleadings because appellant had an adequate legal remedy for its alleged injuries. Before a writ of mandamus may be issued, a petitioner must establish: (1) an official has failed to exercise a duty required by law; (2) due to this failure, petitioner is specifically injured by a public wrong; and (3) there is no adequate alternative legal remedy. Coyle, 526 N.W.2d at 207. Here, the district court concluded that appellant was not entitled to mandamus because appellant had an adequate remedy at law, in part because appellant sought damages for trespass, nuisance, and negligence. But appellant *494 petitioned for mandamus to compel MnDOT to initiate inverse condemnation proceedings. And if the district court determined that the flooding did not rise to the level of a taking, it sought remedies for trespass, nuisance, and negligence. Appellant asserts, and we agree, that legal remedies are necessarily inadequate if a taking occurred. Because we have determined that appellant has adequately pled a takings claim, we conclude that the court erred in dismissing the mandamus action on the ground that appellant had an adequate legal remedy.
C. Can appellant simultaneously pursue a takings claim and tort claims?
Appellant argues that the district court erred in concluding that it was not entitled to mandamus because it pursued mandamus and tort claims simultaneously. We agree. As discussed above, mandamus is not available if an adequate legal remedy exists. Minn.Stat. § 586.02 (2002). Minnesota law further provides that:
[n]o pleading or written allegation, other than the writ, answer, and demurrer, shall be allowed. They shall be construed and amended, and the issues tried, and further proceedings had, in the same manner as in a civil action. The demurrer need not be noticed for argument, but the issues raised thereby may be disposed of as are other objections to the pleadings.
Minn.Stat. § 586.08 (2002). Thus, the statute provides that pleadings or other written allegations are not permitted in a mandamus proceeding. But the statute is silent on whether a petitioner can jointly petition for mandamus, and alternatively, file a separate complaint alleging tort claims. However, the statute provides that further proceedings should be conducted "in the same manner as in a civil action." Minn.Stat. § 586.08. And Minn. R. Civ. P. 8.05 provides, in relevant part: "A party may also state as many separate claims or defenses as the party has regardless of consistency and whether based on legal or equitable grounds or both."
While no case has directly addressed this issue, we conclude that caselaw indicates that a petitioner can properly pursue mandamus and tort claims simultaneously. See Wilson, 352 N.W.2d at 394 (stating that "[a] landowner whose property has been flooded by the alleged actions of a municipality has several possible remedies or causes of action, such as negligence, nuisance, trespass, and inverse condemnation"); see also City of Minneapolis v. Meldahl, 607 N.W.2d 168, 172 (Minn.App. 2000) (finding that appellant had not made an inverse condemnation claim even when court liberally construed pleadings); City of Maple Lake v. Am. States Ins. Co., 509 N.W.2d 399, 404 (Minn.App.1993) (stating that in any takings claim "the possibility will exist that the claim could have been cast in terms of trespass or nuisance" (citing Alevizos, 298 Minn. at 483-84 n. 1, 216 N.W.2d at 660)), review denied (Minn. Feb. 24, 1994).
In Wilson, after determining that the landowner's negligence and trespass claims were barred, the court expressed regret that the landowner had not included an inverse condemnation claim in his complaint. Wilson, 352 N.W.2d at 394-95 ("Unfortunately, plaintiff's complaint, notwithstanding its verbosity, neither alleges a taking nor asks for inverse condemnation."). The court granted the landowner leave to amend his complaint to include an inverse condemnation claim, which necessarily included a petition for mandamus. Id. at 395; see Thomsen, 284 Minn. at 474, 170 N.W.2d at 580 (concluding that actions for inverse condemnation must be brought through an action in mandamus).
*495 Judicial efficiency and economy also persuade us that a landowner should be able to seek inverse condemnation by petitioning for mandamus, and alternatively, file a complaint, particularly where, as here, it is uncertain whether the landowner will be successful in establishing that a taking occurred. Because of the Minnesota Supreme Court's decision in Wilson and the interests of judicial efficiency, we conclude that a petitioner is permitted to simultaneously pursue an inverse condemnation claim by way of a petition for mandamus, and alternatively, tort claims.

II.
Appellant contends the district court erred in concluding all of its tort claims were barred by the statute of limitations provision in Minn.Stat. § 541.051 (2002). The statute provides in relevant part:
(a) Except where fraud is involved, no action by any person in contract, tort, or otherwise to recover damages for any injury to property, real or personal, or for bodily injury or wrongful death, arising out of the defective and unsafe condition of an improvement to real property ... shall be brought against any person performing or furnishing the design, planning, supervision, materials, or observation of construction or construction of the improvement to real property or against the owner of the real property more than two years after discovery of the injury ... nor, in any event shall such a cause of action accrue more than ten years after substantial completion of the construction. Date of substantial completion shall be determined by the date when construction is sufficiently completed so that the owner or the owner's representative can occupy or use the improvement for the intended purpose.
(b) For purposes of paragraph (a), a cause of action accrues upon discovery of the injury ...
(c) Nothing in this section shall apply to actions for damages resulting from negligence in the maintenance, operation or inspection of the real property improvement against the owner or other person in possession.
Minn.Stat. § 541.051, subd. 1(a)-(c).
A party seeking application of a statute of limitations, which is an affirmative defense, bears the burden of establishing that the claims are time-barred as a matter of law. Thiele v. Stich, 425 N.W.2d 580, 583 (Minn.1988). Construction and applicability of a statute of limitations is a question of law, which appellate courts review de novo. Benigni v. County of St. Louis, 585 N.W.2d 51, 54 (Minn.1998). This court construes Minn.Stat. § 541.051 narrowly, but still gives effect to the plain language of the statute. Pac. Indem. Co. v. Thompson-Yaeger, Inc., 260 N.W.2d 548, 554 (Minn.1977) (superseded by statute on other grounds as stated in O'Brien v. U.O.P., Inc., 701 F.Supp. 714 (D.Minn. 1988)).
Here, the district court concluded that appellant's tort claims were barred by the statute of limitations because appellant was required to bring a tort action within two years of the discovery of the flooding damage, or in any event, no more than ten years after the completion of the construction of the storm sewer system. Appellant first argues that Minn.Stat. § 541.051 does not apply here because the alleged flooding does not arise from a "defective and unsafe condition." We disagree.
The question of whether injury to property arises out of a defective or unsafe condition is one that turns on the individual facts alleged in the complaint. Griebel v. Andersen Corp., 489 N.W.2d *496 521, 523 (Minn.1992). Appellate courts consider the phrase "defective and unsafe" collectively. Id. An improvement to real property is deemed defective and unsafe if it is incomplete, faulty, dangerous, and/or insecure. Id.; Fiveland v. Bollig & Sons, Inc., 436 N.W.2d 478, 480 (Minn.App.1989), review denied (Minn. Apr. 24, 1989). The Minnesota Supreme Court has implicitly found that flooding caused by a storm sewer system constitutes a defective and unsafe condition by determining that the statute of limitations applied to claims of negligent design and construction of these systems. See Capitol Supply Co. v. City of St. Paul, 316 N.W.2d 554, 555 (Minn. 1982); Ocel v. City of Eagan, 402 N.W.2d 531, 534 (Minn.1987). Therefore, we conclude that appellant's complaint alleged a defective and unsafe condition.
We also conclude that a storm sewer system is an improvement to real property as contemplated by Minn.Stat. § 541.051. Improvement is defined as "a permanent addition to or betterment of real property that enhances its capital value and that involves the expenditure of labor and money and is designed to make the property more useful or valuable as distinguished from ordinary repairs." Brandt v. Hallwood Mgmt. Co., 560 N.W.2d 396, 400 (Minn.App.1997) (citing Pac. Indem. Co., 260 N.W.2d at 554). In determining that the statute of limitations applied to claims of negligent design and construction of storm sewer systems, the Minnesota Supreme Court has implicitly found that storm sewer systems constitute improvements to real property. See Capitol Supply Co., 316 N.W.2d at 555; Ocel, 402 N.W.2d at 534.
Appellant also contends that the district court erred in finding that Minn.Stat. § 541.051 applies to owners of real property. We disagree. Minn.Stat. § 541.051, subd.1(c), provides: "Nothing in this section shall apply to actions for damages resulting from negligence in the maintenance, operation or inspection of the real property improvement against the owner or other person in possession." Appellant construes this language to mean that claims against a property owner can never fall within the statute of limitations provision of Minn.Stat. § 541.051, subd. 1(a). But by the statute's plain language, only claims of negligent maintenance, operation or inspection against a property owner are outside the statute of limitations provision.
Because the statute of limitations applies to appellant's negligent design and construction claims, and more than ten years have elapsed since substantial completion of Sibley Memorial Highway, we conclude that the district court properly dismissed these claims.
But we conclude that the district court erred in dismissing appellant's negligent maintenance, repair, and operation claims. Appellant alleges in its complaint that the flooding was caused both by MnDOT's negligent design and construction of the storm sewer system and its failure to exercise reasonable care following the construction. As noted above, the district court must construe appellant's complaint as true. Because respondent bears the burden of showing appellant's claims are time-barred, and because appellant may be able to produce some evidence consistent with its theory, to support the relief demanded, we conclude that the district erred in dismissing appellant's negligent maintenance, operation, and inspection claims.
Appellant also argues that the district court erred in dismissing its nuisance and trespass claims. We disagree. Claims of nuisance and trespass arising out of a defective condition of an improvement to real property are governed by the *497 statute of limitations in Minn.Stat. § 541.051 rather than the six-year statute of limitations in Minn.Stat. § 541.05 (2002). See Minnesota Mut. Fire and Cas. Co. v. Retrum, 456 N.W.2d 719, 722 (Minn.App. 1990) (citing Fagerlie v. City of Willmar, 435 N.W.2d 641, 644 (Minn.App.1989); Ford v. Emerson Elec. Co., 430 N.W.2d 198, 200-01 (Minn.App.1988), review denied (Minn. Dec. 16, 1988)).
The two-year limitations period under Minn.Stat. § 541.051 "begins to run when an actionable injury is discovered, or with due diligence, should have been discovered, regardless of whether the precise nature of the defect causing the injury is known." Indep. Sch. Dist. No. 775 v. Holm Bros. Plumbing and Heating, Inc., 660 N.W.2d 146, 150 (Minn.App.2003) (citation omitted). "[W]hen reasonable minds may differ about the discovery of the injury or condition, the issue is one for the trier of fact." Metro. Life Ins. Co. v. M.A. Mortenson Co., 545 N.W.2d 394, 399 (Minn.App.1996), review denied (Minn. May 21, 1996) (citation omitted).
Here, appellant alleged numerous incidents of frequent, regular, and permanent flooding "over the years" with the most recent occurring on July 8, 2000. We must accept these facts as true. Thus, on the pleadings, the court can determine as a matter of law that the flooding was or should have been discovered within the limitations period. We conclude the district court did not err in dismissing these claims on the pleadings.

DECISION
Appellant stated a takings claim by alleging frequent, regular, and permanent flooding. Further, because determining whether flooding constitutes a taking is a fact-specific inquiry, appellant could simultaneously pursue mandamus, and alternatively, tort claims. Therefore, the district court erred in dismissing appellant's inverse condemnation claim. The district court also erred in dismissing appellant's negligent maintenance, repair, and operation claims by concluding that the statute of limitations provision of Minn.Stat. § 541.051, subd. 1(a), barred these claims. But the district court properly determined that appellant's negligent construction and design, trespass and nuisance claims are barred by Minn.Stat. § 541.051, subd. 1(a).
Affirmed in part, reversed in part, and remanded.
