LYNN, J.
This is an interlocutory appeal by the plaintiff, the City of Rochester (City), from an order of the Superior Court (Houran, J.) dismissing the City's claims against two of the four defendants it sued for damages. On appeal, the City asserts that the trial court erred in refusing to apply the doctrine of nullum tempus occurrit regi ("time does not run against the king") so as to exempt the City's claims against defendants Chicago Bridge & Iron n/k/a CB & I, Inc. (CB & I) and Whitman & Howard n/k/a AECOM Technical Services, Inc. (AECOM) from the bar of the six-year statute of limitations that was in effect when CB & I and AECOM substantially completed their contract with the City. See RSA 508:4, I (1983) (amended 1986). We affirm and remand.
I
The following facts are drawn from the interlocutory appeal statement. The City's Department of Public Works owns and operates the Rochester Water System, which provides water to residents of the City. The City operates three water storage tanks, one of which is the Rochester Hill Water Storage Tank (the Tank). AECOM designed the Tank and oversaw its construction by CB & I. CB & I completed the Tank in 1985, and it was placed into service that same year.
In June 2009, the City contracted defendant Marcel A. Payeur, Inc. (Payeur) to service the Tank by recoating the Tank's interior and exterior, installing a mixer, and modifying the Tank to accommodate the mixer. Defendant Wright-Pierce, a Maine corporation, performed the engineering and design work for the modification project. Payeur substantially completed the modification, under Wright-Pierce's supervision, in November 2009.
In December 2011, the Tank developed a leak. The City had to evacuate nearby residents, drain the Tank, and remove it from service. The City inspected the Tank and discovered that Payeur had failed to properly construct the modifications in accordance with Wright-Pierce's design.
The City filed suit against Payeur in November 2012, alleging breach of contract, breach of warranty, negligence, and unjust enrichment. In April 2014, the City named CB & I, AECOM, and Wright-Pierce as additional defendants. The City's amended complaint alleged that Wright-Pierce had failed to properly supervise Payeur's 2009 modification work; it also alleged that, in 1985, CB & I had failed to properly construct the Tank in accordance with AECOM's design, and AECOM had failed to adequately monitor CB & I.
CB & I and AECOM moved to dismiss the City's claims against them, arguing that the claims were time-barred by RSA 508:4. The City objected, arguing that the doctrine of nullum tempus precluded the statute of limitations from running against the City. The trial court granted CB & I and AECOM's motions to dismiss. Thereafter, the trial court approved, and we accepted, this interlocutory appeal.
II
The statute of limitations is an affirmative defense and thus a matter as to which defendants CB & I and AECOM bear the burden of proof. Glines v. Bruk, 140 N.H. 180, 181, 664 A.2d 79 (1995). However, in ruling on the motion to dismiss, the trial court assumed the factual allegations of the complaint to be true, and ruled as a matter of law that the doctrine of nullum tempus was inapplicable and that the statute of limitations barred the City's claims against CB & I and AECOM. Therefore, our review is de novo. See State v. Lake Winnipesaukee Resort, 159 N.H. 42, 45, 977 A.2d 472 (2009) ("Because the trial court rejected the statute of limitations defense as a matter of law, our review is de novo.").
The City submits two issues for our review: (1) "Whether the doctrine of nullum tempus applies to municipalities to bar the application of statutes of limitation[s] to claims brought by a municipality"; and (2) "Whether the doctrine of nullum tempus bars the application of RSA 508:4 to the City's claims here."
III
"The doctrine of nullum tempus is a common law rule excepting the sovereign from general limitations periods." Lake Winnipesaukee Resort, 159 N.H. at 45, 977 A.2d 472. Although "nullum tempus endures as a recognized doctrine of law in New Hampshire," id. our case law applying the doctrine is sparse.1 We applied the doctrine in Lake Winnipesaukee Resort, when we held that nullum tempus exempted a state civil enforcement action from the current three-year statute of limitations for personal actions, RSA 508:4, I (2010). Lake Winnipesaukee Resort, 159 N.H. at 45-49, 977 A.2d 472. In In re Dockham Estate, 108 N.H. 80, 82, 227 A.2d 774 (1967), we declined to apply nullum tempus to bar the application of a non-claim statute of limitations to a state action to recover an inmate's cost of care from his estate. But see Reconstruction Finance Corp. v. Faulkner, 100 N.H. 192, 194, 122 A.2d 263 (1956) (holding that a non-claim statute did not preclude a federal government agency from asserting its claim after the running of the limitations period). Additionally, we note that the New Hampshire legislature has codified the doctrine with respect to adverse possession and prescriptive easements. See RSA 236:30 (2009) (prohibiting prescriptive periods from running against public highways); RSA 477:33 (2013) (prohibiting, in some circumstances, the acquisition of prescriptive rights in state waters); RSA 477:34 (2013) (prohibiting the acquisition of prescriptive rights in public grounds); RSA 539:6 (2007) (prohibiting adverse possession of state lands).
We have not previously determined whether nullum tempus applies to claims asserted by municipalities.2
IV
The City urges us to apply the doctrine of nullum tempus to its contract claims against the defendants. We decline to do so because applying nullum tempus to a municipality's contract claims is not supported by the public policy underlying nullum tempus and undermines the public policy underlying statutes of limitations.3
The public policy supporting application of nullum tempus to adverse possession claims against public property and state civil enforcement actions does not support extending the doctrine to a municipality's contract claims. In cases of adverse possession, the very basis for the claim is that the claimant has committed a trespassory invasion of the owner's property rights that continued for the applicable limitations period. See, e.g., Bonardi v. Kazmirchuk, 146 N.H. 640, 642, 776 A.2d 1282 (2001). "[T]he nature of the use must have been such as to show that the owner knew or ought to have known that the right was being exercised, not in reliance upon the owner's toleration or permission, but without regard to the owner's consent." Sandford v. Town of Wolfeboro, 143 N.H. 481, 484, 740 A.2d 1019 (1999) (emphasis added; brackets and quotation omitted). Given the vast extent and wide variety of publicly-owned land, water and easement rights, as well as governmental bodies' need to rely on the finite universe of public employees, who are otherwise occupied with their regular duties, to detect encroachments on these rights, application of the doctrine of nullum tempus to adverse possession claims serves the important purpose of protecting public property rights from loss that could otherwise result from failure to detect unknown encroachments.
Similarly, in the case of enforcement actions to recover fines or penalties for violations of state statutes or local ordinances, governmental agents are not always able to promptly discover the existence of such violations. State agents "do not generally institute proceedings to punish violations of the laws, except at the instigation of individuals." State v. Franklin Falls Co., 49 N.H. 240, 252 (1870). As a result, "it may be doubted whether [government officials] are ever aware of a very large proportion of the infringements on the rights of the state." Id. Thus, again in this context, nullum tempus operates to protect the public good by preventing wrongdoers from benefitting from the limitations inherent in governmental bodies' enforcement prowess, to the detriment of public rights.
Conversely, public bodies such as municipalities are aware of the contracts into which they enter. Thus, a municipality's contractual undertakings are unlikely to lead to unknown violations of public rights. Rather, municipalities generally are as equipped as private individuals to vigilantly enforce their contract rights in a timely fashion. Furthermore, when a municipality enters into a contract, it acts as does any private party: "[A] municipal corporation is bound by, and may sue and be sued on, all contracts which it may legally enter into in the same manner as a private corporation or an individual." Great Lakes Aircraft Co. v. City of Claremont, 135 N.H. 270, 278-79, 608 A.2d 840 (1992) (quotation omitted); see also RSA 31:3 (2000) (authorizing municipal corporations to make contracts); RSA 31:1 (2000) (stating that municipalities may sue and be sued).
Additionally, municipalities cannot raise sovereign immunity as a defense to contract claims. See Great Lakes, 135 N.H. at 279, 608 A.2d 840 ("The immunity of government from liability on contracts has never been regarded as applicable to local governmental units."). Although sovereign immunity and nullum tempus are distinct doctrines, both have their origins as incidents of sovereignty. See Lake Winnipesaukee Resort, 159 N.H. at 45, 977 A.2d 472; Sousa v. State, 115 N.H. 340, 342, 341 A.2d 282 (1975). Thus, a municipality's inability to raise sovereign immunity as a defense to contract claims demonstrates that when a municipality enters a contract, it is acting as does a private party and not as a sovereign.
In sum, municipalities enter into contracts in the same manner as private parties, and they are equally equipped to assert their contract rights as are private parties. Because municipalities are not at a disadvantage to assert their contract rights, the doctrine of nullum tempus is not necessary to protect the public's interest in those rights.4
Allowing a municipality to bring contract claims notwithstanding RSA 508:4 would undermine the public policy behind statutes of limitations. Statutes of limitations "reflect the fact that it becomes more difficult and time-consuming both to defend against and to try claims as evidence disappears and memories fade with the passage of time." Keeton v. Hustler Magazine, Inc., 131 N.H. 6, 14, 549 A.2d 1187 (1988). Statutes of limitations both insure that defendants receive timely notice of actions against them and protect defendants from stale or fraudulent claims. Id. at 14, 549 A.2d 1187; Dupuis v. Smith Properties, Inc., 114 N.H. 625, 629, 325 A.2d 781 (1974). "Such statutes thus represent the legislature's attempt to achieve a balance among State interests in protecting both forum courts and defendants generally against stale claims and in insuring a reasonable period during which plaintiffs may seek recovery on otherwise sound causes of action." Keeton, 131 N.H. at 14, 549 A.2d 1187. Because statutes of limitations are grounded in public policy, parties cannot agree by contract made in advance of the accrual of a cause of action for breach to extend or avoid application of the limitations period. See West Gate Village Assoc. v. Dubois, 145 N.H. 293, 299, 761 A.2d 1066 (2000).
Here, the trial court ruled that the City's claims were time-barred by RSA 508:4 unless nullum tempus operated to exempt the City's claims from that statute of limitations. The former version of RSA 508:4 that governs this case bars contract claims after six years, and the City did not bring its claims until many years after the expiration of the limitations period. Permitting the City to bring its contract claims would unfairly subject the defendants to the harms against which statutes of limitations were designed to protect. Employees of the City and the defendants may have changed jobs, retired, or died. The memories of those witnesses that can still be located will no doubt have faded. Other physical evidence may have been lost or destroyed. Furthermore, because the defendants would not have expected such a stale claim to be enforceable, they had no incentive to preserve evidence. Therefore, because the passage of time has made it more difficult for the defendants to defend against the City's claims, it would be unfair and would undermine the public policy supporting statutes of limitations to allow the City to bring its twenty-nine-year-old contract claims.
Because applying the doctrine of nullum tempus to a municipality's contract claims is not supported by the public policy underlying nullum tempus and undermines the public policy underlying statutes of limitations, we conclude that nullum tempus does not bar the application of RSA 508:4 to the City's contract claims. Therefore, we affirm the trial court's grant of the defendants' motions to dismiss. In light of our holding, we need not decide at this time whether municipalities, in other contexts, may properly invoke nullum tempus.
Affirmed and remanded.
DALIANIS, C.J., and HICKS, CONBOY, and BASSETT, JJ., concurred.