'Deemer, J.
The policy in suit was issued by defendant company July 13, 1897. By the terms of one of the bylaws, that was expressly made a part of the instrument, it was provided that “no suit or action against said company, for the recovery of such loss or damage, shall be sustainable in any court of law or chancery, unless such suit or action shall be commenced within the term of six months next after the date of the occurrence of the fire.” Plaintiff’s property was destroyed by fire September 9, 1897; and this action was brought August 30, 1898. Under prior decisions of this ■court, the time fixed in the contract within which suit should be brought commenced to run, not from the date of the fire, but from the time when the cause of action accrued. Read v. Insurance Co., 103 Iowa, 307, and cases cited; Code, section 1744; and Acts Eighteenth General Assembly, chapter 211, section 3. The time when the cause of action accrued was either 40 or 90 days after notice and proof of loss were given, depending on which of the statutes referred to was in force when this action was commenced. It will be noticed that the fire occurred before the Code of 1897 went into ■effect, and that the action was brought several months after that time. The Code provides that the time within which action may be brought shall not be limited to less than one year from the time when the cause of action arose, and that no provision of the policy to the contrary should be availing. There was no such statute prior to time the Code of 1897 went into effect. Prior to the adoption of that section, it was lawful for the parties to create a contract limitation that would be binding on the courts. Moore v. Insurance Co., 72 Iowa, 415; Harrison v. Insurance Co., 102 Iowa, 115. Such a limitation is plainly distinguishable from one ■created by statute, and courts with great unanimity have *610so held. Riddlesbarger v. Insurance Co., 7 Wall. 386 (19 L. Ed. 257) ; Harrison v. Insurance Co., supra, and cases cited. It has been said that it does not merely bar the remedy, but that it extinguishes the right. May, Insurance, section 432; Williams v. Insurance Co., 20 Vt. 222; Travelers’ Ins. Co. v. California Ins. Co. of San Francisco, 1 N. D. (45 N. W. Rep. 703, 8 L. R. A. 769). Statutes of limitations are, of course, enacted by the legislature, and pertain exclusively to. the remedy, and, with some exceptions not necessary to be stated, may be changed by the legislature so^ as to affect existing contracts. Contract rights and obligations cannot, as a general rule, be changed by subsequent legislation. It is fundamental that the legislature cannot impair' the obligations of a contract. These rules are well established, and the vital point in the case is this: Does a statute providing that conditions like the one in the policy in suit, limiting the time in which actions may be brought, shall be of no avail, relate to the remedy, or does it impair contract rights theretofore existing between the parties ? If it affects the remedy simply, it is valid. But if it destroys valid contract rights, then it is of no avail, as applied to rights existing when that statute went into effect. We have attempted to show that by the uniform holding of the courts the contract relates, not simply to the remedy, but that it extinguishes rights. The statute does not attempt to fix a period of limitations. It undertakes to limit contract rights, and nothing more. The limitation statute is found in another provision of the Code. Parties may contract as before, provided the limitation fixed by them is not less than one year. These views are sustained by Kimball v. Association, 90 Me. 183 (38 Atl. Rep. 103), and Sample v. Insurance Co., 46 S. C. 491 (24 S. E. Rep. 334, 47 L. R. A. 696), and have never been questioned, so far as we have been able to> discover.
Statutes of limitation are for the greater part rules of evidence, providing, in favor of the repose and safety of *611society, that a certain lapse of time shall give rise to a presumption of payment or grant; and, as the length of this period depends on the will of the legislature, it may be shortened or lengthened at pleasure, provided that, if shortened, the bar is not immediate, and a reasonable time remains in which to sue. Contract limitations are based on the agreement of the parties, and not only affect the remedy, but the right. Concede that the legislature has power to control this contract right, it cannot, by so doing, impair contracts already in existence, especially where, as in this case, the right has become vested by reason of the destruction of the property. The statute in question does not in any sense relate to evidence. It was, as we have said, evidently intended to place a limit on the right of contract, and, of course, cannot affect existing obligations. From this view of the case, it follows that the statute cannot be made to operate retrospectively. Indeed, a statute will not be so construed unless it clearly 'appears that this was the legislative intent. Starr v. City of Burlington, 45 Iowa, 87. If, then, it appears that to make it retroactive would destroy its operation, the presumption that it was to operate prospectively will the more readily be adopted; and the act will not be permitted to affect past transactions, unless such intention is clearly and unequivocally expressed. If the statute related simply to the remedy, and was nothing more than a statute of repose, it would, of course, apply to actions commenced after its passage. But that it was intended as a limitation on thcJ power and right of contract is, we think, very clear, and that legislation impairing the obligations of contracts is invalid is equally clear. See McCracken v. Hayward, 2 How. 608 (11 L. Ed. 397) ; Gunn v. Barry, 15 Wall. 610 (21 L. Ed. 212). As the fire occurred, and the rights of the parties vested, before the Code of 1897 went into effect, the action should have been brought within the time fixed by the contract. As it was not so brought, plaintiff had no right to recover, and the trial court should have so held. — Reversed.