
648 N.W.2d 87 (2002)
Terry ALBRECHT, Individually and as Guardian and Conservator of Sara Albrecht, Appellant,
v.
GENERAL MOTORS CORPORATION, Appellee.
No. 01-0023.
Supreme Court of Iowa.
July 17, 2002.
*88 James L. Kramer and Neven J. Mulholland of Johnson, Erb, Bice, Kramer, Good & Mulholland, P.C., Fort Dodge, for appellant.
Thomas P. Branigan, Terrence E. Haggerty and Andrea L. Laginess of Bowman and Brooke LLP, Detroit, Michigan, and William H. Habhab, Fort Dodge, for appellee.
TERNUS, Justice.
This products liability suit is before us on appeal because the parties dispute whether the statute of repose set forth in Iowa Code section 614.1(2A) (1999) is extended for minors pursuant to Iowa Code section 614.8(2). The district court dismissed the plaintiff's claim, ruling that the extension provision did not apply and, therefore, the statute of repose barred the *89 plaintiff's suit against the defendant manufacturer. We agree with the district court's interpretation of the relevant statutes and affirm.

I. Background Facts and Proceedings.

On December 15, 1999, seventeen-year-old Sara Albrecht was injured when the car she was driving collided with another vehicle. Her father, Terry Albrecht, acting as his daughter's conservator and guardian, filed suit against the manufacturer of the car, General Motors Corporation (GM). The petition asserted that GM was liable for Sara's injuries because the seat belt Sara was wearing at the time of the accident allegedly failed.
In its answer, GM raised Iowa Code section 614.1(2A) as an affirmative defense. This statute, in general terms, requires that any products liability claim be brought with fifteen years of the product's initial purchase. See Iowa Code § 614.1(2A).
Relying on the allegations of the plaintiff's petition, GM filed a motion to dismiss. Albrecht resisted. Although he did not dispute that more than fifteen years had elapsed since the automobile in question was first purchased, he claimed that section 614.1(2A) did not apply to minors. Albrecht relied on Iowa Code section 614.8(2), which extends limitations periods for minors until one year after they attain the age of majority. See id. § 614.8(2). (It was undisputed that suit was filed within one year after Sara reached the age of majority.) GM responded that the extension provision applied only to the two-year statute of limitation for personal injuries, see id. § 614.1(2), not to section 614.1(2A)'s statute of repose.
The district court granted GM's motion to dismiss. Noting that statutes of repose were different from statutes of limitation, the court held that section 614.8(2) did not apply to statutes of repose. Albrecht appealed.

II. Applicable Legal Principles.

A. Scope of Review. We review a district court's ruling on a motion to dismiss for correction of errors at law. Pa. Life Ins. Co. v. Simoni, 641 N.W.2d 807, 810 (Iowa 2002). "A motion to dismiss is sustainable only when it appears to a certainty that the plaintiff would not be entitled to relief under any state of facts that could be proved in support of the claims asserted." Haupt v. Miller, 514 N.W.2d 905, 911 (Iowa 1994). For purposes of ruling on a motion to dismiss, the court accepts as true the facts alleged in the pleading sought to be dismissed. Simoni, 641 N.W.2d at 810. Accordingly, a statute-of-repose defense is properly raised by a motion to dismiss only when the necessary facts appear on the face of the petition. Harden v. State, 434 N.W.2d 881, 883 (Iowa 1989).
B. Principles of statutory interpretation. Because the propriety of dismissal in this case rests on the applicability of various provisions of chapter 614, we are guided by principles of statutory interpretation.
"The primary rule of statutory interpretation is to give effect to the intention of the legislature." We presume that when the legislature enacts a statute that it intends "[a] just and reasonable result." Accordingly, the court interprets statutes so as to avoid absurd results. In addition, we "construe statutes that relate to the same or a closely allied subject together so as to produce a harmonious and consistent body of legislation."
State v. Iowa Dist. Ct., 616 N.W.2d 575, 578 (Iowa 2000) (citations omitted).
Unless a statute is ambiguous, we will apply the statute "in accordance *90 with its plain meaning." Citizens' Aide/Ombudsman v. Miller, 543 N.W.2d 899, 902 (Iowa 1996). "Ambiguity exists if reasonable minds may differ or may be uncertain as to the meaning of the statute." State v. Green, 470 N.W.2d 15, 18 (Iowa 1991). "Ambiguity may arise from specific language used in a statute or when the provision at issue is considered in the context of the entire statute or related statutes." Midwest Auto. III, LLC v. Iowa Dep't of Transp., 646 N.W.2d 417, 425 (Iowa 2002). To resolve an ambiguity, the court considers "the objects sought to be accomplished [and] the evils sought to be remedied." Green, 470 N.W.2d at 18. We then choose "a reasonable construction that will effectuate the statute's purpose rather than one that will defeat it." Id.

III. Discussion.

We commence our analysis with a discussion of two matters of importance: (1) the distinction between a statute of limitation and a statute of repose; and (2) the evolution of limitations periods in chapter 614. We think an understanding of these matters will be helpful in resolving the dispute in this case. After that discussion, we will address the merits of the issue before us.
A. Statutes of limitation and repose. Historically, our court did not distinguish between statutes of limitation and statutes of repose. E.g., Wilber v. Owens-Corning Fiberglas Corp., 476 N.W.2d 74, 77 (Iowa 1991) (stating that statutes of limitations "are statutes of repose"); Schulte v. Wageman, 465 N.W.2d 285, 287 (Iowa 1991) (stating that a statute of limitation "`is a statute of repose'" (citation omitted)); Grand Lodge of Iowa of the Indep. Order of Odd Fellows v. Osceola Lodge No. 18, 178 N.W.2d 362, 372 (Iowa 1970) (stating that "[l]imitation acts are statutes of repose"); Boehnke v. Roenfanz, 246 Iowa 240, 247, 67 N.W.2d 585, 590-91 (1954) (using terms interchangeably). We first noted that statutes of limitation and statutes of repose were not the same in 1993. In Bob McKiness Excavating & Grading, Inc. v. Morton Buildings, Inc., 507 N.W.2d 405 (Iowa 1993), we said:
"Statutes of repose are different from statutes of limitation, although they have comparable effects." A statute of limitations bars, after a certain period of time, the right to prosecute an accrued cause of action.
By contrast, a statute of repose "terminates any right of action after a specified time has elapsed, regardless of whether or not there has as yet been an injury."
A statute of repose period begins to run from the occurrence of some event other than the event of an injury that gives rise to a cause of action and, therefore, bars a cause of action before the injury occurs.
Under a statute of repose, therefore, the mere passage of time can prevent a legal right from ever arising.
Bob McKiness Excavating, 507 N.W.2d at 408 (citations omitted). See generally 51 Am.Jur.2d Limitation of Actions § 7, at 456 (2000) ("A true statute of limitations prescribes a time period within which an action must be brought upon claims or rights to be enforced, and should be distinguished from ... statutes of repose." (Emphasis added.)).
To summarize, a statute of limitations runs from the accrual of a cause of action, whereas a statute of repose runs from a different, earlier date typically related to an act of the defendant. Id. § 9, at 458, § 31, at 471. They are fundamentally different insofar as a statute of limitations sets forth the time within which an accrued claim must be asserted in court, in contrast to a statute of repose that operates *91 to prevent a cause of action from even accruing. Id. § 12, at 459 ("[W]hile a statute of limitation merely limits the time in which a plaintiff may bring suit after a cause of action accrues, a statute of repose extinguishes a cause of action after a fixed period of time ..., regardless of when the cause of action accrued."). In other words, a statute of limitations affects only the remedy, not the right, see Schulte, 465 N.W.2d at 287, whereas a statute of repose affects the right itself, extinguishing existing rights or preventing rights from arising.
Although the purposes underlying statutes of limitation and statutes of repose are similar, they are not identical. Both types of statutes "are designed to prevent the trial of stale claims because evidence gathering is usually made more difficult by the passage of time." Fisher v. McCrary-Rost Clinic, P.C., 580 N.W.2d 723, 725 (Iowa 1998). In addition, statutes of repose "reflect the legislative conclusion that a point in time arrives beyond which a potential defendant should be immune from liability for past conduct." 51 Am. Jur.2d Limitation of Actions § 18, at 463. Such statutes "avoid the difficulties in proof and recordkeeping that suits involving older claims impose ... and protect certain classes of persons ... from claims that are virtually indefensible after the passage of time." Id.
B. Legislative evolution of statutes of limitation and repose in Iowa. Before the 1975 enactment of a special provision dealing with medical malpractice claims, section 614.1 contained various limitation periods that ran from the accrual of the cause of action. See Iowa Code § 614.1 (1975). This statute stated that "[a]ctions may be brought within the times herein limited, respectively, after their causes accrue and not afterwards, except when otherwise specially declared." Id. (emphasis added). It then, in eight subsections, listed categories of injuries and the time periods for commencement of suit. See id.
In 1975, the legislature added a subsection to this statute that addressed medical malpractice claims and varied from the previous pattern. See 1975 Iowa Acts ch. 239, § 26 (codified at Iowa Code section 614.1(9) (1977)). The first portion of this new subsection imposed a two-year limitations period on actions "founded on injuries to the person or wrongful death against any physician and surgeon ... arising out of patient care." Iowa Code § 614.1(9). The two-year period was expressly made to commence upon discovery of the injury. Id. (stating that claim must be brought "within two years after the date on which the claimant knew, or through the use of reasonable diligence should have known, or received notice in writing of the existence of, the injury or death for which damages are sought"). Having the limitations period run from discovery of the injury was consistent with our prior case law holding that a cause of action does not accrue until "it is or should have been discovered." Baines v. Blenderman, 223 N.W.2d 199, 201 (Iowa 1974) (applying so-called "discovery rule" to medical malpractice cases); accord Chrischilles v. Griswold, 260 Iowa 453, 463, 150 N.W.2d 94, 100 (1967) (adopting discovery rule, holding that limitations period does not begin to run until plaintiff knows or should know of injury and its cause).
Of more significance to the present dispute is the second portion of section 614.1(9). The latter part of this statute set an outer limit on when a medical malpractice action could be commenced:
but in no event shall any action be brought more than six years after the date on which occurred the act or omission or occurrence alleged in the action to have been the cause of the injury or *92 death unless a foreign object unintentionally left in the body caused the injury or death.
Iowa Code § 614.1(9) (emphasis added). The practical effect of the dual components of section 614.1(9) is to impose a two-year statute of limitations on the filing of medical malpractice suits that runs from discovery of the injury and to impose a six-year absolute limit on such claims that runs, not from the accrual of the claim, but from the act causing the injury.
When our court first considered the six-year limit, we characterized it as a restriction on the operation of the discovery rule. See Kohrt v. Yetter, 344 N.W.2d 245, 247 (Iowa 1984) (stating that six-year period is an exception to the discovery rule for medical malpractice claims). In fact, it also operates as a statute of repose, barring a claim before it even accrues, i.e., is discovered. See Bob McKiness Excavating, 507 N.W.2d at 408 (citing to case analyzing section 614.1(9) in support of statement that a statute of repose can prevent a legal right from ever arising). Moreover, since our decision in Kohrt, we have referred to the six-year bar as a statute of repose. See Fisher, 580 N.W.2d at 725.
Subsequent to the adoption of section 614.1(9), our legislature enacted two additional subsections that are clearly statutes of repose. See 1997 Iowa Acts ch. 197, § 5 (codified at Iowa Code section 614.1(2A) (1999)); 1986 Iowa Acts ch. 1120, § 1 (codified at Iowa Code section 614.1(11) (1999)). Iowa Code section 614.1(11) bars suits directed to improvements on real property "fifteen years after the date on which occurred the act or omission of the defendant alleged in the action to have been the cause of the injury or death." Iowa Code § 614.1(11). We have held that this provision is a statute of repose. Bob McKiness Excavating, 507 N.W.2d at 408.
The second statute of repose adopted by the legislature is the statute at issue heresection 614.1(2A). It provides in relevant part:
Those [actions] founded on the death of a person or injuries to the person or property brought against the manufacturer... of a product based upon an alleged defect in the design, inspection, testing, manufacturing, formulation, marketing, packaging, warning, labeling of the product, or any other alleged defect or failure of whatever nature or kind, based on the theories of strict liability in tort, negligence, or breach of an implied warranty shall not be commenced more than fifteen years after the product was first purchased, leased, bailed, or installed for use or consumption....

Iowa Code § 614.1(2A)(a) (emphasis added). Unlike a statute of limitations, the period established in section 614.1(2A)(a) does not run from the accrual of the plaintiff's claim; rather, it runs from the date the product was first purchased or installed for use. Id. Thus, "the mere passage of time can prevent a legal right from ever arising." Bob McKiness Excavating, 507 N.W.2d at 408. Section 614.1(2A)(a) is, therefore, a statute of repose.
Before we consider the extension statute for minors, we make one additional observation. As noted above, section 614.1 generally sets forth the time periods in which suits must be brought "after their causes accrue ... except when otherwise specially declared...." Iowa Code § 614.1 (emphasis added). Because the statutes of repose set forth in section 614.1 have the effect of barring a claim before it accrues, statutes of repose are periods "otherwise specially declared" that operate as an exception to the statutes of limitation that commence upon accrual of the claim.
*93 Armed with an understanding of the nature of section 614.1(2A), we now turn to an examination of section 614.8(2). The plaintiff claims this statute extends the fifteen-year statute of repose for products claims asserted by minors. Section 614.8 provides in relevant part:
Except as provided in section 614.1, subsection 9, the times limited for actions in this chapter, except those brought for penalties and forfeitures, are extended in favor of minors, so that they shall have one year from and after attainment of majority within which to commence an action.
Iowa Code § 614.8(2). This statute too operates as a "specially declared" exception to the statutes of limitation otherwise applicable to actions filed by minors. Kohrt, 344 N.W.2d at 247.
Although we have no legislative history that reflects the general assembly's intent in adopting this statute, it is a common provision in statutory law. Generally, the purpose of such statutes "is to protect the legal rights of those who are unable to assert their own rights and to mitigate the difficulties of preparing and maintaining a civil suit while the plaintiff is under a disability." 51 Am.Jur.2d Limitation of Actions § 218, at 591.
C. Contentions of parties. GM argues that section 614.8(2) is not applicable to statutes of repose such as section 614.1(2A). The plaintiff responds that the applicability of section 614.8(2) does not depend on whether the time period at issue is one of limitation or one of repose. To resolve this dispute, we turn initially to the language of the statute.
By its own terms, section 614.8(2) extends "the times limited for actions." Iowa Code § 614.8(2) (emphasis added). This language appears to be referring to a statute of limitations, i.e., a statute that sets the time limit for filing an action. One could argue that had the legislature intended this extension to apply to statutes of repose, which limit the time within which claims can arise, it would have referred to the times limited for actions and claims. Interpreting section 614.8(2) as referring only to statutes of limitation is also consistent with our cases that hold a limitations period will be extended only when the disability exists when the cause of action accrues. See In re Estate of Hoenig, 230 Iowa 718, 725, 298 N.W. 887, 891 (1941) (interpreting predecessor statute using nearly identical language); Roelefsen v. City of Pella, 121 Iowa 153, 155, 96 N.W. 738, 739 (1903) (same). This focus on the accrual of the cause of action is irrelevant to a statute of repose, which runs without regard to the accrual of the claim.
Nonetheless, we note some ambiguity arises when the statute is considered in the context of chapter 614. First of all, the legislature itself has not expressly distinguished statutes of limitation from statutes of repose, and has lumped them together in section 614.1. Perhaps, therefore, it did not intend to distinguish between them for purposes of the extension period for minors. On the other hand, as noted earlier, both section 614.8(2) and section 614.1(2A) are "specially declared" exceptions to the otherwise applicable statutes of limitation. It would be somewhat unusual for one exception to operate as an exception to another exception. In spite of these conflicting implications, we think any ambiguity with respect to the scope of section 614.8(2) can be resolved by focusing on the legislative purpose underlying this statute and related statutes.
Before we consider the purposes of the relevant statutes, however, we address the plaintiff's contention that our decision in Kohrt is dispositive of the issue before us. *94 In Kohrt, this court applied section 614.8 to a medical malpractice case even though the six-year repose period of section 614.1(9) had expired six years before the minor filed suit. 344 N.W.2d at 246, 247. We did so without any discussion of whether the six-year limit on claims found in section 614.1(9) was a statute of limitations or a statute of repose. Id. The omission of such a discussion was consistent with the fact that, as we have pointed out earlier in this decision, our court did not distinguish statutes of limitation from statutes of repose prior to our 1993 decision in Bob McKiness Excavating.
Given our failure in Kohrt to consider the differences between statutes of repose and statutes of limitation, we do not find Kohrt to be binding or persuasive. We find more helpful our decision in Bob McKiness Excavating, where we reflected on the distinction between statutes of repose and of limitation in deciding whether the discovery rule applied to claims governed by the statute of repose for improvements to real estate. 507 N.W.2d at 408.
In Bob McKiness Excavating, the plaintiff sought damages arising out of the collapse of a pole barn in 1991. Id. at 407. Because the building had been constructed in 1971, the defendant was granted summary judgment on the basis that the fifteen-year period of repose found in section 614.1(11) barred the plaintiff's suit. Id. The plaintiff appealed, arguing that under the discovery rule its claim did not accrue until 1991. Id. We rejected the plaintiff's argument, noting that it failed "to distinguish between an ordinary statute of limitations and a statute of repose." Id. at 409. Observing that the plaintiff's "cause of action was eliminated before the injury occurred and before the cause of action accrued," we held that "the plain language of [section 614.1(11)] evinces a legislative policy decision to close the door after fifteen years on certain claims arising from improvements to real property." Id. We held, therefore, that the discovery rule did not apply. Id.
The same rationale applies here. Like section 614.1(11), section 614.1(2A)(a) is a statute of repose that reflects "a legislative policy decision to close the door after fifteen years" on certain product claims. As applied here, section 614.1(2A)(a) barred the plaintiff's claim before it accrued. Thus, application of the extension provision of section 614.8(2) would in effect create a cause of action that otherwise would not exist. This result is contrary to the fundamental nature of a statute of repose: "When the period of repose runs before a cause of action accrues, no legal right can thereafter arise." Bob McKiness Excavating, 507 N.W.2d at 410 (emphasis added). Moreover, it is totally inconsistent with the legislature's policy decision underlying section 614.1(2A) and nullifies that statute's operation.
Equally significant, application of section 614.8(2) would not be consistent with the rationale underlying such extension statutes. As noted above, statutes of this type protect the legal rights of a minor who is unable to assert his or her own rights and alleviates the difficulties of preparing and maintaining a civil suit while the plaintiff is a minor. See 51 Am.Jur.2d Limitation of Actions § 218, at 591. Extension statutes in essence put a minor on equal footing with an adult, giving the minor an opportunity, when he or she becomes an adult, to assert his or her legal rights. This equalizing effect is unnecessary though in the context of a statute of repose. When a period of repose expires and bars a claim before it accrues (as occurred here), there is nothing a potential claimantadult or minorcan do to avoid the bar. Thus, the minor suffers no disadvantage by virtue of his minority with respect to a statute of *95 repose because he has no rights that could be asserted in a lawsuit. Thus, any impediment to the assertion of a minor's rights caused by the minor's legal disabilityan impediment section 614.8(2) is designed to removeis irrelevant. In addition, application of an extension provision in this context would not put a minor on an equal footing with an adult; it would put the minor in a more advantageous position. That is not the intended purpose of statutes such as section 614.8(2).
We have considered the plaintiff's contention that had the legislature wanted to exclude section 614.1(2A) from the scope of section 614.8(2), it could have expressly done so. He points out that the legislature did just that with respect to section 614.1(9), enacting an amendment to section 614.8 in 1997 that removed medical malpractice claims from the reach of section 614.8(2). See 1997 Iowa Acts ch. 197, § 7. Given our decision in Kohrt, however, the legislature had no other alternative than to expressly except section 614.1(9) if, in fact, it did not want to extend the repose period for minors bringing medical negligence suits. In addition, we refuse to rely on legislative inaction as indicating a legislative intent that is at odds with the underlying purpose of both section 614.8(2) and section 614.1(2A). That is because "our primary goal is to give statutes a reasonable construction [that] will effectuate rather than defeat the purpose of the statute[s]." William C. Mitchell, Ltd. v. Brown, 576 N.W.2d 342, 349 (Iowa 1998).
In summary, we hold section 614.8(2) does not extend the statute of repose found in section 614.1(2A)(a). The district court was correct in so ruling. Moreover, because the allegations of the petition establish that the present suit falls with the scope of section 614.1(2A)(a) and was brought more than fifteen years after the product in question was first purchased, the plaintiff's claim is barred. Therefore, the district court did not err in granting GM's motion to dismiss.
AFFIRMED.
